apache/maven · warning
Settings for server {} uses legacy format
Error message
Settings for server {} uses legacy format What it means
While converting a <server> entry's HTTP configuration into Resolver properties, Maven found the connection timeout under the legacy Wagon-style path <httpConfiguration><all><connectionTimeout> instead of the current top-level <connectTimeout>. The value still applies, but the legacy layout is deprecated and warned about per server (logger.warn(... server.getId())).
Source
Thrown at impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java:269
property.getChild("name").getValue(),
property.getChild("value").getValue());
}
}
}
PlexusConfiguration connectTimeoutXml = config.getChild("connectTimeout", false);
if (connectTimeoutXml != null) {
connectTimeout = Integer.parseInt(connectTimeoutXml.getValue());
} else {
// fallback configuration name
PlexusConfiguration httpConfiguration = config.getChild("httpConfiguration", false);
if (httpConfiguration != null) {
PlexusConfiguration httpConfigurationAll = httpConfiguration.getChild("all", false);
if (httpConfigurationAll != null) {
connectTimeoutXml = httpConfigurationAll.getChild("connectionTimeout", false);
if (connectTimeoutXml != null) {
connectTimeout = Integer.parseInt(connectTimeoutXml.getValue());
logger.warn("Settings for server {} uses legacy format", server.getId());
}
}
}
}
PlexusConfiguration requestTimeoutXml = config.getChild("requestTimeout", false);
if (requestTimeoutXml != null) {
requestTimeout = Integer.parseInt(requestTimeoutXml.getValue());
} else {
// fallback configuration name
PlexusConfiguration httpConfiguration = config.getChild("httpConfiguration", false);
if (httpConfiguration != null) {
PlexusConfiguration httpConfigurationAll = httpConfiguration.getChild("all", false);
if (httpConfigurationAll != null) {
requestTimeoutXml = httpConfigurationAll.getChild("readTimeout", false);
if (requestTimeoutXml != null) {
requestTimeout = Integer.parseInt(requestTimeoutXml.getValue());
logger.warn("Settings for server {} uses legacy format", server.getId());View on GitHub (pinned to e4093d4e12)
Solutions
- Rename the element in settings.xml: replace <httpConfiguration><all><connectionTimeout> with a direct <connectTimeout> child of the server <configuration>
- Do the same for readTimeout -> requestTimeout so the sibling legacy warning also disappears
- Validate by re-running the build - the warning must be gone for that server id
Example fix
<!-- before (settings.xml) -->
<server>
<id>corp-repo</id>
<configuration>
<httpConfiguration><all><connectionTimeout>5000</connectionTimeout></all></httpConfiguration>
</configuration>
</server>
<!-- after -->
<server>
<id>corp-repo</id>
<configuration>
<connectTimeout>5000</connectTimeout>
</configuration>
</server> Defensive patterns
Strategy: validation
Validate before calling
# lint settings.xml for the legacy layout before builds grep -n 'connectionTimeout' ~/.m2/settings.xml && echo 'legacy server timeout config: rename to <connectTimeout>'
Prevention
- Use the current element names (<connectTimeout>/<requestTimeout>) in all new server snippets
- Grep old settings.xml for httpConfiguration during Maven upgrades
- Keep per-server HTTP config in source control so migrations are reviewable
When it happens
Trigger: settings.xml contains a <server> whose <configuration> uses httpConfiguration/all/connectionTimeout; typical of configurations migrated from Maven 3 / Wagon-era HTTP settings.
Common situations: Long-lived corporate settings.xml files predating maven-resolver; teams copying old server snippets for authenticated repository mirrors.
Related errors
- The artifact has no valid ranges
- Error updating group repository metadata
- Unable to lookup org.eclipse.aether.RepositorySystem
- Unknown error during artifact resolution, {}, {}
- unknown repository checksum policy: {artifactRepositoryPolic
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/23e411d70de1f295.
Report an issue: GitHub.