Skip to content

Commit 06d88ec

Browse files
author
nicolaiparlog
committed
Extended pom for automatic deployment to sonatype OSSRH.
1 parent 2702e02 commit 06d88ec

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

pom.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
<system>GitHub</system>
2626
</issueManagement>
2727

28+
<distributionManagement>
29+
<snapshotRepository>
30+
<id>ossrh</id>
31+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
32+
</snapshotRepository>
33+
</distributionManagement>
34+
2835
<licenses>
2936
<license>
3037
<name>GNU General Public License, Version 3.0</name>
@@ -84,6 +91,7 @@
8491
</resources>
8592
<plugins>
8693
<plugin>
94+
<!-- specify using Java 8 -->
8795
<groupId>org.apache.maven.plugins</groupId>
8896
<artifactId>maven-compiler-plugin</artifactId>
8997
<version>3.1</version>
@@ -93,6 +101,7 @@
93101
</configuration>
94102
</plugin>
95103
<plugin>
104+
<!-- create sources.jar -->
96105
<groupId>org.apache.maven.plugins</groupId>
97106
<artifactId>maven-source-plugin</artifactId>
98107
<version>2.3</version>
@@ -106,6 +115,7 @@
106115
</executions>
107116
</plugin>
108117
<plugin>
118+
<!-- create javadoc.jar -->
109119
<groupId>org.apache.maven.plugins</groupId>
110120
<artifactId>maven-javadoc-plugin</artifactId>
111121
<version>2.9.1</version>
@@ -118,6 +128,33 @@
118128
</execution>
119129
</executions>
120130
</plugin>
131+
<plugin>
132+
<!-- sign all jars and pom -->
133+
<groupId>org.apache.maven.plugins</groupId>
134+
<artifactId>maven-gpg-plugin</artifactId>
135+
<version>1.5</version>
136+
<executions>
137+
<execution>
138+
<id>sign-artifacts</id>
139+
<phase>verify</phase>
140+
<goals>
141+
<goal>sign</goal>
142+
</goals>
143+
</execution>
144+
</executions>
145+
</plugin>
146+
<plugin>
147+
<!-- deploy to sonatype OSSRH -->
148+
<groupId>org.sonatype.plugins</groupId>
149+
<artifactId>nexus-staging-maven-plugin</artifactId>
150+
<version>1.6.2</version>
151+
<extensions>true</extensions>
152+
<configuration>
153+
<serverId>ossrh</serverId>
154+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
155+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
156+
</configuration>
157+
</plugin>
121158
</plugins>
122159
</build>
123160

0 commit comments

Comments
 (0)