Migrate to Maven Central Portal and fix CI memory issues
- Replace nexus-staging-maven-plugin with central-publishing-maven-plugin 0.9.0
- Add maven-source-plugin to generate required sources JAR for Central Portal
- Remove deprecated distributionManagement section
- Add -Dforce.fast=true to GitLab CI to avoid memory issues with JFlex DFA generation
Change-Id: Idd8d5b2d6a2713d93fb0d18429e7d73a7b68f021
diff --git a/pom.xml b/pom.xml
index 4172e92..6b67abf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,16 +50,6 @@
<maven.project.sourceRoots.warningsDisabled>true</maven.project.sourceRoots.warningsDisabled>
</properties>
- <distributionManagement>
- <snapshotRepository>
- <id>korap</id>
- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
- </snapshotRepository>
- <repository>
- <id>korap</id>
- <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
- </repository>
- </distributionManagement>
<build>
<resources>
@@ -303,6 +293,20 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.3.0</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<configuration>
@@ -341,14 +345,13 @@
</executions>
</plugin>
<plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>nexus-staging-maven-plugin</artifactId>
- <version>1.6.13</version>
+ <groupId>org.sonatype.central</groupId>
+ <artifactId>central-publishing-maven-plugin</artifactId>
+ <version>0.9.0</version>
<extensions>true</extensions>
<configuration>
- <serverId>korap</serverId>
- <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
- <autoReleaseAfterClose>false</autoReleaseAfterClose>
+ <publishingServerId>central</publishingServerId>
+ <autoPublish>false</autoPublish>
</configuration>
</plugin>
</plugins>