Skip to content

Commit 9db971d

Browse files
committed
switch from oss publishing to central-publishing-maven-plugin
1 parent bfbf19d commit 9db971d

File tree

3 files changed

+69
-44
lines changed

3 files changed

+69
-44
lines changed

.bumpversion.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[bumpversion]
2+
current_version = 9.0.2
3+
commit = True
4+
tag = True
5+
tag_name = v{new_version}
6+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
7+
serialize =
8+
{major}.{minor}.{patch}
9+
10+
[bumpversion:file:pom.xml]
11+
search = <version>{current_version}</version>
12+
replace = <version>{new_version}</version>
13+
14+
[bumpversion:file:./pom.xml]
15+
search = <tag>v{current_version}</tag>
16+
replace = <tag>v{new_version}</tag>

.github/ISSUE_TEMPLATE/new_release.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,34 @@ body:
1111
Just submit this as new issue...
1212
value: |
1313
This is the place holder to release the new **6.0.0** version.
14+
1415
Note that the current open tickets should be addressed, before performing a release.
1516
1617
# General scope of the new release:
1718
Fixed some minor things, added some minor features...(full list https://github.com/git-commit-id/git-commit-id-maven-plugin/issues?q=milestone%3A6.0.0).
1819
1920
# Release-Guide
20-
see http://central.sonatype.org/pages/ossrh-guide.html
21-
22-
- [ ] run an actual test with a local installed plugin (using https://github.com/git-commit-id/git-commit-id-maven-debugging)
23-
- [ ] ensure the local maven version is 3.9.0 and newer to avoid MNG-7055
24-
- [ ] verify that ~/.m2/settings.xml exists and contains username/password which is required as per https://central.sonatype.org/publish/publish-maven/#distribution-management-and-authentication
25-
- [ ] `mvn release:prepare`
26-
[INFO] Checking dependencies and plugins for snapshots ...
27-
What is the release version for "Git Commit Id Maven Plugin"? (io.github.git-commit-id:git-commit-id-maven-plugin) 6.0.0: : [ENTER]
28-
What is SCM release tag or label for "Git Commit Id Maven Plugin"? (io.github.git-commit-id:git-commit-id-maven-plugin) git-commit-id-maven-plugin-6.0.0: : **v6.0.0** [ENTER]
29-
What is the new development version for "Git Commit Id Maven Plugin"? (io.github.git-commit-id:git-commit-id-maven-plugin) 6.0.1-SNAPSHOT: : [ENTER]
21+
see
22+
- https://central.sonatype.org/publish/publish-guide
23+
- https://central.sonatype.org/publish/publish-portal-maven/
24+
- (OSSRH was deprecated on June 30, 2025 -- http://central.sonatype.org/pages/ossrh-guide.html)
25+
26+
The release process has changed from the old OSSRH staging to the new Central Portal:
27+
- Option 1: Use the new central-publishing-maven-plugin (recommended for automated releases)
28+
- Option 2: Use the OSSRH Staging API Service (compatibility layer)
3029
30+
- [ ] verify that `~/.m2/settings.xml` exists (https://central.sonatype.org/publish/publish-portal-maven/#credentials)
31+
- contains user token credentials from https://central.sonatype.com/ (generate token at https://central.sonatype.org/publish/generate-portal-token/)
32+
- [ ] Set release version: `bump2version patch --dry-run --verbose`
33+
- [ ] Push changes and tag: `git push origin master --follow-tags`
3134
- [ ] wait for github actions to pass
32-
- [ ] `mvn release:perform`
33-
- (or `mvn clean source:jar javadoc:jar deploy -Pgpg` from the git tag)
34-
- (or `mvn release:perform -Dresume=false`)
35-
- Note: If the uploading of the artifacts fails, ensure that a [`settings.xml`](https://github.com/git-commit-id/git-commit-id-maven-plugin/blob/master/.buildscript/settings.xml) exists under the local `.m2`-Folder
36-
- [ ] then go to https://s01.oss.sonatype.org/ log in there and go to the staging repositories, there will be the plugin, you have to first close and then release it if validation passed.
37-
- [ ] verify plugin is available on (might take some time) https://repo1.maven.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/
38-
- [ ] under [Milestones](https://github.com/git-commit-id/git-commit-id-maven-plugin/milestones) close old milestone
39-
- [ ] under [Milestones](https://github.com/git-commit-id/git-commit-id-maven-plugin/milestones) create new milestone for new version
40-
- [ ] under [Releases](https://github.com/git-commit-id/git-commit-id-maven-plugin/releases) publish Release-Notes
35+
- [ ] `mvn clean deploy -Pgpg`
36+
- [ ] verify plugin is available on (might take some time) https://repo1.maven.org/maven2/io/github/git-commit-id/git-commit-id-plugin-core/
37+
- [ ] Set next development version: `bump2version patch --dry-run --verbose`
38+
- [ ] Push snapshot version: `git push origin master`
39+
- [ ] under [Milestones](https://github.com/git-commit-id/git-commit-id-plugin-core/milestones) close old milestone
40+
- [ ] under [Milestones](https://github.com/git-commit-id/git-commit-id-plugin-core/milestones) create new milestone for new version
41+
- [ ] under [Releases](https://github.com/git-commit-id/git-commit-id-plugin-core/releases) publish Release-Notes
4142
- [ ] update readme to point to the latest version available
42-
- [ ] run performance comparison with previous release (https://gist.github.com/TheSnoozer/7891eb9412c9584a052f00650d9c516b)
43-
4443
validations:
4544
required: true

pom.xml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@
33

44
<modelVersion>4.0.0</modelVersion>
55

6-
<parent>
7-
<groupId>org.sonatype.oss</groupId>
8-
<artifactId>oss-parent</artifactId>
9-
<version>9</version>
10-
<relativePath />
11-
</parent>
12-
136
<groupId>io.github.git-commit-id</groupId>
147
<artifactId>git-commit-id-maven-plugin</artifactId>
158
<packaging>maven-plugin</packaging>
16-
<version>9.0.3-SNAPSHOT</version>
9+
<version>9.0.2</version>
1710
<name>Git Commit Id Maven Plugin</name>
1811
<url>https://github.com/git-commit-id/git-commit-id-maven-plugin</url>
1912
<description>
@@ -23,6 +16,16 @@
2316
developers life easier. See https://github.com/git-commit-id/git-commit-id-maven-plugin
2417
</description>
2518

19+
<developers>
20+
<developer>
21+
<id>git-commit-id</id>
22+
<name>Git Commit ID Community</name>
23+
<email>github@git-commit-id.io</email>
24+
<organization>git-commit-id</organization>
25+
<organizationUrl>https://github.com/git-commit-id</organizationUrl>
26+
</developer>
27+
</developers>
28+
2629
<prerequisites>
2730
<maven>[3.6.3,)</maven>
2831
</prerequisites>
@@ -117,6 +120,9 @@
117120
<groupId>org.apache.maven.plugins</groupId>
118121
<artifactId>maven-release-plugin</artifactId>
119122
<version>3.3.1</version>
123+
<configuration>
124+
<arguments>-Pgpg</arguments>
125+
</configuration>
120126
</plugin>
121127
<plugin>
122128
<groupId>org.apache.maven.plugins</groupId>
@@ -132,6 +138,12 @@
132138
<groupId>org.apache.maven.plugins</groupId>
133139
<artifactId>maven-gpg-plugin</artifactId>
134140
<version>3.2.8</version>
141+
<configuration>
142+
<gpgArguments>
143+
<arg>--pinentry-mode</arg>
144+
<arg>loopback</arg>
145+
</gpgArguments>
146+
</configuration>
135147
</plugin>
136148
<plugin>
137149
<groupId>org.apache.maven.plugins</groupId>
@@ -164,9 +176,9 @@
164176
<version>3.1.4</version>
165177
</plugin>
166178
<plugin>
167-
<groupId>org.apache.maven.plugins</groupId>
168-
<artifactId>maven-deploy-plugin</artifactId>
169-
<version>3.1.4</version>
179+
<groupId>org.sonatype.central</groupId>
180+
<artifactId>central-publishing-maven-plugin</artifactId>
181+
<version>0.10.0</version>
170182
</plugin>
171183
<plugin>
172184
<groupId>org.apache.maven.plugins</groupId>
@@ -187,7 +199,16 @@
187199
</pluginManagement>
188200

189201
<plugins>
190-
<!-- Override oss parent downgrades -->
202+
<plugin>
203+
<groupId>org.sonatype.central</groupId>
204+
<artifactId>central-publishing-maven-plugin</artifactId>
205+
<extensions>true</extensions>
206+
<configuration>
207+
<publishingServerId>central</publishingServerId>
208+
<autoPublish>true</autoPublish>
209+
<waitUntil>published</waitUntil>
210+
</configuration>
211+
</plugin>
191212
<plugin>
192213
<groupId>org.apache.maven.plugins</groupId>
193214
<artifactId>maven-enforcer-plugin</artifactId>
@@ -368,17 +389,6 @@
368389
</dependency>
369390
</dependencies>
370391

371-
<distributionManagement>
372-
<snapshotRepository>
373-
<id>ossrh</id>
374-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
375-
</snapshotRepository>
376-
<repository>
377-
<id>ossrh</id>
378-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
379-
</repository>
380-
</distributionManagement>
381-
382392
<profiles>
383393
<profile>
384394
<id>gpg</id>

0 commit comments

Comments
 (0)