Skip to content

Commit 0e9a8f6

Browse files
authored
Merge pull request #81 from DSpace/sonatype-central-portal
Update POM to use Sonatype's Central Portal for Maven Releases
2 parents eb5c297 + 65227b3 commit 0e9a8f6

1 file changed

Lines changed: 23 additions & 38 deletions

File tree

pom.xml

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<organization>
1313
<name>LYRASIS</name>
14-
<url>http://www.dspace.org</url>
14+
<url>https://www.dspace.org</url>
1515
</organization>
1616

1717
<properties>
@@ -162,9 +162,9 @@
162162
</plugin>
163163
<!-- Used to generate a new release via Sonatype (see release profile). -->
164164
<plugin>
165-
<groupId>org.sonatype.plugins</groupId>
166-
<artifactId>nexus-staging-maven-plugin</artifactId>
167-
<version>1.7.0</version>
165+
<groupId>org.sonatype.central</groupId>
166+
<artifactId>central-publishing-maven-plugin</artifactId>
167+
<version>0.8.0</version>
168168
</plugin>
169169
<!-- Used to generate JavaDocs for new releases (see release profile). -->
170170
<plugin>
@@ -235,7 +235,7 @@
235235
<profiles>
236236
<!--
237237
The 'release' profile is used by the 'maven-release-plugin' (see above)
238-
to actually perform an dspace-replicate release to Maven central.
238+
to actually perform an dspace-replicate release to Maven Central.
239239
This profile contains settings which are ONLY enabled when performing
240240
a DSpace module release. See also https://wiki.lyrasis.org/display/DSPACE/Release+Procedure
241241
NOTE: You MUST trigger this profile by running "-Drelease"
@@ -252,26 +252,24 @@
252252
</activation>
253253
<build>
254254
<plugins>
255-
<!-- Configure Nexus plugin for new releases via Sonatype.
256-
See: http://central.sonatype.org/pages/apache-maven.html -->
255+
<!--
256+
Configure Central Publishing Plugin for new releases via Sonatype.
257+
See: https://central.sonatype.org/publish/publish-portal-maven/
258+
A few notes on how this plugin works:
259+
1. In your settings.xml, your user/password tokens MUST be specified for a <server> tag
260+
with <id>central</id>. Otherwise, you will see a 401 Unauthorized error.
261+
2. The <distributionManagement> POM section is no longer needed. This plugin defaults to
262+
uploading releases to Central Portal (https://central.sonatype.com/publishing)
263+
and -SNAPSHOT releases to https://central.sonatype.com/repository/maven-snapshots/
264+
3. Sonatype has publishing *requirements* which must be met. Our POM is already configured to
265+
meet those requirements: https://central.sonatype.org/publish/requirements/
266+
-->
257267
<plugin>
258-
<groupId>org.sonatype.plugins</groupId>
259-
<artifactId>nexus-staging-maven-plugin</artifactId>
268+
<groupId>org.sonatype.central</groupId>
269+
<artifactId>central-publishing-maven-plugin</artifactId>
260270
<extensions>true</extensions>
261-
<configuration>
262-
<!-- In your settings.xml, your username/password
263-
MUST be specified for server 'ossrh' -->
264-
<serverId>ossrh</serverId>
265-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
266-
<!-- Disable autoclose of repository after upload, as this sometimes times out -->
267-
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
268-
<!-- Require manual verification / release to Maven Central -->
269-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
270-
<!-- Increase Staging timeout to 10mins -->
271-
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
272-
</configuration>
273271
</plugin>
274-
<!-- For new releases, generate Source JAR files -->
272+
<!-- Per Sonatype publishing requirements, generate Source JAR files -->
275273
<plugin>
276274
<groupId>org.apache.maven.plugins</groupId>
277275
<artifactId>maven-source-plugin</artifactId>
@@ -284,7 +282,7 @@
284282
</execution>
285283
</executions>
286284
</plugin>
287-
<!-- For new releases, generate JavaDocs -->
285+
<!-- Per Sonatype publishing requirements, generate JavaDocs -->
288286
<plugin>
289287
<groupId>org.apache.maven.plugins</groupId>
290288
<artifactId>maven-javadoc-plugin</artifactId>
@@ -297,7 +295,7 @@
297295
</execution>
298296
</executions>
299297
</plugin>
300-
<!-- Sign any new releases via GPG.
298+
<!-- Per Sonatype publishing requirements, sign any new releases via GPG.
301299
NOTE: you may optionally specify the "gpg.passphrase" in your settings.xml -->
302300
<plugin>
303301
<groupId>org.apache.maven.plugins</groupId>
@@ -457,23 +455,10 @@
457455
<scm>
458456
<connection>scm:git:git@github.com:DSpace/dspace-replicate.git</connection>
459457
<developerConnection>scm:git:git@github.com:DSpace/dspace-replicate.git</developerConnection>
460-
<url>git@github.com:DSpace/dspace-replicate.git</url>
458+
<url>https://github.com/DSpace/dspace-replicate</url>
461459
<tag>HEAD</tag>
462460
</scm>
463461

464-
<!-- Configure our release repositories to use Sonatype.
465-
See: http://central.sonatype.org/pages/apache-maven.html -->
466-
<distributionManagement>
467-
<snapshotRepository>
468-
<id>ossrh</id>
469-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
470-
</snapshotRepository>
471-
<repository>
472-
<id>ossrh</id>
473-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
474-
</repository>
475-
</distributionManagement>
476-
477462
<developers>
478463
<developer>
479464
<name>DSpace Committers</name>

0 commit comments

Comments
 (0)