Package org.codehaus.plexus.util.cli

Examples of org.codehaus.plexus.util.cli.Commandline.addArguments()


        command.addArguments(new String[]{"-jar", stopJar.getAbsolutePath()});
       
        //add the boot properties argument if it is specified
        if(alternateBoot != null) {
            this.checkFile(alternateBoot);
            command.addArguments(new String[]{alternateBoot.getAbsolutePath()});
        }
       
        //launch
        try {
            LogStreamConsumer l = new LogStreamConsumer();
View Full Code Here


        //prepare the java command
        Commandline command = new Commandline();
        String javaCmd = System.getProperty("java.home") + File.separator +
                "bin" + File.separator + "java";
        command.setExecutable(javaCmd);
        command.addArguments(new String[]{"-jar", bootJar.getAbsolutePath()});
       
        //add the boot properties argument if it is specified
        if(alternateBoot != null) {
            this.checkFile(alternateBoot);
            command.addArguments(new String[]{alternateBoot.getAbsolutePath()});
View Full Code Here

        command.addArguments(new String[]{"-jar", bootJar.getAbsolutePath()});
       
        //add the boot properties argument if it is specified
        if(alternateBoot != null) {
            this.checkFile(alternateBoot);
            command.addArguments(new String[]{alternateBoot.getAbsolutePath()});
        }
       
        //launch
        try {
            LogStreamConsumer l = new LogStreamConsumer();
View Full Code Here

            cmd.createArg().setValue(file.getAbsolutePath());

        } catch (Exception e1) {
            throw new MojoExecutionException("Could not create runtime jar", e1);
        }
        cmd.addArguments(args);

        StreamConsumer out = new StreamConsumer() {
            public void consumeLine(String line) {
                getLog().info(line);
            }
View Full Code Here

            } catch (IOException e) {
                getLog().debug(e);
                throw new MojoExecutionException(e.getMessage(), e);
            }

            cmd.addArguments(args.toArray(new String[args.size()]));

            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            CommandLineUtils.StringStreamConsumer out = new CommandLineUtils.StringStreamConsumer();

            int exitCode;
View Full Code Here

    public int compile() throws CommandLineException {

        for (File thriftFile : thriftFiles) {
            Commandline cl = new Commandline();
            cl.setExecutable(executable);
            cl.addArguments(buildThriftCommand(thriftFile).toArray(new String[]{}));
            final int result = CommandLineUtils.executeCommandLine(cl, null, output, error);

            if (result != 0) {
                return result;
            }
View Full Code Here

    static Commandline buildCmd( File workingDir, String[] cmdAndArgs )
        throws ScmException
    {
        Commandline cmd = new Commandline();
        cmd.setExecutable( HgCommandConstants.EXEC );
        cmd.addArguments( cmdAndArgs );
        if ( workingDir != null )
        {
            cmd.setWorkingDirectory( workingDir.getAbsolutePath() );

            if ( !workingDir.exists() )
View Full Code Here

    // ----------------------------------------------------------------------

    public static Commandline createCommandLine( GitScmProviderRepository repository, ScmFileSet fileSet )
    {
        Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "status" );
        cl.addArguments( new String[] { "--porcelain", "." } );
        return cl;
    }
   
    public static Commandline createRevparseShowToplevelCommand( ScmFileSet fileSet )
    {
View Full Code Here

    }
   
    public static Commandline createRevparseShowToplevelCommand( ScmFileSet fileSet )
    {
        Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "rev-parse" );
        cl.addArguments( new String[] { "--show-toplevel" } );
        return cl;
    }
}
View Full Code Here

        throws ScmException
    {
        Commandline cmd = new Commandline();
        cmd.setExecutable( BazaarConstants.EXEC );
        cmd.setWorkingDirectory( workingDir.getAbsolutePath() );
        cmd.addArguments( cmdAndArgs );

        if ( !workingDir.exists() )
        {
            boolean success = workingDir.mkdirs();
            if ( !success )
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.