Skip to content

Commit

Permalink
[FIXED JENKINS-17555] maven should take EnvironmentContributingAction…
Browse files Browse the repository at this point in the history
… into account to resolve variables

Originally-Committed-As: 32b53335c6cdb9971f880db126f763ecbdc46e45
  • Loading branch information
imod committed Jun 4, 2013
1 parent f7e7176 commit ff2c294
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/hudson/maven/MavenModuleSetBuild.java
Expand Up @@ -38,6 +38,7 @@
import hudson.model.Action;
import hudson.model.Build;
import hudson.model.BuildListener;
import hudson.model.EnvironmentContributingAction;
import hudson.model.Cause.UpstreamCause;
import hudson.model.Computer;
import hudson.model.Environment;
Expand Down Expand Up @@ -613,6 +614,12 @@ protected Result doRun(final BuildListener listener) throws Exception {
}
buildEnvironments.add(e);
e.buildEnvVars(envVars); // #3502: too late for getEnvironment to do this
Collection<? extends Action> actionsFromWrapper = w.getProjectActions(project);
for (Action action : actionsFromWrapper) {
if(action instanceof EnvironmentContributingAction){ // #17555
((EnvironmentContributingAction) action).buildEnvVars(MavenModuleSetBuild.this, envVars);
}
}
}

// run pre build steps
Expand Down

0 comments on commit ff2c294

Please sign in to comment.