Skip to content

Commit f51a59f

Browse files
authored
Merge pull request #23 from funfried/release/1.x
Switch from nexus-staging-maven-plugin to central-publishing-maven-pl…
2 parents 5fa8a29 + 2af98f8 commit f51a59f

File tree

1 file changed

+67
-21
lines changed

1 file changed

+67
-21
lines changed

pom.xml

Lines changed: 67 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@
242242
<doclint>all,-missing</doclint>
243243
</configuration>
244244
</plugin>
245+
<plugin>
246+
<groupId>org.apache.maven.plugins</groupId>
247+
<artifactId>maven-source-plugin</artifactId>
248+
<version>3.3.1</version>
249+
</plugin>
245250
<plugin>
246251
<groupId>org.apache.maven.plugins</groupId>
247252
<artifactId>maven-resources-plugin</artifactId>
@@ -268,13 +273,20 @@
268273
<version>2.19.1</version>
269274
</plugin>
270275
<plugin>
271-
<groupId>org.sonatype.plugins</groupId>
272-
<artifactId>nexus-staging-maven-plugin</artifactId>
273-
<version>1.7.0</version>
276+
<groupId>org.codehaus.mojo</groupId>
277+
<artifactId>build-helper-maven-plugin</artifactId>
278+
<version>3.6.1</version>
279+
</plugin>
280+
<plugin>
281+
<groupId>org.sonatype.central</groupId>
282+
<artifactId>central-publishing-maven-plugin</artifactId>
283+
<extensions>true</extensions>
284+
<version>0.9.0</version>
274285
<configuration>
275-
<serverId>sonatype-nexus-staging</serverId>
276-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
277-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
286+
<publishingServerId>central</publishingServerId>
287+
<waitUntil>published</waitUntil>
288+
<autoPublish>true</autoPublish>
289+
<tokenAuth>true</tokenAuth>
278290
</configuration>
279291
</plugin>
280292
<plugin>
@@ -380,18 +392,6 @@
380392
</execution>
381393
</executions>
382394
</plugin>
383-
<plugin>
384-
<groupId>org.apache.maven.plugins</groupId>
385-
<artifactId>maven-javadoc-plugin</artifactId>
386-
<executions>
387-
<execution>
388-
<id>attach-javadocs</id>
389-
<goals>
390-
<goal>jar</goal>
391-
</goals>
392-
</execution>
393-
</executions>
394-
</plugin>
395395
<plugin>
396396
<groupId>org.eclipse.tycho</groupId>
397397
<artifactId>target-platform-configuration</artifactId>
@@ -466,9 +466,55 @@
466466
<build>
467467
<plugins>
468468
<plugin>
469-
<groupId>org.sonatype.plugins</groupId>
470-
<artifactId>nexus-staging-maven-plugin</artifactId>
471-
<extensions>true</extensions>
469+
<groupId>org.codehaus.mojo</groupId>
470+
<artifactId>build-helper-maven-plugin</artifactId>
471+
<executions>
472+
<execution>
473+
<id>regex-snapshot-property</id>
474+
<phase>validate</phase>
475+
<goals>
476+
<goal>regex-property</goal>
477+
</goals>
478+
<configuration>
479+
<name>project.version.isSnapshot</name>
480+
<value>${project.version}</value>
481+
<regex>.*(-SNAPSHOT)$</regex>
482+
<replacement>true</replacement>
483+
<failIfNoMatch>false</failIfNoMatch>
484+
</configuration>
485+
</execution>
486+
</executions>
487+
</plugin>
488+
<plugin>
489+
<groupId>org.sonatype.central</groupId>
490+
<artifactId>central-publishing-maven-plugin</artifactId>
491+
<configuration>
492+
<skipPublishing>${project.version.isSnapshot}</skipPublishing>
493+
</configuration>
494+
</plugin>
495+
<plugin>
496+
<groupId>org.apache.maven.plugins</groupId>
497+
<artifactId>maven-javadoc-plugin</artifactId>
498+
<executions>
499+
<execution>
500+
<id>attach-javadocs</id>
501+
<goals>
502+
<goal>jar</goal>
503+
</goals>
504+
</execution>
505+
</executions>
506+
</plugin>
507+
<plugin>
508+
<groupId>org.apache.maven.plugins</groupId>
509+
<artifactId>maven-source-plugin</artifactId>
510+
<executions>
511+
<execution>
512+
<id>attach-sources</id>
513+
<goals>
514+
<goal>jar-no-fork</goal>
515+
</goals>
516+
</execution>
517+
</executions>
472518
</plugin>
473519
</plugins>
474520
</build>

0 commit comments

Comments
 (0)