Skip to content

Commit 74c7fbd

Browse files
Prepare for publishing vie the Central Portal (#353)
* Prepare for publishing vie the Central Portal fix: #350 * use longer id * use plexusDistMgmtSnapshotsUrl property * auto publish by njord * fix typo Co-authored-by: Tamas Cservenak <tamas@cservenak.net> --------- Co-authored-by: Tamas Cservenak <tamas@cservenak.net>
1 parent 20d92c1 commit 74c7fbd

File tree

3 files changed

+61
-17
lines changed

3 files changed

+61
-17
lines changed

pom.xml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,13 @@ limitations under the License.
313313

314314
<distributionManagement>
315315
<repository>
316-
<id>plexus-releases</id>
317-
<name>Plexus Release Repository</name>
318-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
316+
<id>sonatype-central-portal</id>
317+
<name>Sonatype Central Portal</name>
318+
<url>https://repo.maven.apache.org/maven2</url>
319319
</repository>
320320
<snapshotRepository>
321-
<id>plexus-snapshots</id>
322-
<name>Plexus Snapshot Repository</name>
321+
<id>${plexusDistMgmtSnapshotsId}</id>
322+
<name>${plexusDistMgmtSnapshotsName}</name>
323323
<url>${plexusDistMgmtSnapshotsUrl}</url>
324324
</snapshotRepository>
325325
<!-- site distribution management must be override in child projects -->
@@ -340,17 +340,28 @@ limitations under the License.
340340
<maven.compiler.proc>none</maven.compiler.proc>
341341
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
342342
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
343-
<plexusDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/plexus-snapshots</plexusDistMgmtSnapshotsUrl>
343+
344+
<plexusDistMgmtSnapshotsId>sonatype-central-portal</plexusDistMgmtSnapshotsId>
345+
<plexusDistMgmtSnapshotsName>Sonatype Central Snapshots</plexusDistMgmtSnapshotsName>
346+
<plexusDistMgmtSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots</plexusDistMgmtSnapshotsUrl>
347+
344348
<project.build.outputTimestamp>2025-05-23T18:11:49Z</project.build.outputTimestamp>
345349
<gpg.useagent>true</gpg.useagent>
346350
<spotless-maven-plugin.version>2.44.5</spotless-maven-plugin.version>
347351
<mavenPluginToolsVersion>3.15.1</mavenPluginToolsVersion>
348352
<mavenFluidoSkinVersion>2.1.0</mavenFluidoSkinVersion>
349353
<mavenSurefireVersion>3.5.3</mavenSurefireVersion>
350354
<junit5Version>5.13.0</junit5Version>
355+
<njord.version>0.7.1</njord.version>
351356
<spotless.action>apply</spotless.action>
352357
<sisuMavenPluginVersion>0.9.0.M4</sisuMavenPluginVersion>
353358
<invoker.streamLogsOnFailures>true</invoker.streamLogsOnFailures>
359+
360+
<!-- njord configuration -->
361+
<njord.autoPublish>true</njord.autoPublish>
362+
<njord.publishingType>automatic</njord.publishingType>
363+
<njord.waitForStates>true</njord.waitForStates>
364+
<njord.enabled>false</njord.enabled>
354365
</properties>
355366

356367
<dependencyManagement>
@@ -368,6 +379,11 @@ limitations under the License.
368379
<build>
369380
<pluginManagement>
370381
<plugins>
382+
<plugin>
383+
<groupId>eu.maveniverse.maven.plugins</groupId>
384+
<artifactId>njord</artifactId>
385+
<version>${njord.version}</version>
386+
</plugin>
371387
<!-- set versions of common plugins for reproducibility, ordered alphabetically -->
372388
<plugin>
373389
<groupId>org.apache.maven.plugins</groupId>
@@ -683,6 +699,13 @@ limitations under the License.
683699
</executions>
684700
</plugin>
685701
</plugins>
702+
<extensions>
703+
<extension>
704+
<groupId>eu.maveniverse.maven.njord</groupId>
705+
<artifactId>extension</artifactId>
706+
<version>${njord.version}</version>
707+
</extension>
708+
</extensions>
686709
</build>
687710

688711
<reporting>
@@ -786,6 +809,11 @@ limitations under the License.
786809
</profile>
787810
<profile>
788811
<id>plexus-release</id>
812+
<properties>
813+
<minimalMavenBuildVersion>3.9.0</minimalMavenBuildVersion>
814+
<!-- use njord during release -->
815+
<njord.enabled>true</njord.enabled>
816+
</properties>
789817
<build>
790818
<plugins>
791819
<!-- Create a source-release artifact that contains the fully buildable

src/site/apt/index.apt

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/site/markdown/index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Plexus Parent POM
2+
3+
Plexus Parent POM defines common [plugins](./plugin-management.html), reporting and release configuration.
4+
5+
## Preparing the environment for publishing vie the Central Portal
6+
7+
Release manager should include the following sections in your personal `settings.xml`:
8+
9+
```xml
10+
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
12+
<servers>
13+
<server>
14+
<id>sonatype-central-portal</id>
15+
<username>jqhacker</username> <!-- central portal token -->
16+
<password>SeCrEt</password> <!-- central portal token -->
17+
<configuration>
18+
<njord.publisher>sonatype-cp</njord.publisher>
19+
<njord.releaseUrl>njord:template:release-sca</njord.releaseUrl>
20+
</configuration>
21+
</server>
22+
</servers>
23+
</settings>
24+
```
25+
26+
Tokens can be obtained from https://central.sonatype.com/account
27+

0 commit comments

Comments
 (0)