|
|
|
Augh! CVS not allowing logins again....
Below are corrections for the issues Jerome found (in case a committer is trying to apply this patch before CVS behaves again) change configxml.html, line 3368 from: <td>projectFile</td> to: <td>pomfile</td> cruisecontrol.bat, line 74 from: set CRUISE_PATH=%CRUISE_PATH%;%DISTDIR%\cruisecontrol.jar;%LIBDIR%\log4j.jar;%LIBDIR%\jdom.jar;%LIBDIR%\ant\ant.jar;%LIBDIR%\ant\ant-launcher.jar;%LIBDIR%\xercesImpl-2.7.0.jar;%LIBDIR%\xml-apis-2.7.0.jar;%LIBDIR%\xmlrpc-2.0.1.jar;%LIBDIR%\xalan-2.6.0.jar;%LIBDIR%\jakarta-oro-2.0.3.jar;%LIBDIR%\mail.jar;%LIBDIR%\junit.jar;%LIBDIR%\activation.jar;%LIBDIR%\commons-net-1.1.0.jar;%LIBDIR%\starteam-sdk.jar;%LIBDIR%\mx4j.jar;%LIBDIR%\mx4j-tools.jar;%LIBDIR%\mx4j-remote.jar;%LIBDIR%\smack.jar;%LIBDIR%\comm.jar;%LIBDIR%\x10.jar;%LIBDIR%\fast-md5.jar;. to: set CRUISE_PATH=%CRUISE_PATH%;%DISTDIR%\cruisecontrol.jar;%LIBDIR%\log4j.jar;%LIBDIR%\jdom.jar;%LIBDIR%\ant\ant.jar;%LIBDIR%\ant\ant-launcher.jar;%LIBDIR%\xercesImpl-2.7.0.jar;%LIBDIR%\xml-apis-2.7.0.jar;%LIBDIR%\xmlrpc-2.0.1.jar;%LIBDIR%\xalan-2.6.0.jar;%LIBDIR%\jakarta-oro-2.0.3.jar;%LIBDIR%\mail.jar;%LIBDIR%\junit.jar;%LIBDIR%\activation.jar;%LIBDIR%\commons-net-1.1.0.jar;%LIBDIR%\starteam-sdk.jar;%LIBDIR%\mx4j.jar;%LIBDIR%\mx4j-tools.jar;%LIBDIR%\mx4j-remote.jar;%LIBDIR%\smack.jar;$LIBDIR/maven-embedder-2.0.3-dep.jar;%LIBDIR%\comm.jar;%LIBDIR%\x10.jar;%LIBDIR%\fast-md5.jar;. cruisecontrol.sh, line 76 from: CRUISE_PATH=$JAVA_HOME/lib/tools.jar:$DISTDIR/cruisecontrol.jar:$LIBDIR/log4j.jar:$LIBDIR/jdom.jar:$LIBDIR/ant/ant.jar:$LIBDIR/ant/ant-launcher.jar:$LIBDIR/xercesImpl-2.7.0.jar:$LIBDIR/xml-apis-2.7.0.jar:$LIBDIR/xmlrpc-2.0.1.jar:$LIBDIR/xalan-2.6.0.jar:$LIBDIR/jakarta-oro-2.0.3.jar:$LIBDIR/mail.jar:$LIBDIR/junit.jar:$LIBDIR/activation.jar:$LIBDIR/commons-net-1.1.0.jar:$LIBDIR/starteam-sdk.jar:$LIBDIR/mx4j.jar:$LIBDIR/mx4j-tools.jar:$LIBDIR/mx4j-remote.jar:$LIBDIR/smack.jar:$LIBDIR/comm.jar:$LIBDIR/x10.jar:$LIBDIR/fast-md5.jar:. to: CRUISE_PATH=$JAVA_HOME/lib/tools.jar:$DISTDIR/cruisecontrol.jar:$LIBDIR/log4j.jar:$LIBDIR/jdom.jar:$LIBDIR/ant/ant.jar:$LIBDIR/ant/ant-launcher.jar:$LIBDIR/xercesImpl-2.7.0.jar:$LIBDIR/xml-apis-2.7.0.jar:$LIBDIR/xmlrpc-2.0.1.jar:$LIBDIR/xalan-2.6.0.jar:$LIBDIR/jakarta-oro-2.0.3.jar:$LIBDIR/mail.jar:$LIBDIR/junit.jar:$LIBDIR/activation.jar:$LIBDIR/commons-net-1.1.0.jar:$LIBDIR/starteam-sdk.jar:$LIBDIR/mx4j.jar:$LIBDIR/mx4j-tools.jar:$LIBDIR/mx4j-remote.jar:$LIBDIR/smack.jar:$LIBDIR/maven-embedder-2.0.3-dep.jar:$LIBDIR/comm.jar:$LIBDIR/x10.jar:$LIBDIR/fast-md5.jar:. (Just added "$LIBDIR/maven-embedder-2.0.3-dep.jar", though we should really use v2.0.4 now that it's released - which also means using that version of the jar - instead of the one I posted). The same additions should be made the to cruisecontrol.bat/.sh scripts in the contrib/distributed dir. (In fact, that's why I missed the script changes - I've been running using CCDist. ;) Finally, I'd like to add some more debugging output as suggested by Jerome, but w/ CVS down, here's some minimal changes - to be applied after the existing patch...subversion is really sounding good right about now. ;) Maven2SnapshotDependency.java, line 235, from: LOG.warn("We should not need this approach to finding artifact files."); to: LOG.warn("We should not need this approach to finding artifact files. Artifact: " + artifact); add at line 433: LOG.debug("Examining artifact: " + artifact); add at line 476: LOG.debug("Manually examining artifact: " + artifact); add at line 532: LOG.debug("Checking artifact: " + artifactInfo.getArtifact()); Dan PS: Jerome, I haven't dug into the "multi-project" question yet. Augh! CVS is still not letting me in.
BTW, I botched the DOS cruise_path in my prior comment (forgot to convert $LIBDIR/maven-embedder-2.0.4-dep.jar: to %LIBDIR%\maven-embedder-2.0.4-dep.jar; A couple more fixes: 1. Add at line 223 (a toString() method to inner class ArtifactInfo): public String toString() { return artifact + "," + artifactType + "," + (localRepoFile != null ? localRepoFile.getAbsolutePath() : null); } 2. Also, Jerome found some redundant logic. The corrected method at line 334 (after item 1 above is inserted) is: private static void findParentSnapshotArtifacts(MavenProject projectWithDependencies, List artifactInfos, File localRepoBaseDir, MavenEmbedder embedder, File pomFile) { // handle parents and grandparents... if (projectWithDependencies != null) { Artifact parentArtifact; MavenProject currMvnProject = projectWithDependencies; while ((parentArtifact = currMvnProject.getParentArtifact()) != null && parentArtifact.isSnapshot()) { addArtifactInfo(artifactInfos, parentArtifact, ArtifactInfo.ART_TYPE_PARENT, localRepoBaseDir); currMvnProject = projectWithDependencies.getParent(); } } else { // couldn't read project, so try to do some stuff manually MavenProject mavenProject = null; try { mavenProject = embedder.readProject(pomFile); } catch (ProjectBuildingException e) { LOG.error("Failed to read maven2 mavenProject", e); } if (mavenProject != null) { Artifact artifact; MavenProject currMvnProject = mavenProject; while ((artifact = currMvnProject.getParentArtifact()) != null && (artifact.getVersion().endsWith(Artifact.SNAPSHOT_VERSION) || artifact.isSnapshot()) ) { addArtifactInfo(artifactInfos, artifact, ArtifactInfo.ART_TYPE_PARENT, localRepoBaseDir); resolveArtifact(embedder, artifact, mavenProject, embedder.getLocalRepository()); currMvnProject = mavenProject.getParent(); } } } } Dan (subversion) ;) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- I may have spotted an issue with the doc: the pomfile argument in the config.xml is it seems named projectfile