diff --git a/maven-plugin/src/main/java/hudson/maven/MavenArgumentInterceptorAction.java b/maven-plugin/src/main/java/hudson/maven/MavenArgumentInterceptorAction.java
index bedd1531ec0e03ba37208c2963134a67a5d11a6a..d754e7655d9beaf164145928dab7b79a09812323 100644
--- a/maven-plugin/src/main/java/hudson/maven/MavenArgumentInterceptorAction.java
+++ b/maven-plugin/src/main/java/hudson/maven/MavenArgumentInterceptorAction.java
@@ -45,16 +45,19 @@ public interface MavenArgumentInterceptorAction extends Action {
* This method will be called on one and only one action during a build. If
* there are two actions present in the build, the second will be ignored.
*
+ * @param build
+ * reference to the current build, might be used for some
+ * calculations for the correct arguments
* @return the maven goals and options to start maven with. Result is
* ignored if null
or empty. Variables will be expanded
* by the caller.
*/
- public String getGoalsAndOptions();
+ public String getGoalsAndOptions(MavenModuleSetBuild build);
/**
* Change/add arguments to any needs, but special care has to be taken, as
* the list contains every argument needed for the default execution (e.g.
- * -f /path/to/pom.xml or -B).
+ * -f /path/to/pom.xml
or -B
).
* An easy example would be to add "-DskipTests
" to skip the
* test execution on request.
*
@@ -66,8 +69,11 @@ public interface MavenArgumentInterceptorAction extends Action {
* @param mavenargs
* the calculated default maven arguments (never
* null
).
+ * @param build
+ * reference to the current build, might be used for some
+ * calculations for the correct arguments
* @return the new arguments to be used.
*/
- public ArgumentListBuilder intercept(ArgumentListBuilder mavenargs);
+ public ArgumentListBuilder intercept(ArgumentListBuilder mavenargs, MavenModuleSetBuild build);
}
diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
index 3fbdce0da816e4001a0d02191f86de3885ec9f16..33985e5895002253bb918bcdbe9fb571bc5db198 100644
--- a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
+++ b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
@@ -760,7 +760,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild