[
http://jira.codehaus.org/browse/MNG-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257768#action_257768
]
Benjamin Bentmann edited comment on MNG-5026 at 2/25/11 9:26 AM:
-----------------------------------------------------------------
At a more abstract level, this request seems to boil to being able to configure
Maven via environment variables like MAVEN_OPTS. So I wonder whether the
introduction of a new env var MAVEN_ARGS that gets appended to the
user-provided CLI provides a more generic/scalable approach. For instance, this
way {{\-\-errors}}, {{\-\-offline}} and many other CLI options are controllable
via the environment as well.
was (Author: bentmann):
At a more abstract level, this request seems to boil to being able to
configure Maven via environment variables like MAVEN_OPTS. So I wonder whether
the introduction of a new env var MAVEN_ARGS that gets appended to the
user-provided CLI provides a more generic/scalable approach. For instance, this
way {{-e}}, {{--offline}} and many other CLI options are controllable via the
environment as well.
> Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS
> --------------------------------------------------------------------
>
> Key: MNG-5026
> URL: http://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 contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira