[ http://jira.codehaus.org/browse/MRELEASE-131?page=comments#action_73843 ] 
            
Chris Byrd commented on MRELEASE-131:
-------------------------------------

Here is the logs with the debug stacktrace.   The interesting thing is that the 
code is not even attempting to commit the top level parent pom.  All mvn tasks 
are executed from the top level directory.  It is committing both the children 
poms, and skipping over the parent pom.  All other plugins and goals have 
worked correctly.  I can only guess this is somehow a bug with the release 
plugin.

[INFO] Checking in modified POMs...
[INFO] Executing: cvs -z3 -f -d :pserver:[EMAIL PROTECTED]:D:/cvsrepo -q commit 
-R -F D:\DOCUME~1\xfxc104\LOCALS~1\Temp\scm-commit-message6743.txt pom.xml 
pw-linesheets-core/pom.xml pw-linesheets-webapp/pom.xml
[INFO] Working directory: D:\Documents and Settings\xfxc104\My 
Documents\Dev\workspace\pw-linesheets
[DEBUG] Checking in pw-linesheets-core/pom.xml;
[DEBUG] D:/cvsrepo/pw_linesheets/pw-linesheets-core/pom.xml,v  <--  pom.xml
[DEBUG] new revision: 1.10; previous revision: 1.9
[DEBUG] done
[DEBUG] Checking in pw-linesheets-webapp/pom.xml;
[DEBUG] D:/cvsrepo/pw_linesheets/pw-linesheets-webapp/pom.xml,v  <--  pom.xml
[DEBUG] new revision: 1.9; previous revision: 1.8
[DEBUG] done
[INFO] Tagging release with the label pw_linesheets_1_0...
[INFO] Executing: cvs -z3 -f -d :pserver:[EMAIL PROTECTED]:D:/cvsrepo -q tag -F 
-c pw_linesheets_1_0
[INFO] Working directory: D:\Documents and Settings\xfxc104\My 
Documents\Dev\workspace\pw-linesheets
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The cvs tag command failed.
Command output:
cvs server: pom.xml is locally modified
cvs [server aborted]: correct the above errors first!


> release:prepare failed in 'cvs ... commit' phase for multi-module build
> -----------------------------------------------------------------------
>
>                 Key: MRELEASE-131
>                 URL: http://jira.codehaus.org/browse/MRELEASE-131
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>         Environment: redhat linux, cvs 1.11.17, maven 2.0.4
>            Reporter: Hung Le
>
> I have a multi-module setup
> parent-module
>    child-module-1
>    child-module-2
>    ...
> In CVS, they are peer, to establish the parent-child layout, manually first 
> check out
>   . parent-module (which has only the pom.xml)
>     then 'cd to parent-module' and manually check out each of the child 
> module (using 'cvs co -d outputDir module_name)
> when I use 'release:prepare', Maven2 failed at the 'commit phase'. After 
> playing with the 'cvs commit ...' it appears that changing the order the 
> 'list of modified POM's' gives different results. One that allow an OK 
> 'commit' involves ordering the list of the modified POM's so that the parent 
> POM is first in the list.
> It does look as if this is a cvs-specific issue but if we can do something to 
> help as work-around, that will be great. I did  quick experiment by modifying 
> ScmCommitPhase.java. In method createPomFiles(reactorProjects), sort the list 
> before returning and it did let me complete the release:prepare step:
>         // [EMAIL PROTECTED]
>         System.out.println("preSorted, pomFiles=" + pomFiles);
>         boolean sortPomFiles = true;
>         if (sortPomFiles) {
>             Comparator comp = new Comparator() {
>                 public int compare(Object o1, Object o2) {
>                     File f1 = (File) o1;
>                     File f2 = (File) o2;
>                     String str1 = f1.getAbsolutePath();
>                     String str2 = f2.getAbsolutePath();
>                     int rv = (str1.length() - str2.length());
>                     if (rv == 0) {
>                         rv = f1.compareTo(f2);
>                     }
>                     return rv;
>                 }
>             };
>             Collections.sort(pomFiles, comp);
>         }
>         System.out.println("postSorted, pomFiles=" + pomFiles);

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

        

Reply via email to