Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #318 from jyrkiput/master
Fix for JENKINS-11825
Thanks
  • Loading branch information
olamy committed Nov 25, 2011
2 parents e10ddf6 + 142a7bb commit 334ff7c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
Expand Up @@ -927,7 +927,7 @@ private void parsePoms(BuildListener listener, PrintStream logger, EnvVars envVa

List<PomInfo> poms;
try {
poms = getModuleRoot().act(new PomParser(listener, mvn, project, mavenVersion, envVars));
poms = getModuleRoot().act(new PomParser(listener, mvn, project, mavenVersion, envVars, getWorkspace()));
} catch (IOException e) {
if (project.isIncrementalBuild()) {
// If POM parsing failed we should do a full build next time.
Expand Down Expand Up @@ -1091,7 +1091,7 @@ private static final class PomParser implements FileCallable<List<PomInfo>> {

String rootPOMRelPrefix;

public PomParser(BuildListener listener, MavenInstallation mavenHome, MavenModuleSet project,String mavenVersion,EnvVars envVars) {
public PomParser(BuildListener listener, MavenInstallation mavenHome, MavenModuleSet project, String mavenVersion, EnvVars envVars, FilePath workspace) {
// project cannot be shipped to the remote JVM, so all the relevant properties need to be captured now.
this.listener = listener;
this.mavenHome = mavenHome;
Expand All @@ -1116,9 +1116,11 @@ public PomParser(BuildListener listener, MavenInstallation mavenHome, MavenModul
}

this.nonRecursive = project.isNonRecursive();
this.workspaceProper = project.getLastBuild().getWorkspace().getRemote();

this.workspaceProper = workspace.getRemote();
LOGGER.fine("Workspace is " + workspaceProper);
if (project.usesPrivateRepository()) {
this.privateRepository = project.getLastBuild().getWorkspace().child(".repository").getRemote();
this.privateRepository = workspace.child(".repository").getRemote();
} else {
this.privateRepository = null;
}
Expand All @@ -1130,7 +1132,7 @@ public PomParser(BuildListener listener, MavenInstallation mavenHome, MavenModul
this.processPlugins = project.isProcessPlugins();

this.moduleRootPath =
project.getScm().getModuleRoot( project.getLastBuild().getWorkspace(), project.getLastBuild() ).getRemote();
project.getScm().getModuleRoot( workspace, project.getLastBuild() ).getRemote();

this.mavenValidationLevel = project.getMavenValidationLevel();
this.globalSetings = project.globalSettingConfigPath;
Expand Down

0 comments on commit 334ff7c

Please sign in to comment.