Skip to content

Commit 3f5c9bb

Browse files
committed
fixes
1 parent bd6054b commit 3f5c9bb

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/maven-publish-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
server-username: SONATYPE_USERNAME
3030
server-password: SONATYPE_TOKEN
3131
- name: Publish SNAPSHOT to sonatype central with Apache Maven
32-
run: mvn --batch-mode deploy
32+
run: mvn --batch-mode deploy -P deploy-to-sonatype
3333
env:
3434
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3535
SONATYPE_TOKEN: ${{ secrets.OSSRH_TOKEN }}

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,27 @@
4949
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
5050
</repository>
5151
</repositories>
52+
<profiles>
53+
<profile>
54+
<id>deploy-to-sonatype</id>
55+
<build>
56+
<plugins>
57+
<plugin>
58+
<groupId>org.sonatype.central</groupId>
59+
<artifactId>central-publishing-maven-plugin</artifactId>
60+
<version>0.7.0</version>
61+
<extensions>true</extensions>
62+
<configuration>
63+
<centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots</centralSnapshotsUrl>
64+
<publishingServerId>sonatype-central</publishingServerId>
65+
<autoPublish>true</autoPublish>
66+
<waitUntil>published</waitUntil>
67+
</configuration>
68+
</plugin>
69+
</plugins>
70+
</build>
71+
</profile>
72+
</profiles>
5273
<dependencies>
5374
<dependency>
5475
<groupId>commons-lang</groupId>

0 commit comments

Comments
 (0)