Skip to content

Commit

Permalink
🔧 refarch-tools add maven central release
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhir committed Oct 31, 2024
1 parent e705246 commit 8241cd9
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions refarch-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
<maven.compiler.release>${java.version}</maven.compiler.release>

<!-- Release -->
<central-publishing-maven-plugin.version>0.5.0</central-publishing-maven-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
</properties>

<build>
Expand All @@ -38,13 +40,43 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>accessibility,html,reference,syntax</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Release -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
Expand All @@ -57,6 +89,53 @@
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- Central Portal Publishing Plugin -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<autoPublish>true</autoPublish>
<deploymentName>${project.groupId}:${project.artifactId}:${project.version}</deploymentName>
<excludeArtifacts>
<!-- Exclude services -->
<artifact>refarch-s3-integration-rest-service</artifact>
</excludeArtifacts>
</configuration>
</plugin>
<!-- GPG plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<scm>
<url>https://github.com/it-at-m/refarch.git</url>
<connection>scm:git:https://github.com/it-at-m/refarch.git</connection>
Expand Down

0 comments on commit 8241cd9

Please sign in to comment.