[FIXED JENKINS-8525] NPE during in parsing POMs for Multi Module Build

This commit is contained in:
Olivier Lamy committed 2011-02-21 22:11:09 +01:00
1 parent 12a0e85a30
commit be09ca67a6
1 file changed
+4 -2
@@ -1209,9 +1209,11 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
private void toPomInfo(MavenProject mp, PomInfo parent, Map<String,MavenProject> abslPath, Set<PomInfo> infos) throws IOException {
String relPath = PathTool.getRelativeFilePath( this.moduleRootPath, mp.getBasedir().getPath() );
//PathTool.getRelativeFilePath( this.workspaceProper, mp.getBasedir().getPath() );
relPath = FilenameUtils.normalize( relPath );
// JENKINS-8525 FilenameUtils.normalize for ../foo returns null
if (!StringUtils.startsWith( relPath, "../" )) {
relPath = FilenameUtils.normalize( relPath );
}
if (parent == null ) {
relPath = getRootPath(rootPOMRelPrefix);
}