builder.trace(cmd); final Process process = Runtime.getRuntime().exec(cmd); Thread t = new Thread() {
public Resource process(String source) { Map<Instruction, Map<String, String>> make = getMakeHeader(); builder.trace("make " + source); for (Map.Entry<Instruction, Map<String, String>> entry : make .entrySet()) { Instruction instr = entry.getKey(); Matcher m = instr.getMatcher(source); if (m.matches() || instr.isNegated()) { Map<String, String> arguments = replace(m, entry.getValue()); List<MakePlugin> plugins = builder.getPlugins(MakePlugin.class); for (MakePlugin plugin : plugins) { try { Resource resource = plugin.make(builder, source, arguments); if (resource != null) { builder.trace("Made " + source + " from args " + arguments + " with " + plugin); return resource; } } catch (Exception e) { builder.error("Plugin " + plugin + " generates error when use in making " + source + " with args " + arguments, e); } } } } return null; }
public Resource process(String source) { Map<Instruction, Map<String, String>> make = getMakeHeader(); builder.trace("make " + source); for (Map.Entry<Instruction, Map<String, String>> entry : make .entrySet()) { Instruction instr = (Instruction) entry.getKey(); Matcher m = instr.getMatcher(source); if (m.matches() || instr.isNegated()) { Map<String, String> arguments = replace(m, entry.getValue()); List<MakePlugin> plugins = builder.getPlugins(MakePlugin.class); for (MakePlugin plugin : plugins) { try { Resource resource = plugin.make(builder, source, arguments); if (resource != null) { builder.trace("Made " + source + " from args " + arguments + " with " + plugin); return resource; } } catch (Exception e) { builder.error("Plugin " + plugin + " generates error when use in making " + source + " with args " + arguments, e); } } } } return null; }
/** * Sign the jar file. * * -sign : <alias> [ ';' 'password:=' <password> ] [ ';' 'keystore:=' * <keystore> ] [ ';' 'sign-password:=' <pw> ] ( ',' ... )* * * @return */ void sign(Jar jar) throws Exception { String signing = getProperty("-sign"); if (signing == null) return; trace("Signing %s, with %s", getBsn(), signing); List<SignerPlugin> signers = getPlugins(SignerPlugin.class); Map<String, Map<String, String>> infos = parseHeader(signing); for (Map.Entry<String, Map<String, String>> entry : infos.entrySet()) { for (SignerPlugin signer : signers) { signer.sign(this, entry.getKey()); } } }
/** * Sign the jar file. * * -sign : <alias> [ ';' 'password:=' <password> ] [ ';' 'keystore:=' * <keystore> ] [ ';' 'sign-password:=' <pw> ] ( ',' ... )* * * @return */ void sign(Jar jar) throws Exception { String signing = getProperty("-sign"); if (signing == null) return; trace("Signing %s, with %s", getBsn(), signing); List<SignerPlugin> signers = getPlugins(SignerPlugin.class); Map<String, Map<String, String>> infos = parseHeader(signing); for (Map.Entry<String, Map<String, String>> entry : infos.entrySet()) { for (SignerPlugin signer : signers) { signer.sign(this, entry.getKey()); } } }