Merge pull request #104 from kemitix/hotfix/5.0.3

Sign artifacts during package phase in release profile
This commit is contained in:
Paul Campbell 2017-12-31 14:27:02 +00:00 committed by GitHub
commit 1c8b8b4279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 15 deletions

View file

@ -24,9 +24,17 @@ The POM defines the following items:
* `inceptionYear`
* `licenses`
* `developers`
* `distributionManagement`
The POM sets the following properties:
* `project.reporting.outputEncoding` as `UTF-8`
* `java.version` as `1.8`
### Profile `release`
#### GPG Artifact Signing
Artifacts will be GPG signed during the `package` phase when the `release` profile is enabled.
#### Distribution Management
The Nexus Sonatype repositories are declared within `distributionManagement` when the `release` profile is enableds.

30
pom.xml
View file

@ -5,7 +5,7 @@
<groupId>net.kemitix</groupId>
<artifactId>kemitix-parent</artifactId>
<version>5.0.2</version>
<version>5.0.3</version>
<packaging>pom</packaging>
<name>Kemitix Parent</name>
@ -36,6 +36,7 @@
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
</properties>
<developers>
@ -47,6 +48,31 @@
</developer>
</developers>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-gpg-plugin -->
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
@ -59,5 +85,7 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles><!-- release -->
</project>