{"record":{"id":"23e411d70de1f295","repo":"apache/maven","slug":"settings-for-server-uses-legacy-format","errorCode":null,"errorMessage":"Settings for server {} uses legacy format","messagePattern":"Settings for server (.+?) uses legacy format","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java","lineNumber":269,"sourceCode":"                                    property.getChild(\"name\").getValue(),\n                                    property.getChild(\"value\").getValue());\n                        }\n                    }\n                }\n\n                PlexusConfiguration connectTimeoutXml = config.getChild(\"connectTimeout\", false);\n                if (connectTimeoutXml != null) {\n                    connectTimeout = Integer.parseInt(connectTimeoutXml.getValue());\n                } else {\n                    // fallback configuration name\n                    PlexusConfiguration httpConfiguration = config.getChild(\"httpConfiguration\", false);\n                    if (httpConfiguration != null) {\n                        PlexusConfiguration httpConfigurationAll = httpConfiguration.getChild(\"all\", false);\n                        if (httpConfigurationAll != null) {\n                            connectTimeoutXml = httpConfigurationAll.getChild(\"connectionTimeout\", false);\n                            if (connectTimeoutXml != null) {\n                                connectTimeout = Integer.parseInt(connectTimeoutXml.getValue());\n                                logger.warn(\"Settings for server {} uses legacy format\", server.getId());\n                            }\n                        }\n                    }\n                }\n\n                PlexusConfiguration requestTimeoutXml = config.getChild(\"requestTimeout\", false);\n                if (requestTimeoutXml != null) {\n                    requestTimeout = Integer.parseInt(requestTimeoutXml.getValue());\n                } else {\n                    // fallback configuration name\n                    PlexusConfiguration httpConfiguration = config.getChild(\"httpConfiguration\", false);\n                    if (httpConfiguration != null) {\n                        PlexusConfiguration httpConfigurationAll = httpConfiguration.getChild(\"all\", false);\n                        if (httpConfigurationAll != null) {\n                            requestTimeoutXml = httpConfigurationAll.getChild(\"readTimeout\", false);\n                            if (requestTimeoutXml != null) {\n                                requestTimeout = Integer.parseInt(requestTimeoutXml.getValue());\n                                logger.warn(\"Settings for server {} uses legacy format\", server.getId());","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java#L251-L287","documentation":"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())).","triggerScenarios":"settings.xml contains a <server> whose <configuration> uses httpConfiguration/all/connectionTimeout; typical of configurations migrated from Maven 3 / Wagon-era HTTP settings.","commonSituations":"Long-lived corporate settings.xml files predating maven-resolver; teams copying old server snippets for authenticated repository mirrors.","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"],"exampleFix":"<!-- before (settings.xml) -->\n<server>\n  <id>corp-repo</id>\n  <configuration>\n    <httpConfiguration><all><connectionTimeout>5000</connectionTimeout></all></httpConfiguration>\n  </configuration>\n</server>\n<!-- after -->\n<server>\n  <id>corp-repo</id>\n  <configuration>\n    <connectTimeout>5000</connectTimeout>\n  </configuration>\n</server>","handlingStrategy":"validation","validationCode":"# lint settings.xml for the legacy layout before builds\ngrep -n 'connectionTimeout' ~/.m2/settings.xml && echo 'legacy server timeout config: rename to <connectTimeout>'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["settings-xml","deprecated-config","http-timeout","resolver"],"backgroundTag":"deprecated-config-migration","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-22T04:17:13.399Z"}