logo Apache Maven Jarsigner Plugin

Signs or verifies a project artifact and attachments using jarsigner.

homepage: maven.apache.org/plugins
fresh index:
last release: 3 years ago, first release: 8 years ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org




This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
jarsigner:help

Display help information on maven-jarsigner-plugin. Call mvn jarsigner:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

jarsigner:sign (phase: package)

Signs a project artifact and attachments using jarsigner.

jarsigner:verify (phase: verify)

Checks the signatures of a project artifact and attachments using jarsigner.

Often used code snippets:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jarsigner-plugin</artifactId>
  <version>1.2</version>
  <executions>
    <execution>
      <id>sign</id>
      <goals>
        <goal>sign</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <keystore>${atlassian.keystore.location}</keystore>
    <alias>${atlassian.keystore.alias}</alias>
    <storepass>${atlassian.keystore.storepass}</storepass>
  </configuration>
</plugin>
<plugin>
  <artifactId>maven-jarsigner-plugin</artifactId>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>sign</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <storetype>${keystore.type}</storetype>
    <keystore>${keystore.path}</keystore>
    <alias>${keystore.alias}</alias>
    <storepass>${keystore.password}</storepass>
  </configuration>
</plugin>
<plugin>
  <artifactId>maven-jarsigner-plugin</artifactId>
  <version>1.2</version>
  <configuration>
    <alias>${hudson.sign.alias}</alias>
    <storepass>${hudson.sign.storepass}</storepass>
    <keystore>${hudson.sign.keystore}</keystore>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>sign</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jarsigner-plugin</artifactId>
  <executions>
    <execution>
      <id>verify</id>
      <goals>
        <goal>verify</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <verbose>true</verbose>
    <certs>true</certs>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jarsigner-plugin</artifactId>
  <version>1.3.1</version>
  <executions>
    <execution>
      <id>sign</id>
      <goals>
        <goal>sign</goal>
      </goals>
      <configuration>
        <archive>${project.build.directory}/${project.artifactId}-${project.version}-full.jar</archive>
        <archiveDirectory>${project.build.directory}</archiveDirectory>
        <keystore>${basedir}/keystore</keystore>
        <alias>sasc</alias>
        <storepass>storepass</storepass>
        <keypass>keypass</keypass>
        <verbose>false</verbose>
        <certs>true</certs>
      </configuration>
    </execution>
    <execution>
      <id>verify</id>
      <goals>
        <goal>verify</goal>
      </goals>
      <configuration>
        <archive>${project.build.directory}/${project.artifactId}-${project.version}-full.jar</archive>
      </configuration>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2017. All rights reserved. Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení | 4npm - npm search | monitored using: sitemonitoring
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.