You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Petr Kozelka (JIRA)" <ji...@codehaus.org> on 2010/07/02 16:19:32 UTC

[jira] Created: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

release:prepare does not pass argument "--settings" with current settings.xml to inner maven
--------------------------------------------------------------------------------------------

                 Key: MRELEASE-577
                 URL: http://jira.codehaus.org/browse/MRELEASE-577
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
          Components: prepare
    Affects Versions: 2.0, 2.0-beta-9
            Reporter: Petr Kozelka
            Priority: Critical


The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.

To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
mvn --settings=$HOME/.m2/s.xml release:prepare .....

-- 
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: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272027#comment-272027 ] 

Stephen Connolly edited comment on MRELEASE-577 at 7/1/11 6:21 AM:
-------------------------------------------------------------------

It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

Add a boolean parameter to prepare and stage goals that enables the following:

  * Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml
  
  []

When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

The patch will need tests.

w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files

      was (Author: stephenconnolly):
    It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

Add a boolean parameter to prepare and stage goals that enables the following:

* Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml

When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

The patch will need tests.

w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files
  
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Derek Lewis (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283142#comment-283142 ] 

Derek Lewis commented on MRELEASE-577:
--------------------------------------

Using -Darguments is the workaround we have had to use.  However, we set a large number of profiles (and a few properties) for our release build, which ends up meaning we have to list them all twice, once to the outer execution of Maven, and once in -Darguments.  Most of the profiles we enable are profiles that include submodules into the reactor, so if we don't set them twice like that, the inner Maven execution doesn't actually build the same modules.
I realize this isn't the same as passing the the settings file to the inner execution, but it seems to me to be related.

> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: Backlog
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Christoph Kutzinski (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283124#comment-283124 ] 

Christoph Kutzinski commented on MRELEASE-577:
----------------------------------------------

As mentioned in MRELEASE-521 the perform goal is affected by the same problem.

> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: Backlog
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Joseph Walton (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296189#comment-296189 ] 

Joseph Walton commented on MRELEASE-577:
----------------------------------------

Note that this change will *not* work in Maven 3.0.3 due to MNG-5224.
                
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Assignee: Stephen Connolly
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: 2.2.2
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
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] (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Connolly closed MRELEASE-577.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Backlog)
         Assignee: Stephen Connolly

r1213780
                
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Assignee: Stephen Connolly
>            Priority: Critical
>              Labels: contributers-welcome
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
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: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272027#comment-272027 ] 

Stephen Connolly commented on MRELEASE-577:
-------------------------------------------

It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

Add a boolean parameter to prepare and stage goals that enables the following:

* Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml

When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

The patch will need tests.

w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files

> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Connolly updated MRELEASE-577:
--------------------------------------

    Labels: contributers-welcome  (was: )

> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>              Labels: contributers-welcome
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stevo Slavic (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283134#comment-283134 ] 

Stevo Slavic commented on MRELEASE-577:
---------------------------------------

Isn't [arguments|http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#arguments] meant for passing arguments to inner Maven executions?

> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: Backlog
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Joseph Walton (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296187#comment-296187 ] 

Joseph Walton commented on MRELEASE-577:
----------------------------------------

This change seems to publish the passwords from a private settings.xml into a world-readable file in /tmp during a build.
                
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Assignee: Stephen Connolly
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: 2.2.2
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
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] Issue Comment Edited: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272027#comment-272027 ] 

Stephen Connolly edited comment on MRELEASE-577 at 7/1/11 6:23 AM:
-------------------------------------------------------------------

It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

* Add a boolean parameter to prepare and stage goals that enables the following:

** Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml
  
* When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

* The patch will need tests.

* w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

* w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files

      was (Author: stephenconnolly):
    It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

 * Add a boolean parameter to prepare and stage goals that enables the following:

 ** Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml
  
 * When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

 * The patch will need tests.

 * w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

 * w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files
  
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Connolly updated MRELEASE-577:
--------------------------------------

    Fix Version/s: 2.2.2
    
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Assignee: Stephen Connolly
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: 2.2.2
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
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] (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=285772#comment-285772 ] 

Stephen Connolly commented on MRELEASE-577:
-------------------------------------------

r1213763
                
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: Backlog
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
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] Issue Comment Edited: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272027#comment-272027 ] 

Stephen Connolly edited comment on MRELEASE-577 at 7/1/11 6:31 AM:
-------------------------------------------------------------------

It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

* Add a boolean parameter to prepare and stage goals that enables the following: 
** Use {{MavenSettingsXpp3Writer}} to write the {{$\{settings}}} to {{release.settings.xml}}.
* When forking maven, if there is a {{release.settings.xml}} file have the fork use that {{settings.xml}}.
* The patch will need tests.
* w.r.t. password encryption, the {{$\{settings}}} stores the password encrypted in memory so serialization will still write out the encrypted password.
- w.r.t. other gotcha's... you will need to ensure that {{release.settings.xml}} is ignored in the check for modified files.

      was (Author: stephenconnolly):
    It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

* Add a boolean parameter to prepare and stage goals that enables the following:

** Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml
  
* When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

* The patch will need tests.

* w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

* w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files
  
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>              Labels: contributers-welcome
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=272027#comment-272027 ] 

Stephen Connolly edited comment on MRELEASE-577 at 7/1/11 6:23 AM:
-------------------------------------------------------------------

It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

 * Add a boolean parameter to prepare and stage goals that enables the following:

 ** Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml
  
 * When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

 * The patch will need tests.

 * w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

 * w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files

      was (Author: stephenconnolly):
    It is not possible to get the location of the settings.xml from within a Maven plugin.

Embedding maven may result in there actually being no settings.xml at all, with all the required information being provided by the embedder.

If somebody wants to take a stab at a patch for this, you would do something like:

Add a boolean parameter to prepare and stage goals that enables the following:

  * Use MavenSettingsXpp3Writer to write the ${settings} to release.settings.xml
  
  []

When forking maven, if there is a release.settings.xml file have the fork use that settings.xml

The patch will need tests.

w.r.t. password encryption, the ${settings} stores the password encrypted in memory so serialization will still write out the encrypted password.

w.r.t. other gotcha's... you will need to ensure that release.settings.xml is ignored in the check for modified files
  
> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MRELEASE-577) release:prepare does not pass argument "--settings" with current settings.xml to inner maven

Posted by "Stephen Connolly (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRELEASE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Connolly updated MRELEASE-577:
--------------------------------------

    Fix Version/s: Backlog

> release:prepare does not pass argument "--settings" with current settings.xml to inner maven
> --------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-577
>                 URL: https://jira.codehaus.org/browse/MRELEASE-577
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0-beta-9, 2.0
>            Reporter: Petr Kozelka
>            Priority: Critical
>              Labels: contributers-welcome
>             Fix For: Backlog
>
>
> The impact is that release:prepare tries to use $HOME/.m2/settings.xml instead of the one supplied by --settings cmdline option, which leads to unexpected behavior
> Of course if it does not exist, the inhouse repository is avoided and release often fails due to a ResourceDoesNotExistException when an inhouse artifact is requested by the pom.
> To reproduce this problem, just rename your ~/.m2/settings.xml to ~/.m2/s.xml and run this:
> mvn --settings=$HOME/.m2/s.xml release:prepare .....

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira