maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Venisse (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MRELEASE-131) release:prepare failed in 'cvs ... commit' phase for multi-module build
Date Wed, 21 Mar 2007 20:43:38 GMT

     [ http://jira.codehaus.org/browse/MRELEASE-131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Venisse closed MRELEASE-131.
-------------------------------------

      Assignee: Emmanuel Venisse
    Resolution: Fixed

Fixed in Maven-SCM

> 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
>          Components: scm
>    Affects Versions: 2.0-beta-4
>         Environment: redhat linux, cvs 1.11.17, maven 2.0.4
>            Reporter: Hung Le
>         Assigned To: Emmanuel Venisse
>             Fix For: 2.0-beta-5
>
>
> 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:
>         // hle@comergent.com
>         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

        

Mime
View raw message