Skip to content

Commit 89f1a51

Browse files
committed
docs:update maven publish.
1 parent ccb6d82 commit 89f1a51

File tree

3 files changed

+34
-55
lines changed

3 files changed

+34
-55
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
with:
1515
java-version: '8'
1616
distribution: 'temurin'
17-
server-id: ossrh
17+
server-id: central-portal
1818
server-username: MAVEN_USERNAME
1919
server-password: MAVEN_PASSWORD
2020

2121
- name: "Publish package"
2222
env:
23-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
24-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
23+
MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
24+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN }}
2525
run: |
2626
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import;
2727
mvn clean deploy -P release -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -DskipTests -B -U

.github/workflows/snapshot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636
with:
3737
java-version: '8'
3838
distribution: 'temurin'
39-
server-id: ossrh
39+
server-id: central-portal
4040
server-username: MAVEN_USERNAME
4141
server-password: MAVEN_PASSWORD
4242
- name: Publish package
43-
run: mvn --batch-mode -U -Psonatype clean deploy -DskipTests
43+
run: mvn --batch-mode -U clean deploy -DskipTests
4444
env:
45-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
46-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
45+
MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
46+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN }}

pom.xml

Lines changed: 27 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -282,57 +282,22 @@
282282
</filesets>
283283
</configuration>
284284
</plugin>
285+
<plugin>
286+
<groupId>org.apache.maven.plugins</groupId>
287+
<artifactId>maven-deploy-plugin</artifactId>
288+
<version>${maven.deploy.plugin.version}</version>
289+
<configuration>
290+
<skip>${skip.maven.deploy}</skip>
291+
</configuration>
292+
</plugin>
285293
</plugins>
286294
</build>
287295

288296
<profiles>
289-
<profile>
290-
<id>sonatype</id>
291-
<repositories>
292-
<repository>
293-
<id>nexus-snapshots</id>
294-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
295-
<releases>
296-
<enabled>false</enabled>
297-
</releases>
298-
<snapshots>
299-
<enabled>true</enabled>
300-
<updatePolicy>always</updatePolicy>
301-
</snapshots>
302-
</repository>
303-
<repository>
304-
<id>nexus-releases</id>
305-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
306-
<releases>
307-
<enabled>true</enabled>
308-
</releases>
309-
<snapshots>
310-
<enabled>false</enabled>
311-
</snapshots>
312-
</repository>
313-
</repositories>
314-
</profile>
315-
<profile>
316-
<id>javadoc-lint</id>
317-
<activation>
318-
<jdk>[1.8,)</jdk>
319-
</activation>
320-
<properties>
321-
<doclint>none</doclint>
322-
</properties>
323-
</profile>
324297
<profile>
325298
<id>release</id>
326299
<build>
327300
<plugins>
328-
<plugin>
329-
<groupId>org.apache.maven.plugins</groupId>
330-
<artifactId>maven-deploy-plugin</artifactId>
331-
<version>${maven.deploy.plugin.version}</version>
332-
<configuration>
333-
<skip>${skip.maven.deploy}</skip>
334-
</configuration>
335-
</plugin>
336301
<plugin>
337302
<groupId>org.apache.maven.plugins</groupId>
338303
<artifactId>maven-gpg-plugin</artifactId>
@@ -402,13 +367,27 @@
402367

403368
<distributionManagement>
404369
<snapshotRepository>
405-
<id>ossrh</id>
406-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
407-
370+
<id>central-portal</id>
371+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
408372
</snapshotRepository>
409373
<repository>
410-
<id>ossrh</id>
411-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
374+
<id>central-portal</id>
375+
<url>https://ossrh-staging-api.central.sonatype.com/service/local/</url>
412376
</repository>
413377
</distributionManagement>
378+
379+
<repositories>
380+
<repository>
381+
<name>Central Portal Snapshots</name>
382+
<id>central-portal-snapshots</id>
383+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
384+
<releases>
385+
<enabled>false</enabled>
386+
</releases>
387+
<snapshots>
388+
<enabled>true</enabled>
389+
<updatePolicy>always</updatePolicy>
390+
</snapshots>
391+
</repository>
392+
</repositories>
414393
</project>

0 commit comments

Comments
 (0)