Skip to content

Commit 6ca4b28

Browse files
authored
Merge pull request #221 from xdev-software/develop
Release
2 parents 188004d + 6723a21 commit 6ca4b28

8 files changed

Lines changed: 41 additions & 188 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,22 @@ jobs:
142142
git config --global user.name "GitHub Actions"
143143
git pull
144144
145-
- name: Set up JDK OSSRH
145+
- name: Set up JDK
146146
uses: actions/setup-java@v4
147147
with: # running setup-java again overwrites the settings.xml
148148
java-version: '17'
149149
distribution: 'temurin'
150-
server-id: ossrh
150+
server-id: sonatype-central-portal
151151
server-username: MAVEN_CENTRAL_USERNAME
152152
server-password: MAVEN_CENTRAL_TOKEN
153153
gpg-passphrase: MAVEN_GPG_PASSPHRASE
154154
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
155155

156-
- name: Publish to OSSRH
157-
run: ./mvnw -B deploy -pl "client,server,testcontainers" -am -Possrh -DskipTests
156+
- name: Publish to Central Portal
157+
run: ./mvnw -B deploy -pl "client,server,testcontainers" -am -P publish-sonatype-central-portal -DskipTests
158158
env:
159-
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
160-
MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}
159+
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
160+
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
161161
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
162162

163163
- name: Upload server standalone JAR

.github/workflows/test-deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212

13-
- name: Set up JDK OSSRH
13+
- name: Set up JDK
1414
uses: actions/setup-java@v4
1515
with: # running setup-java again overwrites the settings.xml
1616
distribution: 'temurin'
1717
java-version: '17'
18-
server-id: ossrh
18+
server-id: sonatype-central-portal
1919
server-username: MAVEN_CENTRAL_USERNAME
2020
server-password: MAVEN_CENTRAL_TOKEN
2121
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2222
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2323

24-
- name: Publish to OSSRH
25-
run: ./mvnw -B deploy -pl "client,server,testcontainers" -am -Possrh -DskipTests
24+
- name: Publish to Central Portal
25+
run: ./mvnw -B deploy -pl "client,server,testcontainers" -am -P publish-sonatype-central-portal -DskipTests
2626
env:
27-
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
28-
MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}
27+
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
28+
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
2929
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
3030

3131
- name: Upload server standalone JAR

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ hs_err_pid*
7171
.idea/*
7272
!.idea/saveactions_settings.xml
7373
!.idea/checkstyle-idea.xml
74+
!.idea/externalDependencies.xml
7475

7576
!.idea/inspectionProfiles/
7677
.idea/inspectionProfiles/*

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0.17
2+
* Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155)
3+
* Updated dependencies
4+
15
# 1.0.16
26
* Fix NPE in ``MockServerClientEventBus`` #214 @rongzhou-tomo
37

client/pom.xml

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -49,41 +49,6 @@
4949
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5050
</properties>
5151

52-
<repositories>
53-
<!-- The order of definitions matters. Explicitly defining central here
54-
to make sure it has the highest priority. -->
55-
<repository>
56-
<id>central</id>
57-
<url>https://repo.maven.apache.org/maven2</url>
58-
<snapshots>
59-
<enabled>false</enabled>
60-
</snapshots>
61-
</repository>
62-
</repositories>
63-
64-
<pluginRepositories>
65-
<!-- The order of definitions matters. Explicitly defining central here
66-
to make sure it has the highest priority. -->
67-
<pluginRepository>
68-
<id>central</id>
69-
<url>https://repo.maven.apache.org/maven2</url>
70-
<snapshots>
71-
<enabled>false</enabled>
72-
</snapshots>
73-
</pluginRepository>
74-
</pluginRepositories>
75-
76-
<distributionManagement>
77-
<snapshotRepository>
78-
<id>ossrh</id>
79-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
80-
</snapshotRepository>
81-
<repository>
82-
<id>ossrh</id>
83-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
84-
</repository>
85-
</distributionManagement>
86-
8752
<dependencies>
8853
<dependency>
8954
<groupId>software.xdev.mockserver</groupId>
@@ -184,7 +149,7 @@
184149
</build>
185150
<profiles>
186151
<profile>
187-
<id>ossrh</id>
152+
<id>publish-sonatype-central-portal</id>
188153
<build>
189154
<plugins>
190155
<plugin>
@@ -228,16 +193,13 @@
228193
</plugin>
229194

230195
<plugin>
231-
<groupId>org.sonatype.plugins</groupId>
232-
<artifactId>nexus-staging-maven-plugin</artifactId>
233-
<version>1.7.0</version>
196+
<groupId>org.sonatype.central</groupId>
197+
<artifactId>central-publishing-maven-plugin</artifactId>
198+
<version>0.7.0</version>
234199
<extensions>true</extensions>
235200
<configuration>
236-
<serverId>ossrh</serverId>
237-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
238-
<!-- Sometimes OSSRH is really slow -->
239-
<stagingProgressTimeoutMinutes>30</stagingProgressTimeoutMinutes>
240-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
201+
<publishingServerId>sonatype-central-portal</publishingServerId>
202+
<autoPublish>true</autoPublish>
241203
</configuration>
242204
</plugin>
243205
</plugins>

core/pom.xml

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -49,41 +49,6 @@
4949
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5050
</properties>
5151

52-
<repositories>
53-
<!-- The order of definitions matters. Explicitly defining central here
54-
to make sure it has the highest priority. -->
55-
<repository>
56-
<id>central</id>
57-
<url>https://repo.maven.apache.org/maven2</url>
58-
<snapshots>
59-
<enabled>false</enabled>
60-
</snapshots>
61-
</repository>
62-
</repositories>
63-
64-
<pluginRepositories>
65-
<!-- The order of definitions matters. Explicitly defining central here
66-
to make sure it has the highest priority. -->
67-
<pluginRepository>
68-
<id>central</id>
69-
<url>https://repo.maven.apache.org/maven2</url>
70-
<snapshots>
71-
<enabled>false</enabled>
72-
</snapshots>
73-
</pluginRepository>
74-
</pluginRepositories>
75-
76-
<distributionManagement>
77-
<snapshotRepository>
78-
<id>ossrh</id>
79-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
80-
</snapshotRepository>
81-
<repository>
82-
<id>ossrh</id>
83-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
84-
</repository>
85-
</distributionManagement>
86-
8752
<dependencyManagement>
8853
<dependencies>
8954
<dependency>
@@ -242,7 +207,7 @@
242207
</build>
243208
<profiles>
244209
<profile>
245-
<id>ossrh</id>
210+
<id>publish-sonatype-central-portal</id>
246211
<build>
247212
<plugins>
248213
<plugin>
@@ -286,16 +251,13 @@
286251
</plugin>
287252

288253
<plugin>
289-
<groupId>org.sonatype.plugins</groupId>
290-
<artifactId>nexus-staging-maven-plugin</artifactId>
291-
<version>1.7.0</version>
254+
<groupId>org.sonatype.central</groupId>
255+
<artifactId>central-publishing-maven-plugin</artifactId>
256+
<version>0.7.0</version>
292257
<extensions>true</extensions>
293258
<configuration>
294-
<serverId>ossrh</serverId>
295-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
296-
<!-- Sometimes OSSRH is really slow -->
297-
<stagingProgressTimeoutMinutes>30</stagingProgressTimeoutMinutes>
298-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
259+
<publishingServerId>sonatype-central-portal</publishingServerId>
260+
<autoPublish>true</autoPublish>
299261
</configuration>
300262
</plugin>
301263
</plugins>

server/pom.xml

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -51,41 +51,6 @@
5151
<mainClass>software.xdev.mockserver.cli.Main</mainClass>
5252
</properties>
5353

54-
<repositories>
55-
<!-- The order of definitions matters. Explicitly defining central here
56-
to make sure it has the highest priority. -->
57-
<repository>
58-
<id>central</id>
59-
<url>https://repo.maven.apache.org/maven2</url>
60-
<snapshots>
61-
<enabled>false</enabled>
62-
</snapshots>
63-
</repository>
64-
</repositories>
65-
66-
<pluginRepositories>
67-
<!-- The order of definitions matters. Explicitly defining central here
68-
to make sure it has the highest priority. -->
69-
<pluginRepository>
70-
<id>central</id>
71-
<url>https://repo.maven.apache.org/maven2</url>
72-
<snapshots>
73-
<enabled>false</enabled>
74-
</snapshots>
75-
</pluginRepository>
76-
</pluginRepositories>
77-
78-
<distributionManagement>
79-
<snapshotRepository>
80-
<id>ossrh</id>
81-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
82-
</snapshotRepository>
83-
<repository>
84-
<id>ossrh</id>
85-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
86-
</repository>
87-
</distributionManagement>
88-
8954
<dependencyManagement>
9055
<dependencies>
9156
<dependency>
@@ -251,7 +216,7 @@
251216
</build>
252217
<profiles>
253218
<profile>
254-
<id>ossrh</id>
219+
<id>publish-sonatype-central-portal</id>
255220
<build>
256221
<plugins>
257222
<plugin>
@@ -295,16 +260,13 @@
295260
</plugin>
296261

297262
<plugin>
298-
<groupId>org.sonatype.plugins</groupId>
299-
<artifactId>nexus-staging-maven-plugin</artifactId>
300-
<version>1.7.0</version>
263+
<groupId>org.sonatype.central</groupId>
264+
<artifactId>central-publishing-maven-plugin</artifactId>
265+
<version>0.7.0</version>
301266
<extensions>true</extensions>
302267
<configuration>
303-
<serverId>ossrh</serverId>
304-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
305-
<!-- Sometimes OSSRH is really slow -->
306-
<stagingProgressTimeoutMinutes>30</stagingProgressTimeoutMinutes>
307-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
268+
<publishingServerId>sonatype-central-portal</publishingServerId>
269+
<autoPublish>true</autoPublish>
308270
</configuration>
309271
</plugin>
310272
</plugins>

testcontainers/pom.xml

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -52,41 +52,6 @@
5252
<skipTests>true</skipTests>
5353
</properties>
5454

55-
<repositories>
56-
<!-- The order of definitions matters. Explicitly defining central here
57-
to make sure it has the highest priority. -->
58-
<repository>
59-
<id>central</id>
60-
<url>https://repo.maven.apache.org/maven2</url>
61-
<snapshots>
62-
<enabled>false</enabled>
63-
</snapshots>
64-
</repository>
65-
</repositories>
66-
67-
<pluginRepositories>
68-
<!-- The order of definitions matters. Explicitly defining central here
69-
to make sure it has the highest priority. -->
70-
<pluginRepository>
71-
<id>central</id>
72-
<url>https://repo.maven.apache.org/maven2</url>
73-
<snapshots>
74-
<enabled>false</enabled>
75-
</snapshots>
76-
</pluginRepository>
77-
</pluginRepositories>
78-
79-
<distributionManagement>
80-
<snapshotRepository>
81-
<id>ossrh</id>
82-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
83-
</snapshotRepository>
84-
<repository>
85-
<id>ossrh</id>
86-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
87-
</repository>
88-
</distributionManagement>
89-
9055
<dependencies>
9156
<dependency>
9257
<groupId>org.testcontainers</groupId>
@@ -243,7 +208,7 @@
243208
</properties>
244209
</profile>
245210
<profile>
246-
<id>ossrh</id>
211+
<id>publish-sonatype-central-portal</id>
247212
<build>
248213
<plugins>
249214
<plugin>
@@ -287,16 +252,13 @@
287252
</plugin>
288253

289254
<plugin>
290-
<groupId>org.sonatype.plugins</groupId>
291-
<artifactId>nexus-staging-maven-plugin</artifactId>
292-
<version>1.7.0</version>
255+
<groupId>org.sonatype.central</groupId>
256+
<artifactId>central-publishing-maven-plugin</artifactId>
257+
<version>0.7.0</version>
293258
<extensions>true</extensions>
294259
<configuration>
295-
<serverId>ossrh</serverId>
296-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
297-
<!-- Sometimes OSSRH is really slow -->
298-
<stagingProgressTimeoutMinutes>30</stagingProgressTimeoutMinutes>
299-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
260+
<publishingServerId>sonatype-central-portal</publishingServerId>
261+
<autoPublish>true</autoPublish>
300262
</configuration>
301263
</plugin>
302264
</plugins>

0 commit comments

Comments
 (0)