Skip to content

Commit a0b3c74

Browse files
committed
Fix snapshot access to use Central Portal
1 parent 45124ac commit a0b3c74

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
distribution: 'temurin'
3939
java-version: ${{ matrix.java_version }}
4040
cache: 'maven'
41-
server-id: sonatype-nexus-snapshots
41+
server-id: central-snapshots
4242
server-username: CI_DEPLOY_USERNAME
4343
server-password: CI_DEPLOY_PASSWORD
4444
# See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-
@@ -57,7 +57,7 @@ jobs:
5757
- name: Deploy snapshot
5858
if: ${{ github.event_name != 'pull_request' && matrix.release_build && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT') }}
5959
env:
60-
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
61-
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
60+
CI_DEPLOY_USERNAME: ${{ secrets.CENTRAL_DEPLOY_USERNAME }}
61+
CI_DEPLOY_PASSWORD: ${{ secrets.CENTRAL_DEPLOY_PASSWORD }}
6262
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
6363
run: ./mvnw -B -q -ff -DskipTests -ntp source:jar deploy

pom.xml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -320,16 +320,15 @@
320320
</plugins>
321321
</build>
322322

323-
<repositories>
324-
<repository>
325-
<id>snapshots-repo</id>
326-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
327-
<releases>
328-
<enabled>false</enabled>
329-
</releases>
330-
<snapshots>
331-
<enabled>true</enabled>
332-
</snapshots>
333-
</repository>
334-
</repositories>
323+
<!-- Need to include snapshot reference to find snapshot of parent -->
324+
<repositories>
325+
<!-- 13-May-2025, tatu: now access snapshots via Central Portal -->
326+
<repository>
327+
<id>central-snapshots</id>
328+
<name>Sonatype Central Portal (snapshots)</name>
329+
<url>https://central.sonatype.com/repository/maven-snapshots</url>
330+
<releases><enabled>false</enabled></releases>
331+
<snapshots><enabled>true</enabled></snapshots>
332+
</repository>
333+
</repositories>
335334
</project>

0 commit comments

Comments
 (0)