Skip to content

Commit 044496d

Browse files
authored
Merge pull request #64 from StyraInc/chendrix/prepare-for-sonatype-migration
Migrate to sonatype central portal publish
2 parents 48892a4 + eb25f8a commit 044496d

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

.github/workflows/release.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
java-version: 11
3030
distribution: 'temurin'
31-
server-id: ossrh
31+
server-id: central
3232
server-username: MAVEN_USERNAME
3333
server-password: MAVEN_CENTRAL_TOKEN
3434
gpg-private-key: ${{ secrets.java_gpg_secret_key }}
@@ -63,8 +63,8 @@ jobs:
6363
run: |
6464
mvn --batch-mode clean deploy -Prelease -DskipTests=true -X
6565
env:
66-
MAVEN_USERNAME: ${{ secrets.ossrh_username }}
67-
MAVEN_CENTRAL_TOKEN: ${{ secrets.ossrh_password }}
66+
MAVEN_USERNAME: ${{ secrets.sonatype_username }}
67+
MAVEN_CENTRAL_TOKEN: ${{ secrets.sonatype_password }}
6868
MAVEN_GPG_PASSPHRASE: ${{ secrets.java_gpg_passphrase }}
6969

7070
- name: Back to Snapshot

pom.xml

+6-20
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@
3636
<url>https://github.com/StyraInc/opa-java-wasm.git</url>
3737
</scm>
3838

39-
<distributionManagement>
40-
<repository>
41-
<id>ossrh</id>
42-
<name>Central Repository OSSRH</name>
43-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
44-
</repository>
45-
</distributionManagement>
46-
4739
<properties>
4840
<maven.compiler.source>11</maven.compiler.source>
4941
<maven.compiler.target>11</maven.compiler.target>
@@ -184,12 +176,6 @@
184176
<profiles>
185177
<profile>
186178
<id>release</id>
187-
<distributionManagement>
188-
<snapshotRepository>
189-
<id>ossrh</id>
190-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
191-
</snapshotRepository>
192-
</distributionManagement>
193179
<build>
194180
<plugins>
195181
<plugin>
@@ -213,14 +199,14 @@
213199
</executions>
214200
</plugin>
215201
<plugin>
216-
<groupId>org.sonatype.plugins</groupId>
217-
<artifactId>nexus-staging-maven-plugin</artifactId>
218-
<version>${nexus-staging-maven-plugin.version}</version>
202+
<groupId>org.sonatype.central</groupId>
203+
<artifactId>central-publishing-maven-plugin</artifactId>
204+
<version>0.7.0</version>
219205
<extensions>true</extensions>
220206
<configuration>
221-
<serverId>ossrh</serverId>
222-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
223-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
207+
<publishingServerId>central</publishingServerId>
208+
<waitUntil>published</waitUntil>
209+
<autoPublish>true</autoPublish>
224210
</configuration>
225211
</plugin>
226212
</plugins>

0 commit comments

Comments
 (0)