提交 951580fb 编写于 作者: O Olivier Lamy

fix some typo regarding token macro in MAVEN_OPTS in maven plugin

上级 d818cd95
......@@ -27,6 +27,7 @@ import hudson.EnvVars;
import hudson.FilePath;
import hudson.maven.agent.AbortException;
import hudson.maven.reporters.SurefireArchiver;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.model.Computer;
import hudson.model.Environment;
......@@ -682,9 +683,9 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
String opts = mms.getMavenOpts();
if (opts == null ) return null;
try {
Class<?> clazz = Class.forName( "org.jenkinsci.plugins.tokenmacro.MacroEvaluationException" );
Class<?> clazz = Class.forName( "org.jenkinsci.plugins.tokenmacro.TokenMacro" );
Method expandMethod =
ReflectionUtils.findMethod(clazz, "expand", new Class[]{ this.getClass(), listener.getClass(), String.class} );
ReflectionUtils.findMethod(clazz, "expand", new Class[]{ AbstractBuild.class, TaskListener.class, String.class} );
opts = (String) expandMethod.invoke( null, this, listener, opts );
//opts = TokenMacro.expand(this, listener, opts);
//} catch (MacroEvaluationException e) {
......
......@@ -35,6 +35,7 @@ import hudson.Util;
import hudson.maven.MavenBuild.ProxyImpl2;
import hudson.maven.reporters.MavenFingerprinter;
import hudson.maven.reporters.MavenMailer;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.Build;
......@@ -526,9 +527,9 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
String opts = project.getMavenOpts();
if (opts == null ) return null;
try {
Class<?> clazz = Class.forName( "org.jenkinsci.plugins.tokenmacro.MacroEvaluationException" );
Class<?> clazz = Class.forName( "org.jenkinsci.plugins.tokenmacro.TokenMacro" );
Method expandMethod =
ReflectionUtils.findMethod(clazz, "expand", new Class[]{ this.getClass(), listener.getClass(), String.class} );
ReflectionUtils.findMethod(clazz, "expand", new Class[]{ AbstractBuild.class, TaskListener.class, String.class} );
opts = (String) expandMethod.invoke( null, this, listener, opts );
//opts = TokenMacro.expand(this, listener, opts);
//} catch (MacroEvaluationException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册