don't call getGoalsAndOptions() twice

This commit is contained in:
imod committed 2011-11-23 16:16:53 +01:00
1 parent 025cfd311a
commit 79e7b21c85
1 file changed
+3 -2
@@ -760,8 +760,9 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
// find the correct maven goals and options, there might by an action overruling the defaults
String goals = project.getGoals(); // default
for (MavenArgumentInterceptorAction mavenArgInterceptor : argInterceptors) {
if(StringUtils.isNotBlank(mavenArgInterceptor.getGoalsAndOptions())){
goals = mavenArgInterceptor.getGoalsAndOptions();
final String goalsAndOptions = mavenArgInterceptor.getGoalsAndOptions();
if(StringUtils.isNotBlank(goalsAndOptions)){
goals = goalsAndOptions;
// only one interceptor is allowed to overwrite the whole "goals and options" string
break;
}