Permalink
Browse files

Merge pull request #480 from IanKemp/master

[JENKINS-13822] fix
Thanks
  • Loading branch information...
2 parents 6e58e07 + 4e8775f commit ec9d403c63131206d9ca4a77c4c90ffb190129d8 @olamy olamy committed May 22, 2012
View
14 maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
@@ -799,20 +799,22 @@ public MavenInstallation inferMavenInstallation() {
final Set<ResourceActivity> activities = new HashSet<ResourceActivity>();
activities.addAll(super.getResourceActivities());
- activities.addAll(Util.filter(publishers,ResourceActivity.class));
+ activities.addAll(Util.filter(publishers, ResourceActivity.class));
activities.addAll(Util.filter(buildWrappers, ResourceActivity.class));
- activities.addAll(Util.filter(prebuilders,ResourceActivity.class));
- activities.addAll(Util.filter(postbuilders,ResourceActivity.class));
+ activities.addAll(Util.filter(prebuilders, ResourceActivity.class));
+ activities.addAll(Util.filter(postbuilders, ResourceActivity.class));
return activities;
}
/**
* Gets the location of top-level <tt>pom.xml</tt> relative to the workspace root.
*/
- public String getRootPOM() {
- if(rootPOM==null) return "pom.xml";
- return rootPOM;
+ public String getRootPOM(EnvVars env) {
+ if (rootPOM == null) return "pom.xml";
+ // JENKINS-13822
+ if (env == null) return rootPOM;
+ return env.expand(rootPOM);
}
public void setRootPOM(String rootPOM) {
View
5 maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
@@ -688,7 +688,7 @@ protected Result doRun(final BuildListener listener) throws Exception {
// choice of module root ('ws' in this method) is somewhat arbitrary
// when multiple CVS/SVN modules are checked out, so also check
// the path against the workspace root if that seems like what the user meant (see issue #1293)
- String rootPOM = project.getRootPOM();
+ String rootPOM = project.getRootPOM(envVars); // JENKINS-13822
FilePath pom = getModuleRoot().child(rootPOM);
FilePath parentLoc = getWorkspace().child(rootPOM);
if(!pom.exists() && parentLoc.exists())
@@ -1078,7 +1078,7 @@ public PomParser(BuildListener listener, MavenInstallation mavenHome, String mav
MavenModuleSet project = build.getProject();
this.listener = listener;
this.mavenHome = mavenHome;
- this.rootPOM = project.getRootPOM();
+ this.rootPOM = project.getRootPOM(envVars); // JENKINS-13822
this.profiles = project.getProfiles();
this.properties = project.getMavenProperties();
this.updateSnapshots = isUpdateSnapshots(project.getGoals());
@@ -1123,7 +1123,6 @@ public PomParser(BuildListener listener, MavenInstallation mavenHome, String mav
this.globalSetings = project.globalSettingConfigPath;
}
-
private boolean isUpdateSnapshots(String goals) {
return StringUtils.contains(goals, "-U") || StringUtils.contains(goals, "--update-snapshots");
}

0 comments on commit ec9d403

Please sign in to comment.