You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ed Hillmann (JIRA)" <ji...@codehaus.org> on 2010/06/15 05:42:12 UTC

[jira] Created: (MRELEASE-576) Subversion Tag is incorrect when releasing from a Branch

Subversion Tag is incorrect when releasing from a Branch
--------------------------------------------------------

                 Key: MRELEASE-576
                 URL: http://jira.codehaus.org/browse/MRELEASE-576
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
          Components: prepare
    Affects Versions: 2.0
         Environment: Linux
            Reporter: Ed Hillmann
            Priority: Minor
         Attachments: myBranch.zip, mySecondBranch.zip

I've been able to recreate this error using a dummy application.  This is what I've done.

1) Created a HelloWorld project, which has a single sub module HelloWorldJar.  HelloWorlJar uses HelloWorld as it's parent.  I first created this on a trunk in a svn repository and committed everything.  

2) I used "release:branch" to create a branch.

3) Checked out the branch, and on the working copy of the branch I ran "mvn release:prepare".  It worked fine (the tag was constructed correctly).  "mvn release:perform" also worked swimmingly.  I've attached these maven projects in the myBranch.zip file.

4) Back on the trunk, I created another branch, named mySecondBranch

5) After checking out mySecondBranch, I introduced a new module named parent.  HelloWorldJar was updated to use parent as it's parent (yes, I'm not very creative in the naming department).  Parent was also listed as a module in HelloWorld (in addition to HelloWorldJar).  Everything's committed.  The SCM value is correct (it's the right branch directory).  I've attached the maven projects in the mySecondBranch.zip file.

6) When I run "mvn release:prepare", it all builds, but the tag is constructed incorrectly.  Instead of /tags/helloWorld-2.0 pointing to a revision of /branches/mySecondBranch, /tags/helloWorld-2.0 points to /branches.

7) {OK, this is wierd}.  When I run "mvn release:perform", it checks out against the tag helloWorld-2.0.  Which checks out the entire branches directory.  Once it's done that (I'm using a test repository), it builds the correct branch (it's building using the correct branch).  I don't know how it's working, but it is.

So, I guess it's working OK.  I'm not sure how it knows to pick out the correct branch (as it's checking out the full contents of the branch directory).  So it's building it eventually.

However, for large projects with multiple branches, this will be very slow to check out the entire contents of the branches directory, not to mention use much more disk space than is needed.  If the tag is constructed correctly, it avoids the whole thing.

-- 
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-576) Subversion Tag is incorrect when releasing from a Branch

Posted by "Ed Hillmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227983#action_227983 ] 

Ed Hillmann commented on MRELEASE-576:
--------------------------------------

Your assumption is correct: I'm running the release:prepare in the same directory as in step 2, which is in the aggregator POM.  I am not running it in the parent subdirectory.  My apologies.

I'll give your suggestion a try, although I had hoped that helloWorldJar would get its SCM declaration from the parent POM (as it did in the original version).  But I'm happy to wear the blame if I've done something incorrectly.

> Subversion Tag is incorrect when releasing from a Branch
> --------------------------------------------------------
>
>                 Key: MRELEASE-576
>                 URL: http://jira.codehaus.org/browse/MRELEASE-576
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0
>         Environment: Linux
>            Reporter: Ed Hillmann
>            Priority: Minor
>         Attachments: myBranch.zip, mySecondBranch.zip
>
>
> I've been able to recreate this error using a dummy application.  This is what I've done.
> 1) Created a HelloWorld project, which has a single sub module HelloWorldJar.  HelloWorlJar uses HelloWorld as it's parent.  I first created this on a trunk in a svn repository and committed everything.  
> 2) I used "release:branch" to create a branch.
> 3) Checked out the branch, and on the working copy of the branch I ran "mvn release:prepare".  It worked fine (the tag was constructed correctly).  "mvn release:perform" also worked swimmingly.  I've attached these maven projects in the myBranch.zip file.
> 4) Back on the trunk, I created another branch, named mySecondBranch
> 5) After checking out mySecondBranch, I introduced a new module named parent.  HelloWorldJar was updated to use parent as it's parent (yes, I'm not very creative in the naming department).  Parent was also listed as a module in HelloWorld (in addition to HelloWorldJar).  Everything's committed.  The SCM value is correct (it's the right branch directory).  I've attached the maven projects in the mySecondBranch.zip file.
> 6) When I run "mvn release:prepare", it all builds, but the tag is constructed incorrectly.  Instead of /tags/helloWorld-2.0 pointing to a revision of /branches/mySecondBranch, /tags/helloWorld-2.0 points to /branches.
> 7) {OK, this is wierd}.  When I run "mvn release:perform", it checks out against the tag helloWorld-2.0.  Which checks out the entire branches directory.  Once it's done that (I'm using a test repository), it builds the correct branch (it's building using the correct branch).  I don't know how it's working, but it is.
> So, I guess it's working OK.  I'm not sure how it knows to pick out the correct branch (as it's checking out the full contents of the branch directory).  So it's building it eventually.
> However, for large projects with multiple branches, this will be very slow to check out the entire contents of the branches directory, not to mention use much more disk space than is needed.  If the tag is constructed correctly, it avoids the whole thing.

-- 
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-576) Subversion Tag is incorrect when releasing from a Branch

Posted by "Michael Damone (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233030#action_233030 ] 

Michael Damone commented on MRELEASE-576:
-----------------------------------------

I am having this same problem and have gotten it to work by making the aggregator pom the parent to the 'parent' module, but would like to know if there is some way to work around that so that the modules do not have to have the aggregator in their parent hierarchy.

> Subversion Tag is incorrect when releasing from a Branch
> --------------------------------------------------------
>
>                 Key: MRELEASE-576
>                 URL: http://jira.codehaus.org/browse/MRELEASE-576
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0
>         Environment: Linux
>            Reporter: Ed Hillmann
>            Priority: Minor
>         Attachments: myBranch.zip, mySecondBranch-v2.zip, mySecondBranch.zip
>
>
> I've been able to recreate this error using a dummy application.  This is what I've done.
> 1) Created a HelloWorld project, which has a single sub module HelloWorldJar.  HelloWorlJar uses HelloWorld as it's parent.  I first created this on a trunk in a svn repository and committed everything.  
> 2) I used "release:branch" to create a branch.
> 3) Checked out the branch, and on the working copy of the branch I ran "mvn release:prepare".  It worked fine (the tag was constructed correctly).  "mvn release:perform" also worked swimmingly.  I've attached these maven projects in the myBranch.zip file.
> 4) Back on the trunk, I created another branch, named mySecondBranch
> 5) After checking out mySecondBranch, I introduced a new module named parent.  HelloWorldJar was updated to use parent as it's parent (yes, I'm not very creative in the naming department).  Parent was also listed as a module in HelloWorld (in addition to HelloWorldJar).  Everything's committed.  The SCM value is correct (it's the right branch directory).  I've attached the maven projects in the mySecondBranch.zip file.
> 6) When I run "mvn release:prepare", it all builds, but the tag is constructed incorrectly.  Instead of /tags/helloWorld-2.0 pointing to a revision of /branches/mySecondBranch, /tags/helloWorld-2.0 points to /branches.
> 7) {OK, this is wierd}.  When I run "mvn release:perform", it checks out against the tag helloWorld-2.0.  Which checks out the entire branches directory.  Once it's done that (I'm using a test repository), it builds the correct branch (it's building using the correct branch).  I don't know how it's working, but it is.
> So, I guess it's working OK.  I'm not sure how it knows to pick out the correct branch (as it's checking out the full contents of the branch directory).  So it's building it eventually.
> However, for large projects with multiple branches, this will be very slow to check out the entire contents of the branches directory, not to mention use much more disk space than is needed.  If the tag is constructed correctly, it avoids the whole thing.

-- 
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-576) Subversion Tag is incorrect when releasing from a Branch

Posted by "Zac Thompson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227902#action_227902 ] 

Zac Thompson commented on MRELEASE-576:
---------------------------------------

I'm *assuming* that you're running the 'release:prepare' (step 6 above) on the top-level aggregator pom, although you don't say explicitly.  I'm not sure if this is the direct cause of your problem, but the <scm> information specified in the 'parent' module in the 'mySecondBranch.zip' file is incorrect.  You have it set to the same URL as the top-level pom.  I can certainly believe that this would "confuse" the release plugin.

{noformat}
mySecondBranch $ mvn help:effective-pom |grep scm
  <scm>
    <developerConnection>scm:svn:svn://wallaby/edhTest2/branches/mySecondBranch</developerConnection>
  </scm>
mySecondBranch $ cd parent
parent $ mvn help:effective-pom |grep scm
  <scm>
    <developerConnection>scm:svn:svn://wallaby/edhTest2/branches/mySecondBranch</developerConnection>
  </scm>
{noformat}

Note that if you change it to be correct, then you will need to add an explicit <scm> section to the helloWorldJar pom as well (currently not present).

> Subversion Tag is incorrect when releasing from a Branch
> --------------------------------------------------------
>
>                 Key: MRELEASE-576
>                 URL: http://jira.codehaus.org/browse/MRELEASE-576
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0
>         Environment: Linux
>            Reporter: Ed Hillmann
>            Priority: Minor
>         Attachments: myBranch.zip, mySecondBranch.zip
>
>
> I've been able to recreate this error using a dummy application.  This is what I've done.
> 1) Created a HelloWorld project, which has a single sub module HelloWorldJar.  HelloWorlJar uses HelloWorld as it's parent.  I first created this on a trunk in a svn repository and committed everything.  
> 2) I used "release:branch" to create a branch.
> 3) Checked out the branch, and on the working copy of the branch I ran "mvn release:prepare".  It worked fine (the tag was constructed correctly).  "mvn release:perform" also worked swimmingly.  I've attached these maven projects in the myBranch.zip file.
> 4) Back on the trunk, I created another branch, named mySecondBranch
> 5) After checking out mySecondBranch, I introduced a new module named parent.  HelloWorldJar was updated to use parent as it's parent (yes, I'm not very creative in the naming department).  Parent was also listed as a module in HelloWorld (in addition to HelloWorldJar).  Everything's committed.  The SCM value is correct (it's the right branch directory).  I've attached the maven projects in the mySecondBranch.zip file.
> 6) When I run "mvn release:prepare", it all builds, but the tag is constructed incorrectly.  Instead of /tags/helloWorld-2.0 pointing to a revision of /branches/mySecondBranch, /tags/helloWorld-2.0 points to /branches.
> 7) {OK, this is wierd}.  When I run "mvn release:perform", it checks out against the tag helloWorld-2.0.  Which checks out the entire branches directory.  Once it's done that (I'm using a test repository), it builds the correct branch (it's building using the correct branch).  I don't know how it's working, but it is.
> So, I guess it's working OK.  I'm not sure how it knows to pick out the correct branch (as it's checking out the full contents of the branch directory).  So it's building it eventually.
> However, for large projects with multiple branches, this will be very slow to check out the entire contents of the branches directory, not to mention use much more disk space than is needed.  If the tag is constructed correctly, it avoids the whole thing.

-- 
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-576) Subversion Tag is incorrect when releasing from a Branch

Posted by "Ed Hillmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227984#action_227984 ] 

Ed Hillmann commented on MRELEASE-576:
--------------------------------------

OK, I've updated the two poms (parent/pom.xml and helloWorldJar/pom.xml) so they each have an SCM declaration that points to their relevant location in the Subversion repository.  And the outcome is the same.  The tag created during the release is the branches directory, not the branched/mySecondBranch subdirectory.  I'll attach a new version of the POMs as I tested them.

> Subversion Tag is incorrect when releasing from a Branch
> --------------------------------------------------------
>
>                 Key: MRELEASE-576
>                 URL: http://jira.codehaus.org/browse/MRELEASE-576
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0
>         Environment: Linux
>            Reporter: Ed Hillmann
>            Priority: Minor
>         Attachments: myBranch.zip, mySecondBranch-v2.zip, mySecondBranch.zip
>
>
> I've been able to recreate this error using a dummy application.  This is what I've done.
> 1) Created a HelloWorld project, which has a single sub module HelloWorldJar.  HelloWorlJar uses HelloWorld as it's parent.  I first created this on a trunk in a svn repository and committed everything.  
> 2) I used "release:branch" to create a branch.
> 3) Checked out the branch, and on the working copy of the branch I ran "mvn release:prepare".  It worked fine (the tag was constructed correctly).  "mvn release:perform" also worked swimmingly.  I've attached these maven projects in the myBranch.zip file.
> 4) Back on the trunk, I created another branch, named mySecondBranch
> 5) After checking out mySecondBranch, I introduced a new module named parent.  HelloWorldJar was updated to use parent as it's parent (yes, I'm not very creative in the naming department).  Parent was also listed as a module in HelloWorld (in addition to HelloWorldJar).  Everything's committed.  The SCM value is correct (it's the right branch directory).  I've attached the maven projects in the mySecondBranch.zip file.
> 6) When I run "mvn release:prepare", it all builds, but the tag is constructed incorrectly.  Instead of /tags/helloWorld-2.0 pointing to a revision of /branches/mySecondBranch, /tags/helloWorld-2.0 points to /branches.
> 7) {OK, this is wierd}.  When I run "mvn release:perform", it checks out against the tag helloWorld-2.0.  Which checks out the entire branches directory.  Once it's done that (I'm using a test repository), it builds the correct branch (it's building using the correct branch).  I don't know how it's working, but it is.
> So, I guess it's working OK.  I'm not sure how it knows to pick out the correct branch (as it's checking out the full contents of the branch directory).  So it's building it eventually.
> However, for large projects with multiple branches, this will be very slow to check out the entire contents of the branches directory, not to mention use much more disk space than is needed.  If the tag is constructed correctly, it avoids the whole thing.

-- 
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-576) Subversion Tag is incorrect when releasing from a Branch

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

Ed Hillmann updated MRELEASE-576:
---------------------------------

    Attachment: mySecondBranch-v2.zip

Second attempt, trying to get each POM to explicitly provide their SCM/developerConnection attribute.

> Subversion Tag is incorrect when releasing from a Branch
> --------------------------------------------------------
>
>                 Key: MRELEASE-576
>                 URL: http://jira.codehaus.org/browse/MRELEASE-576
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0
>         Environment: Linux
>            Reporter: Ed Hillmann
>            Priority: Minor
>         Attachments: myBranch.zip, mySecondBranch-v2.zip, mySecondBranch.zip
>
>
> I've been able to recreate this error using a dummy application.  This is what I've done.
> 1) Created a HelloWorld project, which has a single sub module HelloWorldJar.  HelloWorlJar uses HelloWorld as it's parent.  I first created this on a trunk in a svn repository and committed everything.  
> 2) I used "release:branch" to create a branch.
> 3) Checked out the branch, and on the working copy of the branch I ran "mvn release:prepare".  It worked fine (the tag was constructed correctly).  "mvn release:perform" also worked swimmingly.  I've attached these maven projects in the myBranch.zip file.
> 4) Back on the trunk, I created another branch, named mySecondBranch
> 5) After checking out mySecondBranch, I introduced a new module named parent.  HelloWorldJar was updated to use parent as it's parent (yes, I'm not very creative in the naming department).  Parent was also listed as a module in HelloWorld (in addition to HelloWorldJar).  Everything's committed.  The SCM value is correct (it's the right branch directory).  I've attached the maven projects in the mySecondBranch.zip file.
> 6) When I run "mvn release:prepare", it all builds, but the tag is constructed incorrectly.  Instead of /tags/helloWorld-2.0 pointing to a revision of /branches/mySecondBranch, /tags/helloWorld-2.0 points to /branches.
> 7) {OK, this is wierd}.  When I run "mvn release:perform", it checks out against the tag helloWorld-2.0.  Which checks out the entire branches directory.  Once it's done that (I'm using a test repository), it builds the correct branch (it's building using the correct branch).  I don't know how it's working, but it is.
> So, I guess it's working OK.  I'm not sure how it knows to pick out the correct branch (as it's checking out the full contents of the branch directory).  So it's building it eventually.
> However, for large projects with multiple branches, this will be very slow to check out the entire contents of the branches directory, not to mention use much more disk space than is needed.  If the tag is constructed correctly, it avoids the whole thing.

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