Skip to content

Commit 5134e87

Browse files
feat: update pom.xml & maven-publish.yml (#5)
1 parent f2f237b commit 5134e87

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

.github/workflows/maven-publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow will build a Java project with Maven
1+
# This workflow will build a Java project with Maven and publish to Maven Central
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

44
name: Maven Package
@@ -11,15 +11,16 @@ jobs:
1111
publish:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- name: Set up Maven Central Repository
16-
uses: actions/setup-java@v2
16+
uses: actions/setup-java@v4
1717
with:
1818
java-version: '8'
19-
distribution: 'adopt'
19+
distribution: 'temurin'
2020
server-id: ossrh
2121
server-username: MAVEN_USERNAME
2222
server-password: MAVEN_PASSWORD
23+
cache: maven
2324
- id: install-secret-key
2425
name: Install gpg secret key
2526
run: |

pom.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@
7676
<distributionManagement>
7777
<snapshotRepository>
7878
<id>ossrh</id>
79-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
79+
<url>https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/</url>
8080
</snapshotRepository>
8181
<repository>
8282
<id>ossrh</id>
83-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
83+
<url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
8484
</repository>
8585
</distributionManagement>
8686

@@ -147,15 +147,17 @@
147147
</gpgArguments>
148148
</configuration>
149149
</plugin>
150-
<plugin>
151-
<groupId>org.sonatype.central</groupId>
152-
<artifactId>central-publishing-maven-plugin</artifactId>
153-
<version>0.8.0</version>
154-
<extensions>true</extensions>
155-
<configuration>
156-
<publishingServerId>central</publishingServerId>
157-
</configuration>
158-
</plugin>
150+
<plugin>
151+
<groupId>org.sonatype.plugins</groupId>
152+
<artifactId>nexus-staging-maven-plugin</artifactId>
153+
<version>1.6.7</version>
154+
<extensions>true</extensions>
155+
<configuration>
156+
<serverId>ossrh</serverId>
157+
<nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
158+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
159+
</configuration>
160+
</plugin>
159161
</plugins>
160162
</build>
161163

0 commit comments

Comments
 (0)