Skip to content

Commit

Permalink
Maven: Prepare POM for central release
Browse files Browse the repository at this point in the history
  • Loading branch information
schnatterer committed Nov 21, 2017
1 parent 6a31810 commit 607ffed
Showing 1 changed file with 78 additions and 18 deletions.
96 changes: 78 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

<groupId>de.triology.cb</groupId>
<artifactId>command-bus</artifactId>
<name>command-bus</name>
<description>CDI enabled Java Command-Bus</description>
<version>0.2.1-SNAPSHOT</version>
<url>https://github.com/triologygmbh/command-bus</url>

Expand Down Expand Up @@ -71,6 +73,17 @@
<url>https://github.com/triologygmbh/command-bus/issues</url>
</issueManagement>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>

<dependency>
Expand Down Expand Up @@ -196,17 +209,15 @@
<configuration>
<!-- Make our tags look like e.g. "1.0.1" -->
<tagNameFormat>@{project.version}</tagNameFormat>
<!-- During release:perform, enable the "release" profile -->
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<!-- Deploy to local directory only for now -->
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/release</altDeploymentRepository>
</configuration>
</plugin>

<plugin>
Expand All @@ -219,20 +230,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<!-- Automatically apply license headers to files and fails build if one is missing: -->
<groupId>com.mycila</groupId>
Expand Down Expand Up @@ -328,6 +325,69 @@
</plugins>
</build>
</profile>

<profile>
<id>release</id>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<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>
<version>2.10.4</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 607ffed

Please sign in to comment.