Skip to content

Commit 09e8969

Browse files
Implement release/deployment workflow
This change adds the necessary bits to the pom.xml file for enabling automated release deployment to the Central Repository from the command line with "mvn deploy". The change uses maven-gpg-plugin to automate the artifact signing, and nexus-staging-maven-plugin to do the actual release deployment steps. Fixes #1
1 parent 8ad3f09 commit 09e8969

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

pom.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,18 @@ SOFTWARE.
5858
<tag>HEAD</tag>
5959
<connection>scm:git:ssh://git@github.com:validator/maven-plugin.git</connection>
6060
<developerConnection>scm:git:ssh://git@github.com:validator/maven-plugin.git</developerConnection>
61+
<url>https://github.com/validator/maven-plugin</url>
6162
</scm>
63+
<distributionManagement>
64+
<snapshotRepository>
65+
<id>ossrh</id>
66+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
67+
</snapshotRepository>
68+
<repository>
69+
<id>ossrh</id>
70+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
71+
</repository>
72+
</distributionManagement>
6273

6374
<build>
6475
<plugins>
@@ -110,6 +121,31 @@ SOFTWARE.
110121
</execution>
111122
</executions>
112123
</plugin>
124+
<plugin>
125+
<groupId>org.sonatype.plugins</groupId>
126+
<artifactId>nexus-staging-maven-plugin</artifactId>
127+
<version>1.5.1</version>
128+
<executions>
129+
<execution>
130+
<id>default-deploy</id>
131+
<phase>deploy</phase>
132+
<goals>
133+
<goal>deploy</goal>
134+
</goals>
135+
</execution>
136+
</executions>
137+
<configuration>
138+
<serverId>ossrh</serverId>
139+
<extensions>true</extensions>
140+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
141+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
142+
</configuration>
143+
</plugin>
144+
<plugin>
145+
<groupId>org.apache.maven.plugins</groupId>
146+
<artifactId>maven-gpg-plugin</artifactId>
147+
<version>1.6</version>
148+
</plugin>
113149
</plugins>
114150
<resources>
115151
<resource>
@@ -188,6 +224,10 @@ SOFTWARE.
188224
<groupId>org.apache.maven.plugins</groupId>
189225
<artifactId>maven-javadoc-plugin</artifactId>
190226
<version>2.10.4</version>
227+
<configuration>
228+
<additionalparam>-Xdoclint:none</additionalparam>
229+
<source>8</source>
230+
</configuration>
191231
<executions>
192232
<execution>
193233
<id>attach-javadocs</id>
@@ -213,6 +253,12 @@ SOFTWARE.
213253
</plugin>
214254
</plugins>
215255
</build>
256+
<activation>
257+
<activeByDefault>true</activeByDefault>
258+
</activation>
259+
<properties>
260+
<gpg.executable>gpg</gpg.executable>
261+
</properties>
216262
</profile>
217263
</profiles>
218264
</project>

0 commit comments

Comments
 (0)