Skip to content

Commit 1b60a47

Browse files
committed
creating a profile for maven release
1 parent fa0b9ec commit 1b60a47

File tree

2 files changed

+63
-75
lines changed

2 files changed

+63
-75
lines changed

.github/workflows/maven-publish.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

pom.xml

Lines changed: 63 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -195,26 +195,6 @@
195195
</execution>
196196
</executions>
197197
</plugin>
198-
<!-- <plugin>-->
199-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
200-
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
201-
<!-- <version>3.1.0</version>-->
202-
<!-- <executions>-->
203-
<!-- <execution>-->
204-
<!-- <id>sign-artifacts</id>-->
205-
<!-- <phase>verify</phase>-->
206-
<!-- <goals>-->
207-
<!-- <goal>sign</goal>-->
208-
<!-- </goals>-->
209-
<!-- <configuration>-->
210-
<!-- <gpgArguments>-->
211-
<!-- <arg>&#45;&#45;pinentry-mode</arg>-->
212-
<!-- <arg>loopback</arg>-->
213-
<!-- </gpgArguments>-->
214-
<!-- </configuration>-->
215-
<!-- </execution>-->
216-
<!-- </executions>-->
217-
<!-- </plugin>-->
218198
<plugin>
219199
<groupId>org.apache.maven.plugins</groupId>
220200
<artifactId>maven-javadoc-plugin</artifactId>
@@ -241,27 +221,69 @@
241221
</execution>
242222
</executions>
243223
</plugin>
244-
<plugin>
245-
<groupId>org.sonatype.plugins</groupId>
246-
<artifactId>nexus-staging-maven-plugin</artifactId>
247-
<version>1.6.13</version>
248-
<extensions>true</extensions>
249-
<configuration>
250-
<serverId>ossrh</serverId>
251-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
252-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
253-
</configuration>
254-
</plugin>
255224
</plugins>
256225
</build>
257-
<distributionManagement>
258-
<snapshotRepository>
259-
<id>ossrh</id>
260-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
261-
</snapshotRepository>
262-
<repository>
263-
<id>ossrh</id>
264-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
265-
</repository>
266-
</distributionManagement>
226+
227+
<profiles>
228+
<profile>
229+
<id>release</id>
230+
<properties>
231+
<version.maven-release-plugin>3.0.0-M7</version.maven-release-plugin>
232+
<version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
233+
<version.nexus-staging-maven-plugin>1.6.13</version.nexus-staging-maven-plugin>
234+
</properties>
235+
<build>
236+
<pluginManagement>
237+
<plugins>
238+
<plugin>
239+
<artifactId>maven-release-plugin</artifactId>
240+
<version>${version.maven-release-plugin}</version>
241+
<configuration>
242+
<tagNameFormat>@{project.version}</tagNameFormat>
243+
</configuration>
244+
</plugin>
245+
<plugin>
246+
<artifactId>maven-gpg-plugin</artifactId>
247+
<version>${version.maven-gpg-plugin}</version>
248+
<executions>
249+
<execution>
250+
<id>sign-artifacts</id>
251+
<phase>verify</phase>
252+
<goals>
253+
<goal>sign</goal>
254+
</goals>
255+
<configuration>
256+
<gpgArguments>
257+
<arg>--pinentry-mode</arg>
258+
<arg>loopback</arg>
259+
</gpgArguments>
260+
</configuration>
261+
</execution>
262+
</executions>
263+
</plugin>
264+
<plugin>
265+
<groupId>org.sonatype.plugins</groupId>
266+
<artifactId>nexus-staging-maven-plugin</artifactId>
267+
<version>${version.nexus-staging-maven-plugin}</version>
268+
<extensions>true</extensions>
269+
<configuration>
270+
<serverId>ossrh</serverId>
271+
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
272+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
273+
</configuration>
274+
</plugin>
275+
</plugins>
276+
</pluginManagement>
277+
<plugins>
278+
<plugin>
279+
<artifactId>maven-gpg-plugin</artifactId>
280+
</plugin>
281+
<plugin>
282+
<groupId>org.sonatype.plugins</groupId>
283+
<artifactId>nexus-staging-maven-plugin</artifactId>
284+
</plugin>
285+
</plugins>
286+
</build>
287+
</profile>
288+
</profiles>
267289
</project>

0 commit comments

Comments
 (0)