You can override which settings file is used with --settings flag. On Tue, Sep 13, 2022, 11:08 Sverre Moe <sverre....@gmail.com> wrote:
> I have been looking into the Maven Wrapper. We have mostly been using > Gradle for new projects, but I was thinking of taking the Maven Wrapper in > use for our legacy projects that still use Maven. > > With Gradle we can create a custom gradle distribution that has all common > settings and properties needed by projects built by gradle. > > How can we do the same with Maven? > > Now we have the files settings.xml and settings-security.xml stored in > ~/.m2, which must be copied by all users into their own user home > directory. > > Running mvn wrapper:wrapper gave me this maven-wrapper.properties > > distributionUrl= > > https://nexus.company.com:8443/repository/maven-public//org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip > wrapperUrl= > > https://nexus.company.com:8443/repository/maven-public//org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar > > Even though the Maven Wrapper is downloaded from our Nexus, the > dependencies are not, until I provide the settings.xml. >