Package org.apache.maven.shared.utils.cli.javatool

Examples of org.apache.maven.shared.utils.cli.javatool.JavaToolResult


        jarSignerRequest.setAlias( "foo_alias" );
        jarSignerRequest.setKeypass( "key-passwd" );
        jarSignerRequest.setStorepass( "changeit" );
        jarSignerRequest.setSignedjar( new File( "target/ssimple.jar" ) );

        JavaToolResult jarSignerResult = jarSigner.execute( jarSignerRequest );

        assertEquals( "not exit code 0 " + jarSignerResult.getExecutionException(), 0, jarSignerResult.getExitCode() );
    }
View Full Code Here


        request.setArchive( new File( "target/ssimple.jar" ) );
        request.setKeystore( "src/test/keystore" );
        request.setAlias( "foo_alias" );
        request.setStorepass( "changeit" );

        JavaToolResult jarSignerResult = jarSigner.execute( request );

        assertEquals( "not exit code 0 " + jarSignerResult.getExecutionException(), 0, jarSignerResult.getExitCode() );
    }
View Full Code Here

        request.setArguments( arguments );
        request.setProtectedAuthenticationPath( protectedAuthenticationPath );

        try
        {
            JavaToolResult result = jarSigner.execute( request );

            Commandline commandLine = result.getCommandline();

            int resultCode = result.getExitCode();

            if ( resultCode != 0 )
            {
                throw new MojoExecutionException(
                    getMessage( "failure", getCommandlineInfo( commandLine ), resultCode) );
View Full Code Here

        // Special handling for passwords through the Maven Security Dispatcher
        request.setStorepass( decrypt( storepass ) );

        try
        {
            JavaToolResult result = jarSigner.execute( request );

            Commandline commandLine = result.getCommandline();

            int resultCode = result.getExitCode();

            if ( resultCode != 0 )
            {
                throw new MojoExecutionException(
                    getMessage( "failure", getCommandlineInfo( commandLine ), resultCode) );
View Full Code Here

        JarSignerSignRequest jarSignerRequest = buildJarSignerRequest( target );

        JarSigner jarSigner = (JarSigner) lookup( JarSigner.class.getName() );

        JavaToolResult jarSignerResult = jarSigner.execute( jarSignerRequest );
        assertEquals( "not exit code 0 " + jarSignerResult.getExecutionException(), 0, jarSignerResult.getExitCode() );


    }
View Full Code Here

        JarSignerSignRequest jarSignerRequest = buildJarSignerRequest( target );

        JarSigner jarSigner = (JarSigner) lookup( JarSigner.class.getName() );

        JavaToolResult jarSignerResult = jarSigner.execute( jarSignerRequest );

        assertEquals( "not exit code 0 " + jarSignerResult.getExecutionException(), 0, jarSignerResult.getExitCode() );

        JarSignerVerifyRequest request = new JarSignerVerifyRequest();
        request.setCerts( true );
        request.setVerbose( true );
        request.setArchive( new File( "target/ssimple.jar" ) );
        request.setKeystore( "src/test/keystore" );
        request.setAlias( "foo_alias" );

        jarSignerResult = jarSigner.execute( request );
        assertEquals( "not exit code 0 " + jarSignerResult.getExecutionException(), 0, jarSignerResult.getExitCode() );

    }
View Full Code Here

        // Special handling for passwords through the Maven Security Dispatcher
        request.setStorepass( decrypt( storepass ) );

        try
        {
            JavaToolResult result = jarSigner.execute( request );

            Commandline commandLine = result.getCommandline();

            int resultCode = result.getExitCode();

            if ( resultCode != 0 )
            {
                throw new MojoExecutionException(
                    getMessage( "failure", getCommandlineInfo( commandLine ), resultCode) );
View Full Code Here

      log("signing: " + this.signing);
      for (final File a : artifacts) {
        final JarSignerRequest request = this.signing.signRequest(this.outputDirectory, a);

        try {
          final JavaToolResult result = this.jarSigner.execute(request);
          final CommandLineException signException = result.getExecutionException();
          final int signExitCode = result.getExitCode();
          if (signException != null) {
            failSignature(signException);
          }
          if (signExitCode > 0) {
            throw new MojoExecutionException("signing returned with exit code: " + signExitCode);
View Full Code Here

TOP

Related Classes of org.apache.maven.shared.utils.cli.javatool.JavaToolResult

Copyright © 2018 www.massapicom. 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.