Skip to content

Commit b43da53

Browse files
committed
GH-330 - Switch to Maven Central repository hosting.
Switch to new server URL, credentials and Central Publishing Maven Plugin. Adapt CI build.
1 parent dc04eef commit b43da53

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
cache: 'maven'
2525

2626
- name: Build and deploy snapshot
27-
run: ./mvnw -B deploy --file pom.xml -s settings.xml -DossrhUsername=${{ secrets.OSSRH_USERNAME }} -DossrhPassword=${{ secrets.OSSRH_PASSWORD }}
27+
run: ./mvnw -B deploy --file pom.xml -s settings.xml -DcentralOssrhUsername=${{ secrets.CENTRAL_OSSRH_USERNAME }} -DcentralOssrhPassword=${{ secrets.CENTRAL_OSSRH_PASSWORD }}

pom.xml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,12 @@
121121
</configuration>
122122
</plugin>
123123
<plugin>
124-
<groupId>org.sonatype.plugins</groupId>
125-
<artifactId>nexus-staging-maven-plugin</artifactId>
126-
<extensions>true</extensions>
124+
<groupId>org.sonatype.central</groupId>
125+
<artifactId>central-publishing-maven-plugin</artifactId>
127126
<configuration>
128-
<serverId>sonatype-new</serverId>
129-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
130-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
131-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
127+
<deploymentName>jMolecules Integrations ${project.version}</deploymentName>
128+
<publishingServerId>central-ossrh</publishingServerId>
129+
<autoPublish>true</autoPublish>
132130
</configuration>
133131
</plugin>
134132
</plugins>
@@ -245,9 +243,10 @@
245243
<version>${bytebuddy.version}</version>
246244
</plugin>
247245
<plugin>
248-
<groupId>org.sonatype.plugins</groupId>
249-
<artifactId>nexus-staging-maven-plugin</artifactId>
250-
<version>1.7.0</version>
246+
<groupId>org.sonatype.central</groupId>
247+
<artifactId>central-publishing-maven-plugin</artifactId>
248+
<version>0.7.0</version>
249+
<extensions>true</extensions>
251250
</plugin>
252251
</plugins>
253252
</pluginManagement>
@@ -359,20 +358,20 @@
359358
<url>https://github.com/xmolecules/jmolecules-integrations</url>
360359
<connection>scm:git:https://github.com/xmolecules/jmolecules-integrations</connection>
361360
<developerConnection>scm:git:ssh://[email protected]/xmolecules/jmolecules-integrations.git</developerConnection>
362-
<tag>0.10.0</tag>
361+
<tag>HEAD</tag>
363362
</scm>
364363

365364
<distributionManagement>
366365
<snapshotRepository>
367-
<id>ossrh</id>
368-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
366+
<id>central-ossrh</id>
367+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
369368
</snapshotRepository>
370369
</distributionManagement>
371370

372371
<repositories>
373372
<repository>
374-
<id>ossrh</id>
375-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
373+
<id>central-ossrh</id>
374+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
376375
<releases>
377376
<enabled>false</enabled>
378377
</releases>

settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
44
<servers>
55
<server>
6-
<id>ossrh</id>
7-
<username>${ossrhUsername}</username>
8-
<password>${ossrhPassword}</password>
6+
<id>central-ossrh</id>
7+
<username>${centralOssrhUsername}</username>
8+
<password>${centralOssrhPassword}</password>
99
</server>
1010
</servers>
1111
</settings>

0 commit comments

Comments
 (0)