Skip to content

Commit d0155b9

Browse files
committed
LDEV-6241 migrate from nexus-staging to central-publishing-maven-plugin
1 parent fd1258a commit d0155b9

2 files changed

Lines changed: 19 additions & 50 deletions

File tree

maven-settings.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
5-
<pluginGroups></pluginGroups>
6-
<proxies></proxies>
4+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
75
<servers>
86
<server>
97
<id>ossrh</id>
108
<username>${env.MAVEN_USERNAME}</username>
119
<password>${env.MAVEN_PASSWORD}</password>
1210
</server>
1311
</servers>
14-
<mirrors></mirrors>
1512
<profiles>
1613
<profile>
1714
<id>ossrh</id>
1815
<activation>
1916
<activeByDefault>true</activeByDefault>
2017
</activation>
2118
<properties>
22-
<gpg.executable>gpg2</gpg.executable>
2319
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
2420
</properties>
2521
</profile>
2622
</profiles>
27-
</settings>
23+
</settings>

pom.xml

Lines changed: 17 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
1616
<build.timestamp>${maven.build.timestamp}</build.timestamp>
1717
<bundlename>org.lucee.hibernate.extension</bundlename>
18-
<release.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.url>
19-
<snapshot.url>https://oss.sonatype.org/content/repositories/snapshots/</snapshot.url>
18+
<release.url>https://central.sonatype.com/api/v1/publisher/deployments/download/</release.url>
19+
<snapshot.url>https://central.sonatype.com/repository/maven-snapshots/</snapshot.url>
2020
</properties>
2121

2222
<scm>
@@ -26,17 +26,6 @@
2626
<tag>${project.version}</tag>
2727
</scm>
2828

29-
<distributionManagement>
30-
<repository>
31-
<id>ossrh</id>
32-
<url>${release.url}</url>
33-
</repository>
34-
<snapshotRepository>
35-
<id>ossrh</id>
36-
<url>${snapshot.url}</url>
37-
</snapshotRepository>
38-
</distributionManagement>
39-
4029
<licenses>
4130
<license>
4231
<name>The GNU Lesser General Public License, Version 2.1</name>
@@ -145,6 +134,15 @@
145134
<id>terracotta</id>
146135
<url>https://repo.terracotta.org/maven2/</url>
147136
</repository>
137+
<repository>
138+
<id>sonatype-central-snapshots</id>
139+
<name>Sonatype Central Snapshots</name>
140+
<url>https://central.sonatype.com/repository/maven-snapshots</url>
141+
<snapshots>
142+
<enabled>true</enabled>
143+
<updatePolicy>always</updatePolicy>
144+
</snapshots>
145+
</repository>
148146
</repositories>
149147

150148
<!-- ============================== Build ============================== -->
@@ -351,40 +349,15 @@
351349
</executions>
352350
</plugin>
353351

354-
<!-- Deploy -->
355-
<plugin>
356-
<groupId>org.apache.maven.plugins</groupId>
357-
<artifactId>maven-deploy-plugin</artifactId>
358-
<version>3.1.2</version>
359-
<executions>
360-
<execution>
361-
<id>default-deploy</id>
362-
<phase>deploy</phase>
363-
<goals>
364-
<goal>deploy-file</goal>
365-
</goals>
366-
<configuration>
367-
<file>${project.build.directory}/${project.artifactId}-${project.version}.lex</file>
368-
<groupId>${project.groupId}</groupId>
369-
<artifactId>${project.artifactId}</artifactId>
370-
<version>${project.version}</version>
371-
<repositoryId>ossrh</repositoryId>
372-
<url>${snapshot.url}</url>
373-
<packaging>lex</packaging>
374-
</configuration>
375-
</execution>
376-
</executions>
377-
</plugin>
378-
352+
<!-- Central Publishing -->
379353
<plugin>
380-
<groupId>org.sonatype.plugins</groupId>
381-
<artifactId>nexus-staging-maven-plugin</artifactId>
382-
<version>1.6.13</version>
354+
<groupId>org.sonatype.central</groupId>
355+
<artifactId>central-publishing-maven-plugin</artifactId>
356+
<version>0.10.0</version>
383357
<extensions>true</extensions>
384358
<configuration>
385-
<serverId>ossrh</serverId>
386-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
387-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
359+
<publishingServerId>ossrh</publishingServerId>
360+
<autoPublish>true</autoPublish>
388361
</configuration>
389362
</plugin>
390363
</plugins>

0 commit comments

Comments
 (0)