elharo opened a new issue, #170:
URL: https://github.com/apache/maven-resolver-ant-tasks/issues/170

   ## Summary
   User settings discovery prefers `~/.ant/settings.xml` over 
`~/.m2/settings.xml`, so a stray/leftover `.ant/settings.xml` shadows the real 
Maven settings and silently disables mirrors/proxies/servers.
   
   ## Affected code
   `src/main/java/org/apache/maven/resolver/internal/ant/AetherUtils.java` 
lines 46-54 (master @ `df2908e`)
   
   ```java
   public static File findUserSettings(final Project project) {
       final File userHome = new File(project.getProperty("user.home"));
       final File file = new File(new File(userHome, ".ant"), 
Names.SETTINGS_XML);
       if (file.isFile()) {
           return file;
       } else {
           return new File(new File(userHome, ".m2"), Names.SETTINGS_XML);
       }
   }
   ```
   
   ## Problem
   If any `~/.ant/settings.xml` exists — even an empty or stale file — it is 
used as the user settings and the canonical `~/.m2/settings.xml` (which 
normally holds mirrors, proxies, and server credentials) is never read.
   
   ## Expected behavior
   Prefer `~/.m2/settings.xml` (the Maven-standard location), or make the 
`.ant` preference explicit and documented. At minimum this precedence should be 
revisited and covered by a test.
   
   ## Impact
   Users who happen to have an `.ant/settings.xml` get silently different 
resolution behavior (missing mirrors/credentials) than Maven.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to