mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
remove duplicate variable
This commit is contained in:
1 parent
30e37c2e24
commit
d5e56bb599
1 file changed
+6
-9
@@ -477,7 +477,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
listener.getLogger().println("Found mavenVersion " + mavenVersion + " from file " + mavenInformation.getVersionResourcePath());
|
||||
|
||||
if(!project.isAggregatorStyleBuild()) {
|
||||
parsePoms(listener, logger, envVars, mvn, getModuleRoot().getRemote());
|
||||
parsePoms(listener, logger, envVars, mvn);
|
||||
// start module builds
|
||||
logger.println("Triggering "+project.getRootModule().getModuleName());
|
||||
project.getRootModule().scheduleBuild(new UpstreamCause((Run<?,?>)MavenModuleSetBuild.this));
|
||||
@@ -502,7 +502,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
if(!preBuild(listener, project.getPublishers()))
|
||||
return Result.FAILURE;
|
||||
|
||||
parsePoms(listener, logger, envVars, mvn,getModuleRoot().getRemote()); // #5428 : do pre-build *before* parsing pom
|
||||
parsePoms(listener, logger, envVars, mvn); // #5428 : do pre-build *before* parsing pom
|
||||
SplittableBuildListener slistener = new SplittableBuildListener(listener);
|
||||
proxies = new HashMap<ModuleName, ProxyImpl2>();
|
||||
List<String> changedModules = new ArrayList<String>();
|
||||
@@ -661,12 +661,12 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
}
|
||||
}
|
||||
|
||||
private void parsePoms(BuildListener listener, PrintStream logger, EnvVars envVars, MavenInstallation mvn, String workspacePath) throws IOException, InterruptedException {
|
||||
private void parsePoms(BuildListener listener, PrintStream logger, EnvVars envVars, MavenInstallation mvn) throws IOException, InterruptedException {
|
||||
logger.println("Parsing POMs");
|
||||
|
||||
List<PomInfo> poms;
|
||||
try {
|
||||
poms = getModuleRoot().act(new PomParser(listener, mvn, project, workspacePath));
|
||||
poms = getModuleRoot().act(new PomParser(listener, mvn, project));
|
||||
} catch (IOException e) {
|
||||
if (e.getCause() instanceof AbortException)
|
||||
throw (AbortException) e.getCause();
|
||||
@@ -966,8 +966,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
private final boolean nonRecursive;
|
||||
// We're called against the module root, not the workspace, which can cause a lot of confusion.
|
||||
private final String workspaceProper;
|
||||
private String workspacePath;
|
||||
public PomParser(BuildListener listener, MavenInstallation mavenHome, MavenModuleSet project, String workspacePath) {
|
||||
public PomParser(BuildListener listener, MavenInstallation mavenHome, MavenModuleSet project) {
|
||||
// project cannot be shipped to the remote JVM, so all the relevant properties need to be captured now.
|
||||
this.listener = listener;
|
||||
this.mavenHome = mavenHome;
|
||||
@@ -982,8 +981,6 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
this.privateRepository = null;
|
||||
}
|
||||
this.alternateSettings = project.getAlternateSettings();
|
||||
this.workspacePath = FilenameUtils.normalize( workspacePath );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1105,7 +1102,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
|
||||
private void toPomInfo(MavenProject mp, PomInfo parent, Map<String,MavenProject> abslPath, Set<PomInfo> infos) throws IOException {
|
||||
String absolutePath = FilenameUtils.normalize( mp.getBasedir().getAbsolutePath());
|
||||
String relPath = StringUtils.removeStart( absolutePath, this.workspacePath );
|
||||
String relPath = StringUtils.removeStart( absolutePath, this.workspaceProper );
|
||||
|
||||
relPath = StringUtils.remove( relPath, '/' );
|
||||
|
||||
|
||||
Reference in new issue
Block a user