From the docs :
The CLI makes use of the Maven configuration found in ~/.m2/settings.xml to configure Aether. The following configuration settings are honored by the CLI:
Offline
Mirrors
Servers
Proxies
Profiles
Activation
Repositories
It would be great if spring boot cli can read environment variables to find maven settings.xml from a different location.
Currently, spring boot cli only looks at ~/.m2/settings.xml
for maven related configs.
(As per the doc)
Maven can read environment variables MAVEN_HOME
to find maven installation directory and hence $MAVEN_HOME/conf
for the configurations.
This lets maven be compliant with the XDG directory specification (by environment variables ) .
It would be great if spring boot cli can also look for this environment variable to find the settings.xml ( $MAVEN_HOME/conf/settings.xml
) .Also enable it honor the LocalRepository
setting without any profile.
Comment From: michael-o
https://issues.apache.org/jira/browse/MNG-6603
Comment From: michael-o
There is no public MAVEN_HOME
Maven reads from. Also Aether is long gone. It is Maven Resolver now.
Comment From: wilkinsona
Thanks, @michael-o.
In light of the above, I'm going to close this one for the time being at least. I'm watching MNG-6603. As and when there's some movement there we can consider this one again and possibly re-open it.
For future reference, Maven's support for M2_HOME
was removed in Maven 3.5. From what I can gather MAVEN_HOME
was a Maven 1 thing.
Comment From: wilkinsona
I've opened https://github.com/spring-projects/spring-boot/issues/29255 to update our references to Aether.