Skip to content

Commit a021f31

Browse files
committed
migrate to Sonatype Central Portal
1 parent 5599f0c commit a021f31

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

.github/settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
<servers>
88
<server>
9-
<id>ossrh</id>
10-
<username>${env.OSSRH_TOKEN_USERNAME}</username>
11-
<password>${env.OSSRH_TOKEN_PASSWORD}</password>
9+
<id>sonatype</id>
10+
<username>${env.SONATYPE_TOKEN_USERNAME}</username>
11+
<password>${env.SONATYPE_TOKEN_PASSWORD}</password>
1212
</server>
1313
</servers>
1414
</settings>

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,6 @@ jobs:
172172
cd $GITHUB_WORKSPACE
173173
- name: Run Maven
174174
env: # make secrets available as environment variables
175-
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }}
176-
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
175+
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }}
176+
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
177177
run: mvn -B -s $GITHUB_WORKSPACE/.github/settings.xml -DskipTests deploy

pom.xml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,12 @@ limitations under the License.
191191
</ciManagement>
192192
<distributionManagement>
193193
<repository>
194-
<id>ossrh</id>
195-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
194+
<id>sonatype</id>
195+
<url>https://central.sonatype.com</url>
196196
</repository>
197197
<snapshotRepository>
198-
<id>ossrh</id>
199-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
198+
<id>sonatype</id>
199+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
200200
</snapshotRepository>
201201
<!-- Dummy - this will NOT actually be used, but is required for mvn site:stage -->
202202
<!-- Use scm-publish plugin for site deployment on GitHub pages -->
@@ -222,6 +222,7 @@ limitations under the License.
222222
<antrun-plugin.version>3.1.0</antrun-plugin.version>
223223
<archetype-plugin.version>3.3.1</archetype-plugin.version>
224224
<assembly-plugin.version>3.7.1</assembly-plugin.version>
225+
<central-publish-plugin.version>0.7.0</central-publish-plugin.version>
225226
<checkstyle-plugin.version>3.6.0</checkstyle-plugin.version>
226227
<clean-plugin.version>3.4.0</clean-plugin.version>
227228
<compiler-plugin.version>3.13.0</compiler-plugin.version>
@@ -660,6 +661,11 @@ limitations under the License.
660661
<ignoreAllNonTestScoped>true</ignoreAllNonTestScoped>
661662
</configuration>
662663
</plugin>
664+
<plugin>
665+
<groupId>org.sonatype.central</groupId>
666+
<artifactId>central-publishing-maven-plugin</artifactId>
667+
<version>${central-publish-plugin.version}</version>
668+
</plugin>
663669
<plugin>
664670
<groupId>org.apache.maven.plugins</groupId>
665671
<artifactId>maven-deploy-plugin</artifactId>
@@ -1161,6 +1167,16 @@ limitations under the License.
11611167
<id>release</id>
11621168
<build>
11631169
<plugins>
1170+
<plugin>
1171+
<groupId>org.sonatype.central</groupId>
1172+
<artifactId>central-publishing-maven-plugin</artifactId>
1173+
<extensions>true</extensions>
1174+
<configuration>
1175+
<deploymentName>LearnLib ${project.version}</deploymentName>
1176+
<publishingServerId>sonatype</publishingServerId>
1177+
<excludeArtifacts>learnlib-examples</excludeArtifacts>
1178+
</configuration>
1179+
</plugin>
11641180
<plugin>
11651181
<groupId>org.apache.maven.plugins</groupId>
11661182
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)