提交 b28ccbc5 编写于 作者: K kohsuke

modified to use the new convenience method

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13209 71c3de6d-444a-0410-be80-ed276b4c234a
上级 0dd7f1c1
......@@ -151,21 +151,7 @@ public class Ant extends Builder {
if(parameters!=null)
vr = parameters.createVariableResolver(build);
if (properties != null) {
Properties p = new Properties();
try {
p.load(new StringReader(properties));
} catch (NoSuchMethodError e) {
// load(Reader) method is only available on JDK6.
// this fall back version doesn't work correctly with non-ASCII characters,
// but there's no other easy ways out it seems.
p.load(new ByteArrayInputStream(properties.getBytes()));
}
for (Entry<Object,Object> entry : p.entrySet()) {
args.add("-D" + entry.getKey() + "=" + Util.replaceMacro(entry.getValue().toString(),vr));
}
}
args.addKeyValuePairsFromPropertyString("-D",properties,vr);
args.addTokenized(Util.replaceMacro(targets,vr).replaceAll("[\t\r\n]+"," "));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册