Skip to content

Commit dc63b85

Browse files
author
Matt Cheely
committed
Make GPG plugin run only when build is triggerd by release plugin.
1 parent e74ab7b commit dc63b85

1 file changed

Lines changed: 30 additions & 13 deletions

File tree

pom.xml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,36 @@
6868
<encoding>UTF-8</encoding>
6969
</configuration>
7070
</plugin>
71-
<plugin>
72-
<groupId>org.apache.maven.plugins</groupId>
73-
<artifactId>maven-gpg-plugin</artifactId>
74-
<executions>
75-
<execution>
76-
<id>sign-artifacts</id>
77-
<phase>verify</phase>
78-
<goals>
79-
<goal>sign</goal>
80-
</goals>
81-
</execution>
82-
</executions>
83-
</plugin>
8471
</plugins>
8572
</build>
73+
74+
<profiles>
75+
<profile>
76+
<id>release-sign-artifacts</id>
77+
<activation>
78+
<property>
79+
<name>performRelease</name>
80+
<value>true</value>
81+
</property>
82+
</activation>
83+
<build>
84+
<plugins>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-gpg-plugin</artifactId>
88+
<version>1.4</version>
89+
<executions>
90+
<execution>
91+
<id>sign-artifacts</id>
92+
<phase>verify</phase>
93+
<goals>
94+
<goal>sign</goal>
95+
</goals>
96+
</execution>
97+
</executions>
98+
</plugin>
99+
</plugins>
100+
</build>
101+
</profile>
102+
</profiles>
86103
</project>

0 commit comments

Comments
 (0)