Skip to content

Commit f459468

Browse files
authored
- switch to 'central-publishing-maven-plugin' (#7)
- use '@{project.version}' as tag format - added profile for github actions gpg signing - updated plugin versions - updated ignores
1 parent e3d4344 commit f459468

File tree

2 files changed

+39
-27
lines changed

2 files changed

+39
-27
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
.project
2-
.settings
1+
.DS_Store
32
.README.md.html
3+
44
pom.xml.releaseBackup
55
release.properties
6+
67
target/

pom.xml

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>io.dangernoodle</groupId>
77
<artifactId>dangernoodle-io-org-pom</artifactId>
8-
<version>13-SNAPSHOT</version>
8+
<version>0.1.0-SNAPSHOT</version>
99
<packaging>pom</packaging>
1010

1111
<name>${project.artifactId}</name>
@@ -16,11 +16,11 @@
1616
<!--
1717
plugins defined here are required by all projects
1818
-->
19+
<central-publishing-maven-plugin.version>0.5.0</central-publishing-maven-plugin.version>
1920
<maven-deploy-plugin.version>${maven-install-plugin.version}</maven-deploy-plugin.version>
20-
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
21-
<maven-install-plugin.version>3.1.0</maven-install-plugin.version>
22-
<maven-release-plugin.version>3.0.0-M7</maven-release-plugin.version>
23-
<nexus-staging-plugin.version>1.6.13</nexus-staging-plugin.version>
21+
<maven-gpg-plugin.version>3.2.5</maven-gpg-plugin.version>
22+
<maven-install-plugin.version>3.1.3</maven-install-plugin.version>
23+
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
2424
</properties>
2525

2626
<build>
@@ -55,18 +55,21 @@
5555
<artifactId>maven-release-plugin</artifactId>
5656
<version>${maven-release-plugin.version}</version>
5757
<configuration>
58-
<useReleaseProfile>false</useReleaseProfile>
5958
<releaseProfiles>release</releaseProfiles>
59+
<tagNameFormat>@{project.version}</tagNameFormat>
60+
<useReleaseProfile>false</useReleaseProfile>
6061
</configuration>
6162
</plugin>
6263
<plugin>
63-
<groupId>org.sonatype.plugins</groupId>
64-
<artifactId>nexus-staging-maven-plugin</artifactId>
65-
<version>${nexus-staging-plugin.version}</version>
64+
<groupId>org.sonatype.central</groupId>
65+
<artifactId>central-publishing-maven-plugin</artifactId>
66+
<version>${central-publishing-maven-plugin.version}</version>
6667
<extensions>true</extensions>
6768
<configuration>
68-
<serverId>ossrh</serverId>
69-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
69+
<deploymentName>${project.artifactId}-${project.version}</deploymentName>
70+
<publishingServerId>central</publishingServerId>
71+
<autoPublish>true</autoPublish>
72+
<waitUntil>published</waitUntil>
7073
</configuration>
7174
</plugin>
7275
</plugins>
@@ -77,7 +80,7 @@
7780
<connection>scm:git:git@github.com/dangernoodle-io/dangernoodle-io-org-pom.git</connection>
7881
<developerConnection>scm:git:git@github.com:dangernoodle-io/dangernoodle-io-org-pom.git</developerConnection>
7982
<url>https://github.com/dangernoodle-io/dangernoodle-io-org-pom</url>
80-
<tag>HEAD</tag>
83+
<tag>dangernoodle-io-org-pom-13</tag>
8184
</scm>
8285

8386
<organization>
@@ -105,18 +108,26 @@
105108
<url>https://github.com/dangernoodle-io/dangernoodle-io-org-pom/issues</url>
106109
</issueManagement>
107110

108-
<distributionManagement>
109-
<snapshotRepository>
110-
<id>ossrh</id>
111-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
112-
</snapshotRepository>
113-
<repository>
114-
<id>ossrh</id>
115-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
116-
</repository>
117-
</distributionManagement>
118-
119111
<profiles>
112+
<profile>
113+
<id>github</id>
114+
<activation>
115+
<property>
116+
<name>MAVEN_GPG_PASSPHRASE</name>
117+
</property>
118+
</activation>
119+
<build>
120+
<plugins>
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-gpg-plugin</artifactId>
124+
<configuration>
125+
<signer>bc</signer>
126+
</configuration>
127+
</plugin>
128+
</plugins>
129+
</build>
130+
</profile>
120131
<profile>
121132
<id>release</id>
122133
<build>
@@ -126,8 +137,8 @@
126137
<artifactId>maven-gpg-plugin</artifactId>
127138
</plugin>
128139
<plugin>
129-
<groupId>org.sonatype.plugins</groupId>
130-
<artifactId>nexus-staging-maven-plugin</artifactId>
140+
<groupId>org.sonatype.central</groupId>
141+
<artifactId>central-publishing-maven-plugin</artifactId>
131142
</plugin>
132143
</plugins>
133144
</build>

0 commit comments

Comments
 (0)