Skip to content

Commit 8b70592

Browse files
committed
Updated deployment to support deploying using new Sonar Maven Central authentication crap
1 parent f27e9d6 commit 8b70592

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

pom.xml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<mvn.maven.surefire.plugin>3.3.1</mvn.maven.surefire.plugin>
4545
<mvn.sonar.maven.plugin>3.11.0.3922</mvn.sonar.maven.plugin>
4646
<mvn.versions.maven.plugin>2.17.1</mvn.versions.maven.plugin>
47+
<mvn.centralpublishing.plugin.version>0.8.0</mvn.centralpublishing.plugin.version>
4748

4849
<!-- Code analysis -->
4950
<check.skip-javadoc>false</check.skip-javadoc>
@@ -121,6 +122,11 @@
121122
<artifactId>git-commit-id-maven-plugin</artifactId>
122123
</plugin>
123124

125+
<plugin>
126+
<groupId>org.sonatype.central</groupId>
127+
<artifactId>central-publishing-maven-plugin</artifactId>
128+
</plugin>
129+
124130
</plugins>
125131

126132
<pluginManagement>
@@ -245,6 +251,21 @@
245251
</configuration>
246252
</plugin>
247253

254+
<plugin>
255+
<groupId>org.sonatype.central</groupId>
256+
<artifactId>central-publishing-maven-plugin</artifactId>
257+
<version>${mvn.centralpublishing.plugin.version}</version>
258+
<extensions>true</extensions>
259+
<configuration>
260+
<skipPublishing>false</skipPublishing>
261+
<publishingServerId>central</publishingServerId>
262+
<autoPublish>false</autoPublish>
263+
<waitUntil>validated</waitUntil>
264+
<failOnBuildFailure>true</failOnBuildFailure>
265+
<checksums>all</checksums>
266+
</configuration>
267+
</plugin>
268+
248269
<plugin>
249270
<groupId>org.apache.maven.plugins</groupId>
250271
<artifactId>maven-source-plugin</artifactId>
@@ -409,12 +430,14 @@
409430

410431
<distributionManagement>
411432
<snapshotRepository>
412-
<id>ossrh</id>
413-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
433+
<id>central</id>
434+
<name>Sonatype Central Snapshots</name>
435+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
414436
</snapshotRepository>
415437
<repository>
416-
<id>ossrh</id>
417-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
438+
<id>central</id>
439+
<name>Sonatype Central Staging Repository</name>
440+
<url>https://central.sonatype.com</url>
418441
</repository>
419442
<site>
420443
<id>local</id>

0 commit comments

Comments
 (0)