Skip to content

Commit d32a9d9

Browse files
committed
Adjust deploy and publish process
Adjust deploy and publish process. This aligns the process with the new process as described here: https://central.sonatype .org/publish/publish-portal-guide/
1 parent 9eb6e4c commit d32a9d9

File tree

1 file changed

+36
-44
lines changed

1 file changed

+36
-44
lines changed

pom.xml

Lines changed: 36 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@
6666
<junit.jupiter.version>5.10.1</junit.jupiter.version>
6767
<mockk.version>1.12.4</mockk.version>
6868
<!-- Build -->
69+
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
6970
<dokka.version>1.9.20</dokka.version>
7071
<jacoco-maven.version>0.8.11</jacoco-maven.version>
7172
<maven-assembly.version>3.7.1</maven-assembly.version>
7273
<maven-clean.version>3.4.0</maven-clean.version>
7374
<maven-compiler.version>3.13.0</maven-compiler.version>
74-
<maven-deploy.version>3.1.3</maven-deploy.version>
7575
<maven-enforcer.version>3.5.0</maven-enforcer.version>
7676
<maven-gpg.version>3.2.7</maven-gpg.version>
7777
<maven-install.version>3.1.3</maven-install.version>
@@ -420,23 +420,15 @@
420420
</archive>
421421
</configuration>
422422
</plugin>
423-
<plugin>
424-
<artifactId>maven-source-plugin</artifactId>
425-
<version>${maven-source.version}</version>
426-
<executions>
427-
<execution>
428-
<id>attach-sources</id>
429-
<phase>package</phase>
430-
<goals>
431-
<goal>jar-no-fork</goal>
432-
</goals>
433-
</execution>
434-
</executions>
435-
</plugin>
436423
<!-- deploy -->
437424
<plugin>
438-
<artifactId>maven-deploy-plugin</artifactId>
439-
<version>${maven-deploy.version}</version>
425+
<groupId>org.sonatype.central</groupId>
426+
<artifactId>central-publishing-maven-plugin</artifactId>
427+
<version>${central-publishing-maven-plugin.version}</version>
428+
<extensions>true</extensions>
429+
<configuration>
430+
<publishingServerId>central</publishingServerId>
431+
</configuration>
440432
</plugin>
441433
<plugin>
442434
<!-- just to make sure deployed artifacts are always built (and tested) using JDK 8+ -->
@@ -466,10 +458,14 @@
466458
<artifactId>maven-release-plugin</artifactId>
467459
<version>${maven-release.version}</version>
468460
<configuration>
461+
<!-- prepare goal configuration -->
469462
<mavenExecutorId>forked-path</mavenExecutorId>
470-
<localCheckout>true</localCheckout>
471463
<pushChanges>false</pushChanges>
472-
<releaseProfiles>release-sign-artifacts,docs-and-sources</releaseProfiles>
464+
<autoVersionSubmodules>true</autoVersionSubmodules>
465+
<!-- perform goal configuration -->
466+
<mavenExecutorId>forked-path</mavenExecutorId>
467+
<localCheckout>true</localCheckout>
468+
<releaseProfiles>sources,sign,docs-and-sources</releaseProfiles>
473469
<tagNameFormat>axon-kotlin-@{project.version}</tagNameFormat>
474470
</configuration>
475471
</plugin>
@@ -518,6 +514,27 @@
518514
</build>
519515
</profile>
520516

517+
<profile>
518+
<id>sources</id>
519+
<build>
520+
<plugins>
521+
<plugin>
522+
<artifactId>maven-source-plugin</artifactId>
523+
<version>${maven-source.version}</version>
524+
<executions>
525+
<execution>
526+
<id>attach-sources</id>
527+
<phase>package</phase>
528+
<goals>
529+
<goal>jar-no-fork</goal>
530+
</goals>
531+
</execution>
532+
</executions>
533+
</plugin>
534+
</plugins>
535+
</build>
536+
</profile>
537+
521538
<profile>
522539
<id>docs-and-sources</id>
523540
<build>
@@ -534,7 +551,7 @@
534551
</profile>
535552

536553
<profile>
537-
<id>release-sign-artifacts</id>
554+
<id>sign</id>
538555
<activation>
539556
<property>
540557
<name>performRelease</name>
@@ -562,18 +579,6 @@
562579
</profile>
563580
</profiles>
564581

565-
<repositories>
566-
<repository>
567-
<id>sonatype</id>
568-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
569-
<snapshots>
570-
<enabled>true</enabled>
571-
<updatePolicy>always</updatePolicy>
572-
<checksumPolicy>fail</checksumPolicy>
573-
</snapshots>
574-
</repository>
575-
</repositories>
576-
577582
<pluginRepositories>
578583
<pluginRepository>
579584
<id>jcenter</id>
@@ -582,19 +587,6 @@
582587
</pluginRepository>
583588
</pluginRepositories>
584589

585-
<!-- deploy and release configuration -->
586-
<distributionManagement>
587-
<snapshotRepository>
588-
<id>sonatype</id>
589-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
590-
<uniqueVersion>true</uniqueVersion>
591-
</snapshotRepository>
592-
<repository>
593-
<id>sonatype</id>
594-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
595-
<uniqueVersion>false</uniqueVersion>
596-
</repository>
597-
</distributionManagement>
598590

599591
<scm>
600592
<connection>scm:git:git://github.com/AxonFramework/extension-kotlin.git</connection>

0 commit comments

Comments
 (0)