Package org.apache.tools.ant.taskdefs

Examples of org.apache.tools.ant.taskdefs.Execute.execute()


                    final Execute executor = new Execute(); // new LogStreamHandler ( attributes , Project.MSG_INFO , Project.MSG_WARN ) ) ;
                    executor.setAntRun(getProject());
                    executor.setWorkingDirectory(getProject().getBaseDir());
                    executor.setCommandline(commandLine);
                    try {
                        executor.execute();
                    } catch (final IOException ioe) {
                        throw new BuildException("Error running forked groovyc.", ioe);
                    }
                    final int returnCode = executor.getExitValue();
                    if (returnCode != 0) {
View Full Code Here


        if (executingInOtherVM) {
          String s = "already running in other vm?";
          throw new BuildException(s, location);
        }
        executingInOtherVM = true;
        exe.execute();
      } finally {
        executingInOtherVM = false;
      }
      return exe.getExitValue();
    } catch (IOException e) {
View Full Code Here

        checkForkedPath(cmd);

        TestResultHolder result = new TestResultHolder();
        try {
            result.exitCode = execute.execute();
        } catch (IOException e) {
            throw new BuildException("Process fork failed.", e, getLocation());
        } finally {
            String vmCrashString = "unknown";
            BufferedReader br = null;
View Full Code Here

            log(cmdl.describeCommand(), Project.MSG_VERBOSE);
            exec.setCommandline(cmdl.getCommandline());

            // JProbe process always return 0 so  we will not be
            // able to check for failure ! :-(
            int exitValue = exec.execute();
            if (exitValue != 0) {
                throw new BuildException("JProbe Coverage Merging failed (" + exitValue + ")");
            }
        } catch (IOException e) {
            throw new BuildException("Failed to run JProbe Coverage Merge: " + e);
View Full Code Here

      execute.setAntRun(getProject());
      execute.setEnvironment(getEnvironment());
     
      LoggingUtil.log(getCommandLine().describeCommand());
     
      return execute.execute();
   }
  
   public Process launch() throws IOException
   {
      Execute execute = new Execute();
View Full Code Here

      execute.setAntRun(getProject());
      execute.setEnvironment(getEnvironment());
     
      LoggingUtil.log(getCommandLine().describeCommand());
     
      execute.execute();
     
      //By default we use the Ant Execute task which does not give us a handle to a process
      return null;
   }
View Full Code Here

        execute.setWorkingDirectory(new File(jmeterHome.getAbsolutePath() + File.separator + "bin"));
        log(cmd.describeCommand(), Project.MSG_VERBOSE);

        try {
            execute.execute();
        }
        catch (IOException e) {
            throw new BuildException("JMeter execution failed.", e, getLocation());
        }
    }
View Full Code Here

        createBinTask.setCommandline( cmd );
        createBinTask.setSpawn( true );
        createBinTask.setWorkingDirectory( binDirectory );
        try
        {
            createBinTask.execute();
        }
        catch ( IOException e )
        {
            log.error( e.getMessage() );
            throw new MojoFailureException( "Failed while trying to generate the Bin: " + e.getMessage() );
View Full Code Here

                        null);
        log(cmdl.describeCommand(), Project.MSG_VERBOSE);
        process.setCommandline(cmdl.getCommandline());

        try {
            if (process.execute() != 0) {
                throw new BuildException("JJTree failed.");
            }
        } catch (IOException e) {
            throw new BuildException("Failed to launch JJTree", e);
        }
View Full Code Here

        createPkgTask.setCommandline( cmd );
        createPkgTask.setSpawn( true );
        createPkgTask.setWorkingDirectory( pkgDirectory );
        try
        {
            createPkgTask.execute();
        }
        catch ( IOException e )
        {
            log.error( e.getMessage() );
            throw new MojoFailureException( "Failed while trying to generate the PKG: " + e.getMessage() );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.