Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
[maven-release-plugin] copy for tag maven-jarsigner-1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Chemit committed Dec 18, 2013
2 parents d6029f1 + fb86689 commit 0267609
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
11 changes: 11 additions & 0 deletions pom.xml
Expand Up @@ -91,6 +91,17 @@
</dependencies>

<build>
<!-- push back this in maven-shared-components 20 -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.codehaus.plexus</groupId>
Expand Down
30 changes: 16 additions & 14 deletions src/site/apt/index.apt.vm
Expand Up @@ -46,26 +46,26 @@ ${project.name}

+---------

JarSignerSignRequest jarSignerRequest = new JarSignerSignRequest();
jarSignerRequest.setArchive( target );
jarSignerRequest.setKeystore( "src/test/keystore" );
jarSignerRequest.setVerbose( true );
jarSignerRequest.setAlias( "foo_alias" );
jarSignerRequest.setKeypass( "key-passwd" );
jarSignerRequest.setStorepass( "changeit" );
jarSignerRequest.setSignedjar( new File( "target/ssimple.jar" ) );
JarSignerSignRequest request = new JarSignerSignRequest();
request.setArchive( target );
request.setKeystore( "src/test/keystore" );
request.setVerbose( true );
request.setAlias( "foo_alias" );
request.setKeypass( "key-passwd" );
request.setStorepass( "changeit" );
request.setSignedjar( new File( "target/ssimple.jar" ) );

+---------

Now you can use the component to sign your jar:

+---------

JarSignerResult jarSignerResult = jarSigner.execute( jarSignerRequest );
JavaToolResult result = jarSigner.execute( jarSignerRequest );
// control the execution result
jarSignerResult.getExitCode()
result.getExitCode()
// get exception
jarSignerResult.getExecutionException()
result.getExecutionException()

+---------

Expand All @@ -76,17 +76,19 @@ ${project.name}
+----------
JarSignerVerifyRequest request = new JarSignerVerifyRequest();
request.setCerts( true );
request.setKeystore( "src/test/keystore" );
request.setVerbose( true );
request.setAlias( "foo_alias" );
request.setArchive( new File( "target/ssimple.jar" ) );
+----------

Now you can use the component to verify your signe jar:

+----------
JarSignerResult jarSignerResult = jarSigner.execute( request );
JavaToolResult result = jarSigner.execute( request );
// control the execution result
jarSignerResult.getExitCode()
result.getExitCode()
// get exception
jarSignerResult.getExecutionException()
result.getExecutionException()
+----------

0 comments on commit 0267609

Please sign in to comment.