Unsigner Plugin for Maven

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.commonjava.maven.plugins
ArtifactId

ArtifactId

unsigner-maven-plugin
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Unsigner Plugin for Maven
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Source Code Management

Source Code Management

http://github.com/jdcasey/unsigner-maven-plugin

Download unsigner-maven-plugin

How to add to project

<plugin>
    <groupId>org.commonjava.maven.plugins</groupId>
    <artifactId>unsigner-maven-plugin</artifactId>
    <version>0.2</version>
</plugin>

Dependencies

provided (2)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar
org.apache.maven : maven-core jar

test (1)

Group / Artifact Type Version
junit : junit jar 4.8.2

Project Modules

There are no modules declared in this project.

Jar Unsigner plugin for Apache Maven

This is a very simple plugin whose only function is to strip signature files out of jars. In addition to the Maven plugin interface, it has a main class, to allow manual processing of jars. The plugin interface can process both the project's main artifact and its attached artifacts (when configured). This is particularly useful when aggregation of dependencies into a project's own jar inadvertently brings in signature files from the dependency. One notable case is in the Apache Felix maven-bundle-plugin, when the <Embed-Dependency/> configuration is used and a dependency has been signed. When a signed dependency's signature files are included in your project's jar, those signature files will not include checksums for your own classes, which will render your artifact unusable.

Basic Usage

<plugin>
  <groupId>org.commonjava.maven.plugins</groupId>
  <artifactId>unsigner-maven-plugin</artifactId>
  <version>0.2</version>
  <executions>
    <execution>
      <id>unsign-jar</id>
      <goals>
        <goal>unsign</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Skipping by Configuration

If you've configured the unsign plugin to run in a parent POM, and you need to disable this function for a given child project, you can provide the following configuration:

<plugin>
  <groupId>org.commonjava.maven.plugins</groupId>
  <artifactId>unsigner-maven-plugin</artifactId>
  <configuration>
    <skip>true</skip>
  </configuration>
</plugin>

Skipping from the Command Line

On the other hand, if you need to skip unsigning from the command line (usually to help in debugging a build, NOT to be used as a permanent part of your build!), you can use the following:

mvn -Dunsign.skip=true ...

Processing Project Attachments

If you want to unsign your project's attached artifacts in addition to the main artifact, you can use the following plugin configuration:

<plugin>
  <groupId>org.commonjava.maven.plugins</groupId>
  <artifactId>unsigner-maven-plugin</artifactId>
  <configuration>
    <processAttachments>true</processAttachments>
  </configuration>
</plugin>

Alternatively, for debugging purposes, you could use the command line parameter:

mvn -Dunsign.processAttachments=true ...

Versions

Version
0.2
0.1