Skip to content

Commit e220cc7

Browse files
authored
chore: fix Maven Central publishing and update plugins (#156)
* chore: fix Maven Central publishing and update plugins - Switch to POM 4.0.0 with flatten-maven-plugin for ${revision} support - Set version to 0.8.3-SNAPSHOT - Add flatten-maven-plugin 1.7.0 - Add maven-release-plugin with release profile - Move central-publishing-maven-plugin 0.10.0 to release profile - Restore distributionManagement for release:perform compatibility - Update maven-gpg-plugin 1.6 → 3.2.8 (fix GPG signature format) - Update maven-source-plugin 3.2.0 → 3.3.1 - Update error_prone_core 2.36.0 → 2.39.0 - Update gmavenplus-plugin 3.0.2 → 4.2.0 - Update maven-surefire-plugin 3.5.2 → 3.5.5 - Update jacoco-maven-plugin 0.8.12 → 0.8.13 - Update maven-javadoc-plugin 3.10.1 → 3.12.0 * chore: downgrade Maven wrapper to 3.9.14 Maven 4 RC generates consumer POM that breaks central-publishing-maven-plugin uploads to Sonatype Central. * chore: add maven-deploy-plugin skip (central-publishing handles deploy) * chore: enable autoPublish for Maven Central
1 parent 07a10da commit e220cc7

2 files changed

Lines changed: 45 additions & 11 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
wrapperVersion=3.3.4
22
distributionType=only-script
3-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0-rc-5/apache-maven-4.0.0-rc-5-bin.zip
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.14/apache-maven-3.9.14-bin.zip

pom.xml

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd" root="true">
3-
<modelVersion>4.1.0</modelVersion>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>com.devskiller</groupId>
66
<artifactId>jfairy</artifactId>
7-
<version>0.8.2-SNAPSHOT</version>
7+
<version>${revision}</version>
88

99
<name>jFairy</name>
1010
<description>Java fake data generator</description>
@@ -73,7 +73,7 @@
7373
</ciManagement>
7474

7575
<properties>
76-
<revision>0.6.5-SNAPSHOT</revision>
76+
<revision>0.8.3-SNAPSHOT</revision>
7777
<maven.compiler.source>17</maven.compiler.source>
7878
<maven.compiler.target>17</maven.compiler.target>
7979
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -198,15 +198,15 @@
198198
<path>
199199
<groupId>com.google.errorprone</groupId>
200200
<artifactId>error_prone_core</artifactId>
201-
<version>2.36.0</version>
201+
<version>2.39.0</version>
202202
</path>
203203
</annotationProcessorPaths>
204204
</configuration>
205205
</plugin>
206206
<plugin>
207207
<groupId>org.codehaus.gmavenplus</groupId>
208208
<artifactId>gmavenplus-plugin</artifactId>
209-
<version>3.0.2</version>
209+
<version>4.2.0</version>
210210
<executions>
211211
<execution>
212212
<goals>
@@ -249,7 +249,7 @@
249249
</plugin>
250250
<plugin>
251251
<artifactId>maven-surefire-plugin</artifactId>
252-
<version>3.5.2</version>
252+
<version>3.5.5</version>
253253
<configuration>
254254
<includes>
255255
<include>**/*Spec.java</include>
@@ -265,7 +265,7 @@
265265
<plugin>
266266
<groupId>org.jacoco</groupId>
267267
<artifactId>jacoco-maven-plugin</artifactId>
268-
<version>0.8.12</version>
268+
<version>0.8.13</version>
269269
<executions>
270270
<execution>
271271
<id>prepare-agent</id>
@@ -275,6 +275,39 @@
275275
</execution>
276276
</executions>
277277
</plugin>
278+
<plugin>
279+
<groupId>org.codehaus.mojo</groupId>
280+
<artifactId>flatten-maven-plugin</artifactId>
281+
<version>1.7.0</version>
282+
<configuration>
283+
<outputDirectory>${project.build.directory}</outputDirectory>
284+
<updatePomFile>true</updatePomFile>
285+
<flattenMode>oss</flattenMode>
286+
</configuration>
287+
<executions>
288+
<execution>
289+
<id>flatten</id>
290+
<phase>prepare-package</phase>
291+
<goals>
292+
<goal>flatten</goal>
293+
</goals>
294+
</execution>
295+
<execution>
296+
<id>flatten-clean</id>
297+
<phase>clean</phase>
298+
<goals>
299+
<goal>clean</goal>
300+
</goals>
301+
</execution>
302+
</executions>
303+
</plugin>
304+
<plugin>
305+
<groupId>org.apache.maven.plugins</groupId>
306+
<artifactId>maven-deploy-plugin</artifactId>
307+
<configuration>
308+
<skip>true</skip>
309+
</configuration>
310+
</plugin>
278311
<plugin>
279312
<groupId>org.apache.maven.plugins</groupId>
280313
<artifactId>maven-release-plugin</artifactId>
@@ -320,7 +353,7 @@
320353
<plugin>
321354
<groupId>org.apache.maven.plugins</groupId>
322355
<artifactId>maven-javadoc-plugin</artifactId>
323-
<version>3.10.1</version>
356+
<version>3.12.0</version>
324357
<configuration>
325358
<doclint>none</doclint>
326359
</configuration>
@@ -349,7 +382,8 @@
349382
</executions>
350383
<configuration>
351384
<publishingServerId>central</publishingServerId>
352-
<autoPublish>false</autoPublish>
385+
<autoPublish>true</autoPublish>
386+
<waitUntil>published</waitUntil>
353387
</configuration>
354388
</plugin>
355389
</plugins>

0 commit comments

Comments
 (0)