提交 fa2f77ec 编写于 作者: K kohsuke

[HUDSON-1454] Improved the CLI option parsing to recognize "-Px,y,z" as...

[HUDSON-1454] Improved the CLI option parsing to recognize "-Px,y,z" as profiles. This will be in 1.283.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15165 71c3de6d-444a-0410-be80-ed276b4c234a
上级 8288bd5b
......@@ -490,14 +490,23 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
* return the configured profiles. Otherwise null.
*/
public String getProfiles() {
StringBuilder buf = new StringBuilder();
boolean switchFound=false;
for (String t : Util.tokenize(getGoals())) {
if(switchFound)
return t;
if(switchFound) {
buf.append(',').append(t);
switchFound = false;
}
if(t.equals("-P"))
switchFound=true;
else
if(t.startsWith("-P")) {
// -Px,y,z
buf.append(',').append(t.substring(2));
}
}
return null;
if(buf.length()==0) return null;
return buf.substring(1);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册