Skip to content

Commit ea58cdd

Browse files
authored
chore: migrate to Maven Central Portal (#4014)
1 parent 58bbde6 commit ea58cdd

File tree

4 files changed

+16
-35
lines changed

4 files changed

+16
-35
lines changed

.github/workflows/release-to-maven-central.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release-to-maven-central
1+
name: Release To Maven Central
22

33
on:
44
workflow_dispatch:
@@ -39,12 +39,16 @@ jobs:
3939
with:
4040
distribution: 'temurin'
4141
java-version: '17'
42-
server-id: oss.sonatype.org
42+
server-id: central
4343
server-username: MAVEN_USERNAME
4444
server-password: MAVEN_PASSWORD
4545
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
4646
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4747
cache: 'maven'
48+
env:
49+
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
50+
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
51+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
4852

4953
- name: Cache node modules
5054
uses: actions/cache@v4

pom.xml

+9-31
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
7777
<checkstyle.version>10.21.2</checkstyle.version>
7878
<spring-javaformat-checkstyle.version>0.0.43</spring-javaformat-checkstyle.version>
79-
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
79+
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
8080
<node.version>v22.12.0</node.version>
8181
<jolokia-support-spring.version>2.2.2</jolokia-support-spring.version>
8282
</properties>
@@ -150,7 +150,6 @@
150150
<configuration>
151151
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
152152
<headerLocation>src/checkstyle/checkstyle-header.txt</headerLocation>
153-
<encoding>UTF-8</encoding>
154153
<consoleOutput>true</consoleOutput>
155154
<failOnViolation>true</failOnViolation>
156155
<includeTestSourceDirectory>true</includeTestSourceDirectory>
@@ -388,9 +387,9 @@
388387
<version>${jacoco-maven-plugin.version}</version>
389388
</plugin>
390389
<plugin>
391-
<groupId>org.sonatype.plugins</groupId>
392-
<artifactId>nexus-staging-maven-plugin</artifactId>
393-
<version>${nexus-staging-maven-plugin.version}</version>
390+
<groupId>org.sonatype.central</groupId>
391+
<artifactId>central-publishing-maven-plugin</artifactId>
392+
<version>${central-publishing-maven-plugin.version}</version>
394393
</plugin>
395394
</plugins>
396395
</pluginManagement>
@@ -462,28 +461,12 @@
462461
</plugin>
463462

464463
<plugin>
465-
<groupId>org.apache.maven.plugins</groupId>
466-
<artifactId>maven-deploy-plugin</artifactId>
467-
<configuration>
468-
<skip>true</skip>
469-
</configuration>
470-
</plugin>
471-
<plugin>
472-
<groupId>org.sonatype.plugins</groupId>
473-
<artifactId>nexus-staging-maven-plugin</artifactId>
474-
<executions>
475-
<execution>
476-
<id>deploy-to-sonatype</id>
477-
<phase>deploy</phase>
478-
<goals>
479-
<goal>deploy</goal>
480-
<goal>release</goal>
481-
</goals>
482-
</execution>
483-
</executions>
464+
<groupId>org.sonatype.central</groupId>
465+
<artifactId>central-publishing-maven-plugin</artifactId>
466+
<extensions>true</extensions>
484467
<configuration>
485-
<serverId>oss.sonatype.org</serverId>
486-
<nexusUrl>https://oss.sonatype.org</nexusUrl>
468+
<publishingServerId>central</publishingServerId>
469+
<autoPublish>true</autoPublish>
487470
</configuration>
488471
</plugin>
489472
</plugins>
@@ -559,10 +542,5 @@
559542
<name>GitHub Packages</name>
560543
<url>https://maven.pkg.github.com/codecentric/spring-boot-admin</url>
561544
</snapshotRepository>
562-
<repository>
563-
<id>sonatype-nexus-staging</id>
564-
<name>Nexus Release Repository</name>
565-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
566-
</repository>
567545
</distributionManagement>
568546
</project>

spring-boot-admin-docs/src/site/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "docusaurus start",
88
"build:current-version-redirect": "sed \"s/@@VERSION@@/$VERSION/g\" current/index.template.html > current/index.html && sed \"s/@@VERSION@@/$VERSION/g\" current/404.template.html > current/404.html",
99
"build": "docusaurus build",
10-
"build:prod": "npm run build && npm run build:current-version-redirect && mv ./build ../../target/generated-docs"
10+
"build:prod": "npm run build && npm run build:current-version-redirect && rm -rf ../../target/generated-docs && mv ./build ../../target/generated-docs"
1111
},
1212
"dependencies": {
1313
"@docusaurus/core": "^3.6.3",

spring-boot-admin-samples/spring-boot-admin-sample-servlet/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
<configuration>
126126
<mainClass>de.codecentric.boot.admin.sample.SpringBootAdminServletApplication</mainClass>
127127
<addResources>false</addResources>
128-
<executable>true</executable>
129128
</configuration>
130129
</plugin>
131130
</plugins>

0 commit comments

Comments
 (0)