Skip to content

Commit e533966

Browse files
committed
pom: add profile to sign artifacts
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, 3.1 (cherry picked from commit 6cd0cab) Signed-off-by: Tigran Mkrtchyan <[email protected]>
1 parent 41ab2d3 commit e533966

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,37 @@
322322
</snapshotRepository>
323323
</distributionManagement>
324324

325+
<profiles>
326+
<profile>
327+
<id>sign-artifacts</id>
328+
<activation>
329+
<property>
330+
<name>performRelease</name>
331+
<value>true</value>
332+
</property>
333+
</activation>
334+
<build>
335+
<plugins>
336+
<plugin>
337+
<groupId>org.apache.maven.plugins</groupId>
338+
<artifactId>maven-gpg-plugin</artifactId>
339+
<version>1.6</version>
340+
<configuration>
341+
<passphrase>${gpg.passphrase}</passphrase>
342+
</configuration>
343+
<executions>
344+
<execution>
345+
<id>sign-artifacts</id>
346+
<phase>verify</phase>
347+
<goals>
348+
<goal>sign</goal>
349+
</goals>
350+
</execution>
351+
</executions>
352+
</plugin>
353+
</plugins>
354+
</build>
355+
</profile>
356+
</profiles>
357+
325358
</project>

0 commit comments

Comments
 (0)