Skip to content

Commit

Permalink
chore: migrate to Maven Central Portal
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Feb 7, 2025
1 parent fbfc9fd commit 4f92819
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 35 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release-to-maven-central.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release-to-maven-central
name: Release To Maven Central

on:
workflow_dispatch:
Expand Down Expand Up @@ -39,12 +39,16 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'
server-id: oss.sonatype.org
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
cache: 'maven'
env:
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Cache node modules
uses: actions/cache@v4
Expand Down
40 changes: 9 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
<checkstyle.version>10.21.2</checkstyle.version>
<spring-javaformat-checkstyle.version>0.0.43</spring-javaformat-checkstyle.version>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
<node.version>v22.12.0</node.version>
<jolokia-support-spring.version>2.2.2</jolokia-support-spring.version>
</properties>
Expand Down Expand Up @@ -150,7 +150,6 @@
<configuration>
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
<headerLocation>src/checkstyle/checkstyle-header.txt</headerLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
Expand Down Expand Up @@ -388,9 +387,9 @@
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -462,28 +461,12 @@
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<executions>
<execution>
<id>deploy-to-sonatype</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
<goal>release</goal>
</goals>
</execution>
</executions>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>oss.sonatype.org</serverId>
<nexusUrl>https://oss.sonatype.org</nexusUrl>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -559,10 +542,5 @@
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/codecentric/spring-boot-admin</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>
2 changes: 1 addition & 1 deletion spring-boot-admin-docs/src/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "docusaurus start",
"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",
"build": "docusaurus build",
"build:prod": "npm run build && npm run build:current-version-redirect && mv ./build ../../target/generated-docs"
"build:prod": "npm run build && npm run build:current-version-redirect && rm -rf ../../target/generated-docs && mv ./build ../../target/generated-docs"
},
"dependencies": {
"@docusaurus/core": "^3.6.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
<configuration>
<mainClass>de.codecentric.boot.admin.sample.SpringBootAdminServletApplication</mainClass>
<addResources>false</addResources>
<executable>true</executable>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 4f92819

Please sign in to comment.