Skip to content

Commit 59d3485

Browse files
committed
Migrate to Maven Central Portal
Relates #124
1 parent 74c1aa5 commit 59d3485

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

.github/workflows/publish-ossrh.yml renamed to .github/workflows/publish-central.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release to Maven Central (Deploy Snapshot or Stage Release)
1+
name: Release to Maven Central (Deploy Snapshot)
22

33
on:
44
push:
@@ -21,7 +21,7 @@ jobs:
2121
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2222
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2323
- name: Publish package
24-
run: ./mvnw --batch-mode deploy -DskipTests=true -Pgithub-ossrh
24+
run: ./mvnw --batch-mode deploy -DskipTests=true -Pgithub-central
2525
env:
2626
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
2727
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ Provide proxy classes for JDBC API to intercept executing queries and methods.
3838
- For example, if you want to use slf4j logger with `SLF4JQueryLoggingListener`, then you need slf4j library.
3939
- requires jdk1.6+
4040

41-
Snapshot is available via [oss sonatype snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/net/ttddyy/datasource-proxy/).
41+
Snapshots are available via the Maven Central repository.
42+
For instructions on how to consume snapshot releases, please refer to [the official documentation](https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-snapshot-releases-for-your-project).
43+
4244

4345
## Related Projects
4446

pom.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@
2424
<url>[email protected]:jdbc-observations/datasource-proxy.git</url>
2525
</scm>
2626

27-
<distributionManagement>
28-
<repository>
29-
<id>ossrh</id>
30-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
31-
</repository>
32-
<snapshotRepository>
33-
<id>ossrh</id>
34-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
35-
</snapshotRepository>
36-
</distributionManagement>
37-
3827
<developers>
3928
<developer>
4029
<id>tadaya</id>
@@ -62,13 +51,14 @@
6251
<asciidoctor.version>1.5.3</asciidoctor.version>
6352
<animal-sniffer-maven-plugin.version>1.23</animal-sniffer-maven-plugin.version>
6453
<log4j2.version>2.17.2</log4j2.version>
54+
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
6555
</properties>
6656

6757
<profiles>
6858

69-
<!-- This profile is activated by "publish-ossrh.yml" github action -->
59+
<!-- This profile is activated by "publish-central.yml" github action -->
7060
<profile>
71-
<id>github-ossrh</id>
61+
<id>github-central</id>
7262
<build>
7363
<plugins>
7464
<plugin>
@@ -91,6 +81,16 @@
9181
</execution>
9282
</executions>
9383
</plugin>
84+
<plugin>
85+
<groupId>org.sonatype.central</groupId>
86+
<artifactId>central-publishing-maven-plugin</artifactId>
87+
<version>${central-publishing-maven-plugin.version}</version>
88+
<extensions>true</extensions>
89+
<configuration>
90+
<publishingServerId>central</publishingServerId>
91+
<autoPublish>true</autoPublish>
92+
</configuration>
93+
</plugin>
9494
</plugins>
9595
</build>
9696
</profile>

0 commit comments

Comments
 (0)