Skip to content

Commit ea34617

Browse files
authored
Merge pull request #5 from rleigh-codelibre/sonatype
Update maven for releasing with maven central
2 parents 3d2efed + 8cfb349 commit ea34617

File tree

1 file changed

+77
-22
lines changed

1 file changed

+77
-22
lines changed

pom.xml

Lines changed: 77 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>org.openmicroscopy</groupId>
99
<artifactId>ome-common</artifactId>
10-
<version>5.3.0-SNAPSHOT</version>
10+
<version>5.3.0</version>
1111

1212
<name>OME Common Java</name>
1313
<description>Contains common I/O, date parsing, and XML processing classes.</description>
@@ -218,15 +218,19 @@
218218
appears in the <reporting> section, and must be kept in sync. -->
219219
<version>2.10.4</version>
220220
<configuration>
221-
<!-- Workaround for javadoc bug when classes in the default
222-
package access classes from non-default packages. See:
223-
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101868 -->
224-
<use>false</use>
221+
<failOnError>false</failOnError>
225222
<links>
226-
<!-- Java 7 -->
227223
<link>http://docs.oracle.com/javase/7/docs/api/</link>
228224
</links>
229225
</configuration>
226+
<executions>
227+
<execution>
228+
<id>attach-javadocs</id>
229+
<goals>
230+
<goal>jar</goal>
231+
</goals>
232+
</execution>
233+
</executions>
230234
</plugin>
231235

232236
<plugin>
@@ -264,8 +268,9 @@
264268
<!-- Build source artifact in addition to main artifact. -->
265269
<executions>
266270
<execution>
271+
<id>attach-sources</id>
267272
<goals>
268-
<goal>jar</goal>
273+
<goal>jar-no-fork</goal>
269274
</goals>
270275
</execution>
271276
</executions>
@@ -302,24 +307,76 @@
302307
<artifactId>versions-maven-plugin</artifactId>
303308
<version>2.3</version>
304309
</plugin>
305-
306310
</plugins>
307311
</build>
308312

313+
<profiles>
314+
<profile>
315+
<id>doclint-java8-disable</id>
316+
<activation>
317+
<jdk>[1.8,)</jdk>
318+
</activation>
319+
320+
<build>
321+
<plugins>
322+
<plugin>
323+
<groupId>org.apache.maven.plugins</groupId>
324+
<artifactId>maven-javadoc-plugin</artifactId>
325+
<version>2.9.1</version>
326+
<configuration>
327+
<additionalparam>-Xdoclint:none</additionalparam>
328+
</configuration>
329+
</plugin>
330+
</plugins>
331+
</build>
332+
</profile>
333+
<profile>
334+
<id>release</id>
335+
<build>
336+
<plugins>
337+
<!-- Stage releases with nexus -->
338+
<plugin>
339+
<groupId>org.sonatype.plugins</groupId>
340+
<artifactId>nexus-staging-maven-plugin</artifactId>
341+
<version>1.6.7</version>
342+
<extensions>true</extensions>
343+
<configuration>
344+
<serverId>ossrh</serverId>
345+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
346+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
347+
</configuration>
348+
</plugin>
349+
350+
<!-- gpg release signing -->
351+
<plugin>
352+
<groupId>org.apache.maven.plugins</groupId>
353+
<artifactId>maven-gpg-plugin</artifactId>
354+
<version>1.5</version>
355+
<executions>
356+
<execution>
357+
<id>sign-artifacts</id>
358+
<phase>verify</phase>
359+
<goals>
360+
<goal>sign</goal>
361+
</goals>
362+
</execution>
363+
</executions>
364+
</plugin>
365+
</plugins>
366+
</build>
367+
</profile>
368+
</profiles>
369+
309370
<reporting>
310371
<plugins>
311372
<!-- Generate javadocs as part of site generation. -->
312373
<plugin>
374+
<groupId>org.apache.maven.plugins</groupId>
313375
<artifactId>maven-javadoc-plugin</artifactId>
314376
<version>2.9.1</version>
315377
<configuration>
316-
<javadocDirectory>src/main/java</javadocDirectory>
317-
<!-- Workaround for javadoc bug when classes in the default
318-
package access classes from non-default packages. See:
319-
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101868 -->
320-
<use>false</use>
378+
<failOnError>false</failOnError>
321379
<links>
322-
<!-- Java 7 -->
323380
<link>http://docs.oracle.com/javase/7/docs/api/</link>
324381
</links>
325382
</configuration>
@@ -422,16 +479,14 @@
422479
</pluginRepositories>
423480

424481
<distributionManagement>
425-
<repository>
426-
<id>ome.staging</id>
427-
<name>OME Staging Repository</name>
428-
<url>http://artifacts.openmicroscopy.org/artifactory/ome.staging</url>
429-
</repository>
430482
<snapshotRepository>
431-
<id>ome.snapshots</id>
432-
<name>OME Snapshots Repository</name>
433-
<url>http://artifacts.openmicroscopy.org/artifactory/ome.snapshots</url>
483+
<id>ossrh</id>
484+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
434485
</snapshotRepository>
486+
<repository>
487+
<id>ossrh</id>
488+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
489+
</repository>
435490
</distributionManagement>
436491

437492
<developers>

0 commit comments

Comments
 (0)