Package org.codehaus.plexus.util.cli

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


        cmdLine.setExecutable(jvmBinary);
        if (argLine != null) {
            cmdLine.createArg().setLine(argLine.replace("\n", " ").replace("\r", " "));
        }
        try {
            cmdLine.addEnvironment("CLASSPATH", getPluginClasspath());
        }
        catch (Exception ex) {
            throw new MavenReportException("Could not determine the classpath of the plugin", ex);
        }
View Full Code Here


        }
        catch ( Exception e )
        {
            throw new MojoExecutionException( "Can't add system environment variables to mvn command line.", e );
        }
        cl.addEnvironment( "MAVEN_TERMINATE_CMD", "on" );
        cl.setExecutable( "mvn" );
        cl.setWorkingDirectory( determineWorkingDirectoryPath( this.getCheckoutDirectory(),
                                                               relativePathProjectDirectory, goalsDirectory ) );

        if ( this.goals != null )
View Full Code Here

        cl.setExecutable( "svn" );
        try
        {
            cl.addSystemEnvironment();
            cl.addEnvironment( "LC_MESSAGES", "C" );
        }
        catch ( Exception e )
        {
            //Do nothing
        }
View Full Code Here

            Commandline commandline = new Commandline();
            if ( StringUtils.isNotEmpty( path ) )
            {
                executable.append( path ).append( File.separator );
                executable.append( executorConfigurator.getRelativePath() ).append( File.separator );
                commandline.addEnvironment( executorConfigurator.getEnvVar(), path );
            }
            //Installations are env var they must be add if exists
            Map<String, String> environments = getEnvVars( profile );
            // no null check we use a private method just here
            for ( String key : environments.keySet() )
View Full Code Here

            Map<String, String> environments = getEnvVars( profile );
            // no null check we use a private method just here
            for ( String key : environments.keySet() )
            {
                String value = environments.get( key );
                commandline.addEnvironment( key, value );
            }

            executable = executable.append( executorConfigurator.getExecutable() );
            commandline.setExecutable( executable.toString() );
            commandline.addArguments( new String[]{executorConfigurator.getVersionArgument()} );
View Full Code Here

    {
        Commandline cl = new Commandline();

        cl.setPid( idCommand );

        cl.addEnvironment( "MAVEN_TERMINATE_CMD", "on" );

        if ( environments != null && !environments.isEmpty() )
        {
            for ( String key : environments.keySet() )
            {
View Full Code Here

        if ( environments != null && !environments.isEmpty() )
        {
            for ( String key : environments.keySet() )
            {
                String value = environments.get( key );
                cl.addEnvironment( key, value );
            }
        }

        cl.addSystemEnvironment();
View Full Code Here

            if ( env != null )
            {
                for ( Map.Entry<?, ?> entry : env.entrySet() )
                {
                    log.debug( "add env " + (String) entry.getKey() + " with value " + (String) entry.getValue() );
                    cmd.addEnvironment( (String) entry.getKey(), (String) entry.getValue() );
                }
            }
            log.debug( "Execute command :\n" + cmd.toString() );
            int status;
            if ( timeOut > 0 )
View Full Code Here

        catch ( Exception e )
        {
            throw new ScmException( "Can't add system environment.", e );
        }

        command.addEnvironment( "SSDIR", repo.getVssdir() );

        String ssDir = VssCommandLineUtils.getSsDir();

        command.setExecutable( ssDir + VssConstants.SS_EXE );
View Full Code Here

        catch ( Exception e )
        {
            throw new ScmException( "Can't add system environment.", e );
        }

        command.addEnvironment( "SSDIR", repo.getVssdir() );

        String ssDir = VssCommandLineUtils.getSsDir();

        command.setExecutable( ssDir + VssConstants.SS_EXE );
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.