private void createNewArgs(String txt) throws IOException { final String[] args = cmdline.getCommandline(); // Temporary file - delete on exit, create (assured unique name). final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true); final String[] commandline = new String[args.length + 1]; ResourceGroovyMethods.write(tempFile, txt); commandline[0] = tempFile.getCanonicalPath(); System.arraycopy(args, 0, commandline, 1, args.length); super.clearArgs(); for (String arg : commandline) { final Commandline.Argument argument = super.createArg(); argument.setValue(arg); } }
helperTask.clearArgs();
/** * {@inheritDoc} */ public void configureJava(final Java task) { task.clearArgs(); task.setClassname(ADMIN_CLASS); task.createArg().setValue("-start"); }
private void createNewArgs(String txt) throws IOException { final String[] args = cmdline.getCommandline(); final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true); final String[] commandline = new String[args.length + 1]; DefaultGroovyMethods.write(tempFile, txt); commandline[0] = tempFile.getCanonicalPath(); System.arraycopy(args, 0, commandline, 1, args.length); super.clearArgs(); for (int i = 0; i < commandline.length; i++) { final Commandline.Argument argument = super.createArg(); argument.setValue(commandline[i]); } }
private void createNewArgs(String txt) throws IOException { final String[] args = cmdline.getCommandline(); // Temporary file - delete on exit, create (assured unique name). final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true); final String[] commandline = new String[args.length + 1]; DefaultGroovyMethods.write(tempFile, txt); commandline[0] = tempFile.getCanonicalPath(); System.arraycopy(args, 0, commandline, 1, args.length); super.clearArgs(); for (String arg : commandline) { final Commandline.Argument argument = super.createArg(); argument.setValue(arg); } }
private void createNewArgs(String txt) throws IOException { final String[] args = cmdline.getCommandline(); // Temporary file - delete on exit, create (assured unique name). final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true); final String[] commandline = new String[args.length + 1]; DefaultGroovyMethods.write(tempFile, txt); commandline[0] = tempFile.getCanonicalPath(); System.arraycopy(args, 0, commandline, 1, args.length); super.clearArgs(); for (String arg : commandline) { final Commandline.Argument argument = super.createArg(); argument.setValue(arg); } }
private void createNewArgs(String txt) throws IOException { final String[] args = cmdline.getCommandline(); // Temporary file - delete on exit, create (assured unique name). final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true); final String[] commandline = new String[args.length + 1]; DefaultGroovyMethods.write(tempFile, txt); commandline[0] = tempFile.getCanonicalPath(); System.arraycopy(args, 0, commandline, 1, args.length); super.clearArgs(); for (int i = 0; i < commandline.length; i++) { final Commandline.Argument argument = super.createArg(); argument.setValue(commandline[i]); } }
private void createNewArgs(String txt) throws IOException { final String[] args = cmdline.getCommandline(); // Temporary file - delete on exit, create (assured unique name). final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true); final String[] commandline = new String[args.length + 1]; ResourceGroovyMethods.write(tempFile, txt); commandline[0] = tempFile.getCanonicalPath(); System.arraycopy(args, 0, commandline, 1, args.length); super.clearArgs(); for (String arg : commandline) { final Commandline.Argument argument = super.createArg(); argument.setValue(arg); } }
/** Convert a DTD to its XML representation. */ private void convertFile(File fromFile, File toFile) { toFile.getParentFile().mkdirs(); setClassname("xni.Writer"); //setLogError(true); try { Class cls = getClass(); Method method = cls.getMethod("setLogError", new Class[]{boolean.class}); method.invoke(this, new Object[]{Boolean.TRUE}); } catch (Exception e) { // older version of Ant, so ignore } createArg().setLine("-p"); createArg().setLine("org.cyberneko.dtd.DTDConfiguration"); createArg().setLine(fromFile.getPath()); setOutput(toFile); setFork(true); // if we don't do this, the output stream isn't reset super.execute(); clearArgs(); }
java.clearArgs(); java.setClassname("com.ibm.as400.data.ProgramCallDocument"); java.setClasspath(classpath_);
getJvm().setFork(fork); getJvm().setFailonerror(false); getJvm().clearArgs();