Skip to content

Commit

Permalink
pom: add profile to sign artifacts
Browse files Browse the repository at this point in the history
Motivation:
The are many reasons why we should sign our artifacts. The main two are:

  - allow library users to verify who have release the jars
  - maven central accepts only signed artifacts (and this is the goal)

Modification:
Add profile that will be activated by maven release plugin or manually
with `-P sign-artifacts` option.

Result:
produced artifacts will be released.

Acked-by: Jürgen Starek
Target: master, 0.19
  • Loading branch information
kofemann committed Jul 29, 2019
1 parent 0d385e4 commit 56387f7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pom.xml
Expand Up @@ -251,4 +251,37 @@
</snapshotRepository>
</distributionManagement>

<profiles>
<profile>
<id>sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 56387f7

Please sign in to comment.