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
Type: Bug
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