Package org.codehaus.plexus.util.cli

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


        }

        // should check interactive flag, but scpexe never works in interactive mode right now due to i/o streams
        if ( putty )
        {
            cl.createArg().setValue( "-batch" );
        }
        else
        {
            cl.createArg().setValue( "-o" );
            cl.createArg().setValue( "BatchMode yes" );
View Full Code Here


        {
            cl.createArg().setValue( "-batch" );
        }
        else
        {
            cl.createArg().setValue( "-o" );
            cl.createArg().setValue( "BatchMode yes" );
        }
        return cl;
    }
View Full Code Here

            cl.createArg().setValue( "-batch" );
        }
        else
        {
            cl.createArg().setValue( "-o" );
            cl.createArg().setValue( "BatchMode yes" );
        }
        return cl;
    }

View Full Code Here

        int port =
            repository.getPort() == WagonConstants.UNKNOWN_PORT ? ScpHelper.DEFAULT_SSH_PORT : repository.getPort();
        if ( port != ScpHelper.DEFAULT_SSH_PORT )
        {
            cl.createArg().setLine( "-P " + port );
        }

        if ( scpArgs != null )
        {
            cl.createArg().setLine( scpArgs );
View Full Code Here

            cl.createArg().setLine( "-P " + port );
        }

        if ( scpArgs != null )
        {
            cl.createArg().setLine( scpArgs );
        }

        String resourceName = normalizeResource( resource );
        String remoteFile = getRepository().getBasedir() + "/" + resourceName;
View Full Code Here

        remoteFile = StringUtils.replace( remoteFile, " ", "\\ " );

        String qualifiedRemoteFile = this.buildRemoteHost() + ":" + remoteFile;
        if ( put )
        {
            cl.createArg().setValue( localFile.getName() );
            cl.createArg().setValue( qualifiedRemoteFile );
        }
        else
        {
            cl.createArg().setValue( qualifiedRemoteFile );
View Full Code Here

        String qualifiedRemoteFile = this.buildRemoteHost() + ":" + remoteFile;
        if ( put )
        {
            cl.createArg().setValue( localFile.getName() );
            cl.createArg().setValue( qualifiedRemoteFile );
        }
        else
        {
            cl.createArg().setValue( qualifiedRemoteFile );
            cl.createArg().setValue( localFile.getName() );
View Full Code Here

            cl.createArg().setValue( localFile.getName() );
            cl.createArg().setValue( qualifiedRemoteFile );
        }
        else
        {
            cl.createArg().setValue( qualifiedRemoteFile );
            cl.createArg().setValue( localFile.getName() );
        }

        fireSessionDebug( "Executing command: " + cl.toString() );
View Full Code Here

            cl.createArg().setValue( qualifiedRemoteFile );
        }
        else
        {
            cl.createArg().setValue( qualifiedRemoteFile );
            cl.createArg().setValue( localFile.getName() );
        }

        fireSessionDebug( "Executing command: " + cl.toString() );

        try
View Full Code Here

            File sshKeysTarget = new File( "target/ssh-keys" );
            FileUtils.copyDirectory( new File( "src/test/ssh-keys" ), sshKeysTarget );
            // ssh keys need to 700 permissions
            // to prevent WARNING: UNPROTECTED PRIVATE KEY FILE!
            Commandline commandline = new Commandline( "chmod" );
            commandline.createArg().setValue( "-R" );
            commandline.createArg().setValue( "700" );
            commandline.createArg().setValue( sshKeysTarget.getCanonicalPath() );
            CommandLineUtils.StringStreamConsumer out = new CommandLineUtils.StringStreamConsumer();
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( commandline, out, err );
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.