Skip to content

Commit 1a0052f

Browse files
committed
GH-204 - Enable snapshot deployment to Sonatype Nexus.
1 parent 4ebf4ed commit 1a0052f

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
java-version: 17
2424
cache: 'maven'
2525

26-
- name: Build
27-
run: ./mvnw -B verify --file pom.xml
26+
- name: Build and deploy snapshot
27+
run: ./mvnw -B deploy --file pom.xml -s settings.xml -DossrhUsername=${{ secrets.OSSRH_USERNAME }} -DossrhPassword=${{ secrets.OSSRH_PASSWORD }}

pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
</build>
109109
<distributionManagement>
110110
<repository>
111-
<id>sonatype-new</id>
111+
<id>ossrh</id>
112112
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
113113
</repository>
114114
</distributionManagement>
@@ -270,6 +270,13 @@
270270
<tag>0.10.0</tag>
271271
</scm>
272272

273+
<distributionManagement>
274+
<snapshotRepository>
275+
<id>ossrh</id>
276+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
277+
</snapshotRepository>
278+
</distributionManagement>
279+
273280
<repositories>
274281
<repository>
275282
<id>spring-snapshots</id>

settings.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
4+
<servers>
5+
<server>
6+
<id>ossrh</id>
7+
<username>${ossrhUsername}</username>
8+
<password>${ossrhPassword}</password>
9+
</server>
10+
</servers>
11+
</settings>

0 commit comments

Comments
 (0)