Skip to content

Commit e54545a

Browse files
committed
Change to the central-publishing-maven-plugin
1 parent 721321e commit e54545a

File tree

6 files changed

+18
-40
lines changed

6 files changed

+18
-40
lines changed

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ pipeline {
137137
sh 'mvn -B -T 1C -f pom-plain.xml compile'
138138
}
139139
}
140-
stage('Deploy to OSSRH') {
140+
stage('Deploy to Central') {
141141
when {
142142
anyOf {
143143
allOf {
@@ -162,8 +162,8 @@ pipeline {
162162
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust;
163163
done
164164
'''
165-
lock('ossrh') {
166-
sh 'mvn -B -f pom-plain.xml -P ossrh,eclipse-sign deploy'
165+
lock('central-deploy') {
166+
sh 'mvn -B -f pom-plain.xml -P central-deploy,eclipse-sign deploy'
167167
}
168168
}
169169
}

examples/org.eclipse.epsilon.examples.ecl.evl/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
<repositories>
1313
<repository>
14-
<id>ossrh</id>
15-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
14+
<id>central-snapshots</id>
15+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
1616
<releases>
1717
<enabled>false</enabled>
1818
</releases>

examples/org.eclipse.epsilon.examples.egl.strings/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
<repositories>
1313
<repository>
14-
<id>ossrh</id>
15-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
14+
<id>central-snapshots</id>
15+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
1616
<releases>
1717
<enabled>false</enabled>
1818
</releases>

examples/org.eclipse.epsilon.examples.standalone/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
<repositories>
1111
<repository>
12-
<id>ossrh</id>
13-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
12+
<id>central-snapshots</id>
13+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
1414
<releases>
1515
<enabled>false</enabled>
1616
</releases>

pom-plain.xml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -812,21 +812,6 @@ same version of EMF / other bits always.
812812
</pluginRepository>
813813
</pluginRepositories>
814814

815-
<distributionManagement>
816-
<repository>
817-
<uniqueVersion>false</uniqueVersion>
818-
<id>ossrh</id>
819-
<name>OSSRH Release Staging Repository</name>
820-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
821-
</repository>
822-
<snapshotRepository>
823-
<uniqueVersion>false</uniqueVersion>
824-
<id>ossrh</id>
825-
<name>OSSRH Snapshots Repository</name>
826-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
827-
</snapshotRepository>
828-
</distributionManagement>
829-
830815
<profiles>
831816
<!-- NOTE: these two profiles have to be in this exact order, so we first
832817
sign the JAR with a certificate, and then we GPG sign the resulting
@@ -858,22 +843,22 @@ same version of EMF / other bits always.
858843
</profile>
859844

860845
<profile>
861-
<id>ossrh</id>
846+
<id>central-deploy</id>
862847
<build>
863848
<plugins>
864849
<plugin>
865-
<groupId>org.sonatype.plugins</groupId>
866-
<artifactId>nexus-staging-maven-plugin</artifactId>
867-
<version>1.6.13</version>
850+
<groupId>org.sonatype.central</groupId>
851+
<artifactId>central-publishing-maven-plugin</artifactId>
852+
<version>0.7.0</version>
868853
<extensions>true</extensions>
869854
<configuration>
870-
<serverId>ossrh</serverId>
871-
<nexusUrl>https://oss.sonatype.org</nexusUrl>
872-
<!-- We want to check staged releases manually on
873-
Sonatype OSSRH before we propagate to Central. -->
874-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
855+
<publishingServerId>central</publishingServerId>
856+
<autoPublish>true</autoPublish>
857+
<waitUntil>published</waitUntil>
858+
<centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl>
875859
</configuration>
876860
</plugin>
861+
877862
<!-- Anything that goes to Central must be GPG signed -->
878863
<plugin>
879864
<groupId>org.apache.maven.plugins</groupId>

pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@
4444
</pluginRepository>
4545
</pluginRepositories>
4646

47-
<distributionManagement>
48-
<snapshotRepository>
49-
<id>ossrh</id>
50-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
51-
</snapshotRepository>
52-
</distributionManagement>
53-
5447
<modules>
5548
<module>plugins</module>
5649
<module>features</module>

0 commit comments

Comments
 (0)