/** * Does the command line argument processing for modern and adds * the files to compile as well. * @return the command line */ protected Commandline setupModernJavacCommand() { final Commandline cmd = new Commandline(); setupModernJavacCommandlineSwitches(cmd); logAndAddFilesToCompile(cmd); return cmd; }
/** * Does the command line argument processing for classic and adds * the files to compile as well. * @param debugLevelCheck if true set the debug level with the -g switch * @return the command line */ protected Commandline setupJavacCommand(final boolean debugLevelCheck) { final Commandline cmd = new Commandline(); setupJavacCommandlineSwitches(cmd, debugLevelCheck); logAndAddFilesToCompile(cmd); return cmd; }
/** * Splits the task into setting up the command line switches * @param args the native 2 ascii arguments. * @param srcFile the source file. * @param destFile the destination file. * @return run if the conversion was successful. * @throws BuildException if there is a problem. * (delegated to {@link #setup setup}), adding the file names * (delegated to {@link #addFiles addFiles}) and running the tool * (delegated to {@link #run run}). */ @Override public final boolean convert(Native2Ascii args, File srcFile, File destFile) throws BuildException { Commandline cmd = new Commandline(); setup(cmd, args); addFiles(cmd, args, srcFile, destFile); return run(cmd, args); }
/** * check the file given by getFile(). */ private void doit() { Commandline commandLine = new Commandline(); // build the command line from what we got the format is // ccm co /t .. files // as specified in the CCM.EXE help commandLine.setExecutable(getCcmCommand()); commandLine.createArgument().setValue(getCcmAction()); checkOptions(commandLine); int result = run(commandLine); if (Execute.isFailure(result)) { throw new BuildException("Failed executing: " + commandLine, getLocation()); } }
/** * Executes the task. * <p> * Builds a command line to execute ccm and then calls Exec's run method * to execute the command line. * </p> * @throws BuildException on error */ @Override public void execute() throws BuildException { Commandline commandLine = new Commandline(); // build the command line from what we got the format // as specified in the CCM.EXE help commandLine.setExecutable(getCcmCommand()); commandLine.createArgument().setValue(getCcmAction()); checkOptions(commandLine); int result = run(commandLine); if (Execute.isFailure(result)) { throw new BuildException("Failed executing: " + commandLine, getLocation()); } }
Commandline commandLine = new Commandline(); Commandline commandLine2 = new Commandline(); commandLine2.setExecutable(getCcmCommand()); commandLine2.createArgument().setValue(COMMAND_DEFAULT_TASK);
/** * Check to see if the element is checked out in the current view. */ private boolean lsCheckout() { Commandline cmdl = new Commandline(); // build the command line from what we got the format is // cleartool lsco [options...] [viewpath ...] // as specified in the CLEARTOOL.EXE help cmdl.setExecutable(getClearToolCommand()); cmdl.createArgument().setValue(COMMAND_LSCO); cmdl.createArgument().setValue("-cview"); cmdl.createArgument().setValue("-short"); cmdl.createArgument().setValue("-d"); // viewpath cmdl.createArgument().setValue(getViewPath()); String result = runS(cmdl); return result != null && !result.isEmpty(); }
Commandline commandLine = new Commandline(); Project aProj = getProject();
/** * Executes the task. * <p> * Builds a command line to execute cleartool and then calls Exec's run method * to execute the command line. * @throws BuildException if the command fails and failonerr is set to true */ @Override public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); // Default the viewpath to basedir if it is not specified if (getViewPath() == null) { setViewPath(aProj.getBaseDir().getPath()); } // build the command line from what we got. the format is // cleartool checkin [options...] [viewpath ...] // as specified in the CLEARTOOL.EXE help commandLine.setExecutable(getClearToolCommand()); commandLine.createArgument().setValue(COMMAND_CHECKIN); checkOptions(commandLine); if (!getFailOnErr()) { getProject().log("Ignoring any errors that occur for: " + getViewPathBasename(), Project.MSG_VERBOSE); } int result = run(commandLine); if (Execute.isFailure(result) && getFailOnErr()) { throw new BuildException("Failed executing: " + commandLine, getLocation()); } }
Commandline commandLine = new Commandline(); Project aProj = getProject();
Commandline commandLine = new Commandline(); Project aProj = getProject();
Commandline commandLine = new Commandline(); Project aProj = getProject();
/** * Builds a command line to execute ss. * @return The constructed commandline. */ protected Commandline buildCmdLine() { Commandline commandLine = new Commandline(); // first off, make sure that we've got a command and a vssdir ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; throw new BuildException(msg, getLocation()); } // build the command line from what we got the format is // ss CP VSS items [-H] [-I-] [-Y] [-?] // as specified in the SS.EXE help commandLine.setExecutable(getSSCommand()); commandLine.createArgument().setValue(COMMAND_CP); // VSS items commandLine.createArgument().setValue(getVsspath()); // -I- or -I-Y or -I-N commandLine.createArgument().setValue(getAutoresponse()); // -Y commandLine.createArgument().setValue(getLogin()); return commandLine; }
Commandline commandLine = new Commandline(); Project aProj = getProject();
/** * Builds a command line to execute ss. * @return The constructed commandline. */ Commandline buildCmdLine() { Commandline commandLine = new Commandline(); // first off, make sure that we've got a command and a vssdir... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; throw new BuildException(msg, getLocation()); } // build the command line from what we got // the format is: // ss Create VSS items [-C] [-H] [-I-] [-N] [-O] [-S] [-Y] [-?] // as specified in the SS.EXE help commandLine.setExecutable(getSSCommand()); commandLine.createArgument().setValue(COMMAND_CREATE); // VSS items commandLine.createArgument().setValue(getVsspath()); // -C commandLine.createArgument().setValue(getComment()); // -I- or -I-Y or -I-N commandLine.createArgument().setValue(getAutoresponse()); // -O- commandLine.createArgument().setValue(getQuiet()); // -Y commandLine.createArgument().setValue(getLogin()); return commandLine; }
/** * Performs a compile using the Javac externally. * @return true if the compilation succeeded * @throws BuildException on error */ @Override public boolean execute() throws BuildException { attributes.log("Using external javac compiler", Project.MSG_VERBOSE); Commandline cmd = new Commandline(); cmd.setExecutable(getJavac().getJavacExecutable()); if (!assumeJava11() && !assumeJava12()) { setupModernJavacCommandlineSwitches(cmd); } else { setupJavacCommandlineSwitches(cmd, true); } int firstFileName = assumeJava11() ? -1 : cmd.size(); logAndAddFilesToCompile(cmd); //On VMS platform, we need to create a special java options file //containing the arguments and classpath for the javac command. //The special file is supported by the "-V" switch on the VMS JVM. if (Os.isFamily("openvms")) { return execOnVMS(cmd, firstFileName); } return executeExternalCompile(cmd.getCommandline(), firstFileName, true) == 0; }
/** * Builds a command line to execute ss. * @return The constructed commandline. */ protected Commandline buildCmdLine() { Commandline commandLine = new Commandline(); // first off, make sure that we've got a command and a localPath ... if (getLocalpath() == null) { String msg = "localPath attribute must be set!"; throw new BuildException(msg, getLocation()); } // build the command line from what we got the format is // ss Add VSS items [-B] [-C] [-D-] [-H] [-I-] [-K] [-N] [-O] [-R] [-W] [-Y] [-?] // as specified in the SS.EXE help commandLine.setExecutable(getSSCommand()); commandLine.createArgument().setValue(COMMAND_ADD); // VSS items commandLine.createArgument().setValue(getLocalpath()); // -I- or -I-Y or -I-N commandLine.createArgument().setValue(getAutoresponse()); // -R commandLine.createArgument().setValue(getRecursive()); // -W commandLine.createArgument().setValue(getWritable()); // -Y commandLine.createArgument().setValue(getLogin()); // -C commandLine.createArgument().setValue(getComment()); return commandLine; }
Commandline commandLine = new Commandline();
private Commandline setupKaffehCommand(Javah javah) { Commandline cmd = new Commandline(); cmd.setExecutable(JavaEnvUtils.getJdkExecutable("kaffeh")); if (javah.getDestdir() != null) { cmd.createArgument().setValue("-d"); cmd.createArgument().setFile(javah.getDestdir()); } if (javah.getOutputfile() != null) { cmd.createArgument().setValue("-o"); cmd.createArgument().setFile(javah.getOutputfile()); } Path cp = new Path(javah.getProject()); if (javah.getBootclasspath() != null) { cp.append(javah.getBootclasspath()); } cp = cp.concatSystemBootClasspath("ignore"); if (javah.getClasspath() != null) { cp.append(javah.getClasspath()); } if (cp.size() > 0) { cmd.createArgument().setValue("-classpath"); cmd.createArgument().setPath(cp); } if (!javah.getOld()) { cmd.createArgument().setValue("-jni"); } cmd.addArguments(javah.getCurrentArgs()); javah.logAndAddFiles(cmd); return cmd; }
private Commandline setupGcjhCommand(Javah javah) { Commandline cmd = new Commandline(); cmd.setExecutable(JavaEnvUtils.getJdkExecutable("gcjh")); if (javah.getDestdir() != null) { cmd.createArgument().setValue("-d"); cmd.createArgument().setFile(javah.getDestdir()); } if (javah.getOutputfile() != null) { cmd.createArgument().setValue("-o"); cmd.createArgument().setFile(javah.getOutputfile()); } Path cp = new Path(javah.getProject()); if (javah.getBootclasspath() != null) { cp.append(javah.getBootclasspath()); } cp = cp.concatSystemBootClasspath("ignore"); if (javah.getClasspath() != null) { cp.append(javah.getClasspath()); } if (cp.size() > 0) { cmd.createArgument().setValue("--classpath"); cmd.createArgument().setPath(cp); } if (!javah.getOld()) { cmd.createArgument().setValue("-jni"); } cmd.addArguments(javah.getCurrentArgs()); javah.logAndAddFiles(cmd); return cmd; }