You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliot Metsger (JIRA)" <ji...@codehaus.org> on 2010/08/11 18:58:32 UTC

[jira] Created: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Improve snapshot dependency handling of parent artifacts
--------------------------------------------------------

                 Key: MRELEASE-588
                 URL: http://jira.codehaus.org/browse/MRELEASE-588
             Project: Maven 2.x Release Plugin
          Issue Type: Improvement
          Components: prepare
    Affects Versions: 2.0
            Reporter: Elliot Metsger


This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.

However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.

For example, I want to release the following:
{code}
<project>
  <groupId>org.dataconservancy</groupId>
  <artifactId>project-pom</artifactId>
  <version>1.0.0-SNAPSHOT</version>

  <parent>
    <groupId>org.dataconservancy</groupId>
    <artifactId>parent-pom</artifactId>
    <version>1.0.0-SNAPSHOT</version>
  </parent>

  ...
</project>
{code}

If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:

{code}
There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
What is the release version? 1.0.0: : 1.0.0-test
{code}

The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:

{code}
<project>
  <groupId>org.dataconservancy</groupId>
  <artifactId>project-pom</artifactId>
  <version>1.0.0-test</version>

  <parent>
    <groupId>org.dataconservancy</groupId>
    <artifactId>parent-pom</artifactId>
    <version>1.0.0</version>
  </parent>

  ...
</project>
{code}

-- 
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: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MRELEASE-588:
----------------------------------

    Fix Version/s: 2.1

patch to review

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>             Fix For: 2.1
>
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "Elliot Metsger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235628#action_235628 ] 

Elliot Metsger commented on MRELEASE-588:
-----------------------------------------

bq. For what version is your patch for?
2.0

bq. After that the discussed changes from MRELEASE-583 (improved version prompting) could be implemented. But i dont know if this is desired by the core developer. Any comments?

I'd suggest that discussion happen on MRELEASE-583 instead of here.

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>             Fix For: 2.1
>
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "nicola sinapsi (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231771#action_231771 ] 

nicola sinapsi commented on MRELEASE-588:
-----------------------------------------

great job!

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "Elliot Metsger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231828#action_231828 ] 

Elliot Metsger commented on MRELEASE-588:
-----------------------------------------

Thanks, Nicola!  Unfortunately I'm getting bit by MRELEASE-318 (version ranges causing NPEs), which is present in version 2.0 of the release plugin, but not 2.0-beta-9.

So, as a result I've had to apply MRELEASE-583 and MRELEASE-588 to 2.0-beta-9, and I'm happy to say that the patches seem to work (they apply with some fuzz but all tests pass).

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "Marcus Linke (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235569#action_235569 ] 

Marcus Linke commented on MRELEASE-588:
---------------------------------------

I think a should give it a try... ;) For what version is your patch for? I suggest to merge the patches from MRELEASE-583, MRELEASE-588 and MRELEASE-350 into one. After that the discussed changes from MRELEASE-588 (improved version prompting) could be implemented. But i dont know if this is desired by the core developer. Any comments?

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>             Fix For: 2.1
>
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "Elliot Metsger (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Elliot Metsger updated MRELEASE-588:
------------------------------------

    Attachment: Dependency_handling_of_parent_artifacts.patch

The attached patch updates the rewriteParent method of AbstractRewritePomsPhase to use the dependency version supplied by the user.

maven-release-manager tests pass, and the maven-release-plugin tests and ITs pass.

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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-588) Improve snapshot dependency handling of parent artifacts

Posted by "Marcus Linke (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235569#action_235569 ] 

Marcus Linke edited comment on MRELEASE-588 at 9/17/10 2:47 AM:
----------------------------------------------------------------

I think a should give it a try... ;) For what version is your patch for? I suggest to merge the patches from MRELEASE-583, MRELEASE-588 and MRELEASE-350 into one. After that the discussed changes from MRELEASE-583 (improved version prompting) could be implemented. But i dont know if this is desired by the core developer. Any comments?

      was (Author: mlinke):
    I think a should give it a try... ;) For what version is your patch for? I suggest to merge the patches from MRELEASE-583, MRELEASE-588 and MRELEASE-350 into one. After that the discussed changes from MRELEASE-588 (improved version prompting) could be implemented. But i dont know if this is desired by the core developer. Any comments?
  
> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>             Fix For: 2.1
>
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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] Closed: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed MRELEASE-588.
---------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 2.1)
         Assignee: Brett Porter

I believe the alternate fixes I made for those addressed this issue. I can't reproduce it on trunk - see r1002238 for a test.

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>            Assignee: Brett Porter
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

-- 
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: (MRELEASE-588) Improve snapshot dependency handling of parent artifacts

Posted by "Elliot Metsger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235495#action_235495 ] 

Elliot Metsger commented on MRELEASE-588:
-----------------------------------------

Marcus, great!  As long as my testcase attached to this issue passes :)

> Improve snapshot dependency handling of parent artifacts
> --------------------------------------------------------
>
>                 Key: MRELEASE-588
>                 URL: http://jira.codehaus.org/browse/MRELEASE-588
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>            Reporter: Elliot Metsger
>             Fix For: 2.1
>
>         Attachments: Dependency_handling_of_parent_artifacts.patch
>
>
> This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.
> However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.
> For example, I want to release the following:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-SNAPSHOT</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   ...
> </project>
> {code}
> If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:
> {code}
> There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
> What is the release version? 1.0.0: : 1.0.0-test
> {code}
> The resulting release pom doesn't use 1.0.0-test as the parent version.  It uses 1.0.0:
> {code}
> <project>
>   <groupId>org.dataconservancy</groupId>
>   <artifactId>project-pom</artifactId>
>   <version>1.0.0-test</version>
>   <parent>
>     <groupId>org.dataconservancy</groupId>
>     <artifactId>parent-pom</artifactId>
>     <version>1.0.0</version>
>   </parent>
>   ...
> </project>
> {code}

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