public Map<String,String> parameters = new HashMap<String, String>();
protected int run() throws Exception {
job.checkPermission(Item.BUILD);
ParametersAction a = null;
if (!parameters.isEmpty()) {
ParametersDefinitionProperty pdp = job.getProperty(ParametersDefinitionProperty.class);
if (pdp==null)
throw new AbortException(job.getFullDisplayName()+" is not parameterized but the -p option was specified");
List<ParameterValue> values = new ArrayList<ParameterValue>();
for (Entry<String, String> e : parameters.entrySet()) {
String name = e.getKey();
ParameterDefinition pd = pdp.getParameterDefinition(name);
if (pd==null)
throw new AbortException(String.format("\'%s\' is not a valid parameter. Did you mean %s?",
name, EditDistance.findNearest(name, pdp.getParameterDefinitionNames())));
values.add(pd.createValue(this,e.getValue()));
}
a = new ParametersAction(values);
}
if (checkSCM) {
if (job.poll(new StreamTaskListener(stdout, getClientCharset())).change == Change.NONE) {
return 0;