Skip to content

Commit 65acca3

Browse files
committed
Configure project to publish to Central Portal
OSSRH reaches EOL on June 30th, 2025.
1 parent 264aee4 commit 65acca3

File tree

5 files changed

+29
-132
lines changed

5 files changed

+29
-132
lines changed

.github/workflows/publish-perf-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
distribution: 'zulu'
1616
java-version: '21'
1717
cache: 'maven'
18-
server-id: ossrh
18+
server-id: central
1919
server-username: MAVEN_USERNAME
2020
server-password: MAVEN_PASSWORD
2121
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2222
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2323
- name: Publish snapshot
24-
run: ./mvnw clean deploy -Psnapshots -DskipITs -DskipTests --no-transfer-progress
24+
run: ./mvnw clean deploy -DskipITs -DskipTests --no-transfer-progress
2525
env:
26-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
27-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
26+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
27+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
2828
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
2929
- name: Package Perf Test
3030
run: ci/package-perf-test.sh

.github/workflows/release.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,61 +17,41 @@ jobs:
1717
distribution: 'temurin'
1818
java-version: '11'
1919
cache: 'maven'
20-
server-id: ${{ env.maven_server_id }}
20+
server-id: central
2121
server-username: MAVEN_USERNAME
2222
server-password: MAVEN_PASSWORD
2323
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2424
gpg-passphrase: MAVEN_GPG_PASSPHRASE
25-
- name: Release PerfTest (GA)
26-
if: ${{ env.ga_release == 'true' }}
25+
- name: Release PerfTest
2726
run: |
2827
git config user.name "rabbitmq-ci"
2928
git config user.email "[email protected]"
3029
ci/release-perf-test.sh
3130
env:
32-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
33-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
34-
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
35-
- name: Release PerfTest (Milestone/RC)
36-
if: ${{ env.ga_release != 'true' }}
37-
run: |
38-
git config user.name "rabbitmq-ci"
39-
git config user.email "[email protected]"
40-
ci/release-perf-test.sh
41-
env:
42-
MAVEN_USERNAME: ''
43-
MAVEN_PASSWORD: ${{ secrets.PACKAGECLOUD_TOKEN }}
31+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
32+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
4433
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
4534
- name: Package Perf Test
4635
run: ci/package-perf-test.sh
4736
env:
4837
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
49-
- name: Push to GitHub Release (GA)
38+
- name: Push to GitHub Release
5039
uses: softprops/[email protected]
5140
with:
5241
files: packages/*
5342
name: ${{ env.release_name }}
5443
tag_name: ${{ env.tag_name }}
5544
target_commitish: ${{ env.release_branch }}
56-
prerelease: ${{ env.prerelease }}
45+
prerelease: false
5746
token: ${{ secrets.CI_GITHUB_TOKEN }}
5847
repository: rabbitmq/rabbitmq-perf-test
59-
- name: Trigger Perf Test Docker image build (GA)
48+
- name: Trigger Perf Test Docker image build
6049
uses: peter-evans/repository-dispatch@v3
61-
if: ${{ env.ga_release == 'true' }}
6250
with:
6351
event-type: new_snapshot
6452
client-payload: >-
6553
{"archive_url" : "https://github.com/rabbitmq/rabbitmq-perf-test/releases/download/${{ env.tag_name }}/perf-test-${{ env.release_version}}.jar",
6654
"tags": "pivotalrabbitmq/perf-test:latest,pivotalrabbitmq/perf-test:${{ env.release_version }}"}
67-
- name: Trigger Perf Test Docker image build (Milestone/RC)
68-
uses: peter-evans/repository-dispatch@v3
69-
if: ${{ env.ga_release != 'true' }}
70-
with:
71-
event-type: new_snapshot
72-
client-payload: >-
73-
{"archive_url" : "https://github.com/rabbitmq/rabbitmq-perf-test/releases/download/${{ env.tag_name }}/perf-test-${{ env.release_version}}.jar",
74-
"tags": "pivotalrabbitmq/perf-test:${{ env.release_version }}"}
7555
- name: Generate documentation
7656
run: |
7757
rm -rf target/generated-docs

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
distribution: 'zulu'
1919
java-version: '21'
2020
cache: 'maven'
21-
server-id: ossrh
21+
server-id: central
2222
server-username: MAVEN_USERNAME
2323
server-password: MAVEN_PASSWORD
2424
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
@@ -30,10 +30,10 @@ jobs:
3030
- name: Stop broker
3131
run: docker stop rabbitmq && docker rm rabbitmq
3232
- name: Publish snapshot
33-
run: ./mvnw clean deploy -Psnapshots -DskipITs -DskipTests --no-transfer-progress
33+
run: ./mvnw clean deploy -DskipITs -DskipTests --no-transfer-progress
3434
env:
35-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
36-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
35+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
36+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
3737
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
3838
- name: Package Perf Test
3939
run: ci/package-perf-test.sh

ci/evaluate-release.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

pom.xml

Lines changed: 14 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<maven.surefire.plugin.version>3.5.3</maven.surefire.plugin.version>
8989
<maven.failsafe.plugin.version>3.5.3</maven.failsafe.plugin.version>
9090
<build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
91-
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
91+
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
9292
<checksum.maven.plugin.version>1.11</checksum.maven.plugin.version>
9393
<spring-boot-maven-plugin.version>2.7.18</spring-boot-maven-plugin.version>
9494
<spotless.version>2.44.5</spotless.version>
@@ -480,6 +480,17 @@
480480
</configuration>
481481
</plugin>
482482

483+
<plugin>
484+
<groupId>org.sonatype.central</groupId>
485+
<artifactId>central-publishing-maven-plugin</artifactId>
486+
<version>${central-publishing-maven-plugin.version}</version>
487+
<extensions>true</extensions>
488+
<configuration>
489+
<publishingServerId>central</publishingServerId>
490+
<autoPublish>false</autoPublish>
491+
</configuration>
492+
</plugin>
493+
483494
</plugins>
484495

485496
</build>
@@ -546,85 +557,15 @@
546557
</profile>
547558

548559
<!--
549-
The "release" Maven profile is used to push release artifacts to OSSRH.
560+
The "release" Maven profile is used to push release artifacts to
561+
central portal.
550562
-->
551563
<profile>
552564
<id>release</id>
553565
<properties>
554566
<maven.javadoc.skip>false</maven.javadoc.skip>
555567
<gpg.skip>false</gpg.skip>
556568
</properties>
557-
<build>
558-
<plugins>
559-
560-
<plugin>
561-
<groupId>org.sonatype.plugins</groupId>
562-
<artifactId>nexus-staging-maven-plugin</artifactId>
563-
<version>${nexus-staging-maven-plugin.version}</version>
564-
<extensions>true</extensions>
565-
<configuration>
566-
<serverId>ossrh</serverId>
567-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
568-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
569-
<stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
570-
</configuration>
571-
</plugin>
572-
573-
</plugins>
574-
</build>
575-
<distributionManagement>
576-
<repository>
577-
<id>ossrh</id>
578-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
579-
</repository>
580-
</distributionManagement>
581-
</profile>
582-
583-
<!--
584-
The "milestone" Maven profile is used to push release artifacts to the
585-
PackageCloud Milestones Maven Repository.
586-
-->
587-
<profile>
588-
<id>milestone</id>
589-
<properties>
590-
<maven.javadoc.skip>false</maven.javadoc.skip>
591-
<gpg.skip>false</gpg.skip>
592-
</properties>
593-
<build>
594-
<plugins>
595-
596-
<plugin>
597-
<groupId>net.nicoulaj.maven.plugins</groupId>
598-
<artifactId>checksum-maven-plugin</artifactId>
599-
<version>${checksum.maven.plugin.version}</version>
600-
<executions>
601-
<execution>
602-
<id>sign-artifacts</id>
603-
<phase>package</phase>
604-
<goals>
605-
<goal>files</goal>
606-
</goals>
607-
<configuration>
608-
<fileSets>
609-
<fileSet>
610-
<directory>${project.build.directory}</directory>
611-
<includes>
612-
<include>*.jar</include>
613-
<include>*.pom</include>
614-
</includes>
615-
</fileSet>
616-
</fileSets>
617-
<algorithms>
618-
<algorithm>MD5</algorithm>
619-
<algorithm>SHA-1</algorithm>
620-
</algorithms>
621-
</configuration>
622-
</execution>
623-
</executions>
624-
</plugin>
625-
626-
</plugins>
627-
</build>
628569
</profile>
629570

630571
<profile>
@@ -746,16 +687,6 @@
746687

747688
</profile>
748689

749-
<profile>
750-
<id>snapshots</id>
751-
<distributionManagement>
752-
<snapshotRepository>
753-
<id>ossrh</id>
754-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
755-
</snapshotRepository>
756-
</distributionManagement>
757-
</profile>
758-
759690
</profiles>
760691

761692
</project>

0 commit comments

Comments
 (0)