Skip to content

Commit 3e6b1e1

Browse files
committed
Adding OSSRH plugin to master branch.
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
1 parent 496f94a commit 3e6b1e1

1 file changed

Lines changed: 59 additions & 7 deletions

File tree

pom.xml

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>java-parent</artifactId>
66
<packaging>pom</packaging>
77
<version>1.0.2</version>
8-
8+
99
<properties>
1010
<!-- source & target java version for MQTT Client -->
1111
<mqttclient.java.version>1.4</mqttclient.java.version>
@@ -18,7 +18,7 @@
1818
<test.exclude>**/*ConformantTest.java</test.exclude>
1919
<download.location>/home/data/httpd/download.eclipse.org/paho/releases/${project.version}/Java</download.location>
2020
</properties>
21-
21+
2222
<name>Eclipse Paho</name>
2323
<url>http://www.eclipse.org/paho</url>
2424
<description>
@@ -36,12 +36,12 @@
3636
<url>http://www.eclipse.org/org/documents/epl-v10.php</url>
3737
</license>
3838
</licenses>
39-
39+
4040
<scm>
4141
<url>http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.java.git</url>
4242
<connection>scm:git://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.java.git</connection>
4343
</scm>
44-
44+
4545
<distributionManagement>
4646
<repository>
4747
<id>repo.eclipse.org</id>
@@ -54,7 +54,7 @@
5454
<url>https://repo.eclipse.org/content/repositories/paho-snapshots/</url>
5555
</snapshotRepository>
5656
</distributionManagement>
57-
57+
5858
<repositories>
5959
<repository>
6060
<id>eclipse-kepler</id>
@@ -69,7 +69,7 @@
6969
<url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
7070
</pluginRepository>
7171
</pluginRepositories>
72-
72+
7373
<dependencyManagement>
7474
<dependencies>
7575
<dependency>
@@ -80,7 +80,7 @@
8080
</dependency>
8181
</dependencies>
8282
</dependencyManagement>
83-
83+
8484
<build>
8585
<pluginManagement>
8686
<plugins>
@@ -159,6 +159,30 @@
159159
</execution>
160160
</executions>
161161
</plugin>
162+
<plugin>
163+
<!--
164+
Use the Nexus Staging plugin as a full replacement for the standard
165+
Maven Deploy plugin.
166+
See https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin
167+
why this makes sense :-)
168+
We can control whether we want to deploy to the Eclipse repo or Maven Central
169+
by a combination of the version being a SNAPHOT or release version and property
170+
skipStaging=true/false.
171+
In any case we can take advantage of the plugin's "deferred deploy" feature which
172+
makes sure that all artifacts of a multi-module project are deployed as a whole
173+
at the end of the build process instead of deploying each module's artifacts
174+
individually as part of building the module.
175+
-->
176+
<groupId>org.sonatype.plugins</groupId>
177+
<artifactId>nexus-staging-maven-plugin</artifactId>
178+
<version>1.6.5</version>
179+
<extensions>true</extensions>
180+
<configuration>
181+
<serverId>ossrh</serverId>
182+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
183+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
184+
</configuration>
185+
</plugin>
162186
</plugins>
163187
</build>
164188

@@ -232,6 +256,34 @@
232256
</plugins>
233257
</build>
234258
</profile>
259+
<profile>
260+
<!-- this profile generates GPG signatures -->
261+
<id>create_gpg_signature</id>
262+
<activation>
263+
<activeByDefault>false</activeByDefault>
264+
<property>
265+
<name>createGPGSignature</name>
266+
</property>
267+
</activation>
268+
<build>
269+
<plugins>
270+
<plugin>
271+
<groupId>org.apache.maven.plugins</groupId>
272+
<artifactId>maven-gpg-plugin</artifactId>
273+
<version>1.6</version>
274+
<executions>
275+
<execution>
276+
<id>sign-artifacts</id>
277+
<phase>verify</phase>
278+
<goals>
279+
<goal>sign</goal>
280+
</goals>
281+
</execution>
282+
</executions>
283+
</plugin>
284+
</plugins>
285+
</build>
286+
</profile>
235287
</profiles>
236288
<modules>
237289
<module>org.eclipse.paho.client.mqttv3</module>

0 commit comments

Comments
 (0)