Skip to content

Commit e598e21

Browse files
committed
Migrate to Maven Central Portal Publisher API
1 parent 40192db commit e598e21

File tree

3 files changed

+15
-26
lines changed

3 files changed

+15
-26
lines changed

.github/workflows/maven.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
path: target/surefire-reports
8383

8484
deploy:
85-
name: Deploy to OSSRH
85+
name: Deploy to Central Portal
8686
needs: [build, compatibility-checks]
8787
if: github.event_name == 'push'
8888
runs-on: ubuntu-latest
@@ -98,9 +98,9 @@ jobs:
9898
# Java version 8 required due to https://github.com/lmdbjava/lmdbjava/issues/116
9999
java-version: 8
100100
cache: maven
101-
server-id: ossrh
102-
server-username: MAVEN_USERNAME
103-
server-password: MAVEN_CENTRAL_TOKEN
101+
server-id: central
102+
server-username: MAVEN_CENTRAL_USERNAME
103+
server-password: MAVEN_CENTRAL_PASSWORD
104104
gpg-private-key: ${{ secrets.gpg_private_key }}
105105
gpg-passphrase: MAVEN_GPG_PASSPHRASE
106106

@@ -111,15 +111,15 @@ jobs:
111111
run: ./cross-compile.sh
112112

113113
- name: Publish Maven package
114-
run: mvn -B -Possrh-deploy deploy -DskipTests
114+
run: mvn -B -Pcentral-deploy deploy -DskipTests
115115
env:
116116
MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}
117-
MAVEN_USERNAME: ${{ secrets.nexus_username }}
118-
MAVEN_CENTRAL_TOKEN: ${{ secrets.nexus_password }}
117+
MAVEN_CENTRAL_USERNAME: ${{ secrets.central_username }}
118+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.central_password }}
119119

120120
- name: Debug settings.xml
121121
uses: actions/upload-artifact@v4
122122
if: failure()
123123
with:
124124
name: settings.xml
125-
path: $HOME/.m2/settings.xml
125+
path: ~/.m2/settings.xml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Low latency design (allocation-free; buffer pools; optional checks can be easily disabled in production etc)
3232
* Mature code (commenced in 2016) and used for heavy production workloads (eg > 500 TB of HFT data)
3333
* Actively maintained and with a "Zero Bug Policy" before every release (see [issues](https://github.com/lmdbjava/lmdbjava/issues))
34-
* Available from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.lmdbjava%22%20AND%20a%3A%22lmdbjava%22) and [OSS Sonatype Snapshots](https://oss.sonatype.org/content/repositories/snapshots/org/lmdbjava/lmdbjava)
34+
* Available from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.lmdbjava%22%20AND%20a%3A%22lmdbjava%22) and [Central Portal Snapshots](https://central.sonatype.com/repository/maven-snapshots/org/lmdbjava/lmdbjava)
3535
* [Continuous integration](https://github.com/lmdbjava/lmdbjava/actions) testing on Linux, Windows and macOS with Java 8, 11, 17 and 21
3636

3737
### Performance

pom.xml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -378,16 +378,6 @@
378378
<system>GitHub Actions</system>
379379
<url>https://github.com/lmdbjava/lmdbjava/actions</url>
380380
</ciManagement>
381-
<distributionManagement>
382-
<repository>
383-
<id>ossrh</id>
384-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
385-
</repository>
386-
<snapshotRepository>
387-
<id>ossrh</id>
388-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
389-
</snapshotRepository>
390-
</distributionManagement>
391381
<profiles>
392382
<profile>
393383
<id>add-opens-on-java-9-and-above</id>
@@ -458,7 +448,7 @@
458448
</build>
459449
</profile>
460450
<profile>
461-
<id>ossrh-deploy</id>
451+
<id>central-deploy</id>
462452
<build>
463453
<plugins>
464454
<plugin>
@@ -482,14 +472,13 @@
482472
</executions>
483473
</plugin>
484474
<plugin>
485-
<groupId>org.sonatype.plugins</groupId>
486-
<artifactId>nexus-staging-maven-plugin</artifactId>
487-
<version>1.7.0</version>
475+
<groupId>org.sonatype.central</groupId>
476+
<artifactId>central-publishing-maven-plugin</artifactId>
477+
<version>0.9.0</version>
488478
<extensions>true</extensions>
489479
<configuration>
490-
<serverId>ossrh</serverId>
491-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
492-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
480+
<publishingServerId>central</publishingServerId>
481+
<autoPublish>true</autoPublish>
493482
</configuration>
494483
</plugin>
495484
</plugins>

0 commit comments

Comments
 (0)