You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tim Myerscough (JIRA)" <ji...@codehaus.org> on 2011/02/25 13:42:22 UTC

[jira] Created: (MNG-5026) Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS

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: Bug
          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

        

[jira] (MNG-5026) Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS

Posted by "Brian Brooks (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] (MNG-5026) Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS

Posted by "Brian Brooks (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=303688#comment-303688 ] 

Brian Brooks commented on MNG-5026:
-----------------------------------

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

        

[jira] Commented: (MNG-5026) Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS

Posted by "Marc Rohlfs (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257763#action_257763 ] 

Marc Rohlfs commented on MNG-5026:
----------------------------------

Same for {{-Dorg.apache.maven.global-settings}}, please!!!

> 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

        

[jira] Commented: (MNG-5026) Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257768#action_257768 ] 

Benjamin Bentmann commented on MNG-5026:
----------------------------------------

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

        

[jira] Updated: (MNG-5026) Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-5026:
-----------------------------------

    Issue Type: Improvement  (was: Bug)

> 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

        

[jira] Issue Comment Edited: (MNG-5026) Re-instate support of -Dorg.apache.maven.user-settings in MAVEN_OPTS

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ 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