[ https://jira.codehaus.org/browse/MNG-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=303688#comment-303688 ]
Brian Brooks edited comment on MNG-5026 at 7/16/12 1:45 PM: ------------------------------------------------------------ We're trying to upgrade from Maven 2.0.8 to 3.0.4 and encountered this same issue. We have a similar need to override the default location of settings.xml to be in a place that our corporate IT doesn't slow down builds by scanning for viruses. The IT dept excludes certain paths from virus scanning. Thus, we like to place all our build-related files including settings.xml in one of these excluded paths. @Benjamin MAVEN_ARGS would meet our needs. was (Author: bbrooks): We have a similar need to override the default location of settings.xml to be in a place that our corporate IT doesn't slow down builds by scanning for viruses. The IT dept excludes certain paths from virus scanning. Thus, we like to place all our build-related files including settings.xml in one of these excluded paths. @Benjamin MAVEN_ARGS would meet our needs. > Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS > -------------------------------------------------------------------- > > Key: MNG-5026 > URL: https://jira.codehaus.org/browse/MNG-5026 > Project: Maven 2 & 3 > Issue Type: Improvement > Components: Command Line > Affects Versions: 3.0.2 > Environment: All > Reporter: Tim Myerscough > > I've raised this in response to thread > http://maven.40175.n5.nabble.com/Maven-3-support-for-org-apache-maven-user-settings-td3261146.html > My use case is that in my environment storing the settings.xml in the users > home directory is not desirable. The build environment can be shared across > different environments that do not share a common home directory. Instead, a > shared mount is used. > Having to maintain multiple copies of the settings.xml in multiple locations > is confusing and error prone for developers. And having to specify a -s > parameter on every command line, pointing at a long path, is undesirible. We > use both Windows and Linux, so aliasing isn't available. I'd like to use a > consistent approach across all environments, including Hudson builds where we > use multiple settings.xml. > Test case: > Create file ~/.m2/settings-alt.xml with contents: > <settings> > <profiles> > <profile> > <id>alt-settings</id> > <properties> > <is-alt>true</is-alt> > </properties> > </profile> > </profiles> > > <activeProfiles> > <activeProfile>alt-settings</activeProfile> > </activeProfiles> > set the MAVEN_OPTS environment variable > MAVEN_OPTS="-Dorg.apache.maven.user-settings=~/.m2/settings-alt.xml" > run: > $mvn help:effective-settings > It should include: > <activeProfiles xmlns="http://maven.apache.org/SETTINGS/1.1.0"> > <activeProfile>env-dev</activeProfile> > </activeProfiles> -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira