Skip to content

Commit cfddfea

Browse files
committed
Extracted gpg & sonatype release to new maven profile
1 parent 5a5cfe4 commit cfddfea

File tree

1 file changed

+47
-31
lines changed

1 file changed

+47
-31
lines changed

pom.xml

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -121,37 +121,53 @@
121121
</execution>
122122
</executions>
123123
</plugin>
124-
<plugin>
125-
<groupId>org.apache.maven.plugins</groupId>
126-
<artifactId>maven-gpg-plugin</artifactId>
127-
<version>1.5</version>
128-
<executions>
129-
<execution>
130-
<id>sign-artifacts</id>
131-
<phase>verify</phase>
132-
<goals>
133-
<goal>sign</goal>
134-
</goals>
135-
</execution>
136-
</executions>
137-
<configuration>
138-
<gpgArguments>
139-
<arg>--pinentry-mode</arg>
140-
<arg>loopback</arg>
141-
</gpgArguments>
142-
</configuration>
143-
</plugin>
144-
<plugin>
145-
<groupId>org.sonatype.plugins</groupId>
146-
<artifactId>nexus-staging-maven-plugin</artifactId>
147-
<version>1.6.7</version>
148-
<extensions>true</extensions>
149-
<configuration>
150-
<serverId>ossrh</serverId>
151-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
152-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
153-
</configuration>
154-
</plugin>
155124
</plugins>
156125
</build>
126+
127+
<profiles>
128+
<profile>
129+
<id>release-sign-artifacts</id>
130+
<activation>
131+
<property>
132+
<name>performRelease</name>
133+
<value>true</value>
134+
</property>
135+
</activation>
136+
<build>
137+
<plugins>
138+
<plugin>
139+
<groupId>org.apache.maven.plugins</groupId>
140+
<artifactId>maven-gpg-plugin</artifactId>
141+
<version>1.5</version>
142+
<executions>
143+
<execution>
144+
<id>sign-artifacts</id>
145+
<phase>verify</phase>
146+
<goals>
147+
<goal>sign</goal>
148+
</goals>
149+
</execution>
150+
</executions>
151+
<configuration>
152+
<gpgArguments>
153+
<arg>--pinentry-mode</arg>
154+
<arg>loopback</arg>
155+
</gpgArguments>
156+
</configuration>
157+
</plugin>
158+
<plugin>
159+
<groupId>org.sonatype.plugins</groupId>
160+
<artifactId>nexus-staging-maven-plugin</artifactId>
161+
<version>1.6.7</version>
162+
<extensions>true</extensions>
163+
<configuration>
164+
<serverId>ossrh</serverId>
165+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
166+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
167+
</configuration>
168+
</plugin>
169+
</plugins>
170+
</build>
171+
</profile>
172+
</profiles>
157173
</project>

0 commit comments

Comments
 (0)