Skip to content

Commit 53a8fd0

Browse files
committed
Update configuration to publish artifacts in Maven Central
1 parent 8da8101 commit 53a8fd0

File tree

1 file changed

+97
-25
lines changed

1 file changed

+97
-25
lines changed

pom.xml

Lines changed: 97 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<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">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24
<modelVersion>4.0.0</modelVersion>
35

46
<groupId>io.github.bonigarcia</groupId>
@@ -33,6 +35,9 @@
3335
<maven-site.version>3.21.0</maven-site.version>
3436
<maven-project-info-reports.version>3.9.0</maven-project-info-reports.version>
3537
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
38+
<central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
39+
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
40+
<maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version>
3641

3742
<!-- Java -->
3843
<java.version>17</java.version>
@@ -188,8 +193,10 @@
188193
<artifactId>maven-release-plugin</artifactId>
189194
<version>${maven-release-plugin.version}</version>
190195
<configuration>
191-
<releaseProfiles>sonatype-oss-release</releaseProfiles>
192-
<useReleaseProfile>true</useReleaseProfile>
196+
<autoVersionSubmodules>true</autoVersionSubmodules>
197+
<useReleaseProfile>false</useReleaseProfile>
198+
<releaseProfiles>release</releaseProfiles>
199+
<goals>deploy</goals>
193200
</configuration>
194201
</plugin>
195202
<plugin>
@@ -312,45 +319,110 @@
312319
<groupId>org.apache.maven.plugins</groupId>
313320
<artifactId>maven-javadoc-plugin</artifactId>
314321
<version>${maven-javadoc-plugin.version}</version>
315-
<executions>
316-
<execution>
317-
<id>attach-javadocs</id>
318-
<goals>
319-
<goal>jar</goal>
320-
</goals>
321-
</execution>
322-
</executions>
323322
<configuration>
324-
<source>8</source>
323+
<additionalOptions>-Xdoclint:none</additionalOptions>
324+
<source>${java.version}</source>
325325
</configuration>
326326
</plugin>
327+
<plugin>
328+
<groupId>org.apache.maven.plugins</groupId>
329+
<artifactId>maven-jxr-plugin</artifactId>
330+
<version>${maven-jxr-plugin.version}</version>
331+
</plugin>
327332
</plugins>
328333
</build>
329334

330335
<distributionManagement>
331336
<snapshotRepository>
332-
<id>sonatype-nexus-snapshots</id>
333-
<name>Sonatype Nexus snapshot repository</name>
334-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
337+
<id>central</id>
338+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
335339
</snapshotRepository>
336340
<repository>
337-
<id>sonatype-nexus-staging</id>
338-
<name>Sonatype Nexus release repository</name>
339-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
341+
<id>central</id>
342+
<url>https://central.sonatype.com</url>
340343
</repository>
341344
</distributionManagement>
342345

346+
<repositories>
347+
<repository>
348+
<id>central-portal-snapshots</id>
349+
<name>Central Portal Snapshots</name>
350+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
351+
<releases>
352+
<enabled>false</enabled>
353+
</releases>
354+
<snapshots>
355+
<enabled>true</enabled>
356+
</snapshots>
357+
</repository>
358+
</repositories>
359+
360+
<reporting>
361+
<plugins>
362+
<plugin>
363+
<groupId>org.apache.maven.plugins</groupId>
364+
<artifactId>maven-javadoc-plugin</artifactId>
365+
<version>${maven-javadoc-plugin.version}</version>
366+
<configuration>
367+
<additionalOptions>-Xdoclint:none</additionalOptions>
368+
</configuration>
369+
</plugin>
370+
<plugin>
371+
<groupId>org.apache.maven.plugins</groupId>
372+
<artifactId>maven-jxr-plugin</artifactId>
373+
<version>${maven-jxr-plugin.version}</version>
374+
</plugin>
375+
</plugins>
376+
</reporting>
377+
343378
<profiles>
344379
<profile>
345-
<id>release-sign-artifacts</id>
346-
<activation>
347-
<property>
348-
<name>performRelease</name>
349-
<value>true</value>
350-
</property>
351-
</activation>
380+
<id>release</id>
352381
<build>
353382
<plugins>
383+
<plugin>
384+
<groupId>org.sonatype.central</groupId>
385+
<artifactId>central-publishing-maven-plugin</artifactId>
386+
<version>${central-publishing-maven-plugin.version}</version>
387+
<extensions>true</extensions>
388+
<configuration>
389+
<publishingServerId>central</publishingServerId>
390+
<autoPublish>true</autoPublish>
391+
<waitUntil>published</waitUntil>
392+
</configuration>
393+
</plugin>
394+
395+
<plugin>
396+
<groupId>org.apache.maven.plugins</groupId>
397+
<artifactId>maven-source-plugin</artifactId>
398+
<version>${maven-source-plugin.version}</version>
399+
<executions>
400+
<execution>
401+
<id>attach-sources</id>
402+
<goals>
403+
<goal>jar-no-fork</goal>
404+
</goals>
405+
</execution>
406+
</executions>
407+
</plugin>
408+
409+
<plugin>
410+
<groupId>org.apache.maven.plugins</groupId>
411+
<artifactId>maven-javadoc-plugin</artifactId>
412+
<version>${maven-javadoc-plugin.version}</version>
413+
<configuration>
414+
<additionalOptions>-Xdoclint:none</additionalOptions>
415+
</configuration>
416+
<executions>
417+
<execution>
418+
<id>attach-javadocs</id>
419+
<goals>
420+
<goal>jar</goal>
421+
</goals>
422+
</execution>
423+
</executions>
424+
</plugin>
425+
354426
<plugin>
355427
<groupId>org.apache.maven.plugins</groupId>
356428
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)