Skip to content

Commit 72382db

Browse files
committed
Migrate to Maven Central Publisher Portal
1 parent ed47b7f commit 72382db

File tree

4 files changed

+20
-36
lines changed

4 files changed

+20
-36
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ jobs:
5454
java-version: 8
5555
- name: Publish snapshot artifacts
5656
env:
57-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
58-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
57+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
58+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
5959
run: ./mvnw deploy --batch-mode --errors --activate-profiles generate-docs --settings .github/workflows/settings.xml

.github/workflows/settings.xml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
<settings>
2-
<mirrors xmlns="http://maven.apache.org/SETTINGS/1.1.0">
3-
<mirror>
4-
<mirrorOf>central</mirrorOf>
5-
<name>GCS Maven Central mirror</name>
6-
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
7-
<id>google-maven-central</id>
8-
</mirror>
9-
</mirrors>
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
103
<servers>
114
<server>
12-
<id>junit-snapshot-repo</id>
13-
<username>${env.OSSRH_USERNAME}</username>
14-
<password>${env.OSSRH_PASSWORD}</password>
15-
</server>
16-
<server>
17-
<id>junit-releases-repo</id>
18-
<username>${env.OSSRH_USERNAME}</username>
19-
<password>${env.OSSRH_PASSWORD}</password>
5+
<id>central-portal</id>
6+
<username>${env.MAVEN_CENTRAL_USERNAME}</username>
7+
<password>${env.MAVEN_CENTRAL_PASSWORD}</password>
208
</server>
219
</servers>
2210
</settings>

doc/building-junit.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,7 @@ Steps to build junit:
7070
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
7171
<servers>
7272
<server>
73-
<id>junit-snapshot-repo</id>
74-
<username><!--a username registered with Sonatype for deployment--></username>
75-
<password><!--corresponding password--></password>
76-
</server>
77-
<server>
78-
<id>junit-releases-repo</id>
73+
<id>central-portal</id>
7974
<username><!--a username registered with Sonatype for deployment--></username>
8075
<password><!--corresponding password--></password>
8176
</server>

pom.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,6 @@
7676
</ciManagement>
7777
<distributionManagement>
7878
<downloadUrl>https://github.com/junit-team/junit4/wiki/Download-and-Install</downloadUrl>
79-
<snapshotRepository>
80-
<id>junit-snapshot-repo</id>
81-
<name>Nexus Snapshot Repository</name>
82-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
83-
</snapshotRepository>
84-
<repository>
85-
<id>junit-releases-repo</id>
86-
<name>Nexus Release Repository</name>
87-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
88-
</repository>
8979
<site>
9080
<id>junit.github.io</id>
9181
<url>gitsite:git@github.com/junit-team/junit4.git</url>
@@ -101,7 +91,7 @@
10191
<javadocPluginVersion>2.10.3</javadocPluginVersion>
10292
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
10393
<arguments />
104-
<gpg.keyname>67893CC4</gpg.keyname>
94+
<gpg.keyname>FF6E2C001948C5F2F38B0CC385911F425EC61B51</gpg.keyname>
10595
</properties>
10696

10797
<dependencies>
@@ -379,6 +369,17 @@
379369
<artifactId>maven-resources-plugin</artifactId>
380370
<version>2.7</version>
381371
</plugin>
372+
<plugin>
373+
<groupId>org.sonatype.central</groupId>
374+
<artifactId>central-publishing-maven-plugin</artifactId>
375+
<version>0.7.0</version>
376+
<extensions>true</extensions>
377+
<configuration>
378+
<publishingServerId>central-portal</publishingServerId>
379+
<waitUntil>validated</waitUntil>
380+
<deploymentName>junit-${project.version}</deploymentName>
381+
</configuration>
382+
</plugin>
382383
</plugins>
383384
</build>
384385

0 commit comments

Comments
 (0)