Skip to content

Switch to nexus plugin for releases #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@
<module>log4j-ecs-layout</module>
<module>log4j2-ecs-layout</module>
<module>logback-ecs-encoder</module>
<module>jul-ecs-formatter</module>
<module>jboss-logmanager-ecs-formatter</module>
<module>log4j2-legacy-tests</module>
<module>log4j-legacy-tests</module>
<module>logback-legacy-tests</module>
<module>jul-ecs-formatter</module>
<!-- IMPORTANT:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case the order is not correct, what is the usual symptom and what are the implications ? does it means a failed pipeline or having to re-start the whole release execution ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result will be that the release is not published on maven-central: It won't be promoted from staging.

This will be detected by #236 , so it is easy to simply abort the release, fix the module order and restart the release workflow.

For the nexus deployment to work correctly, the last project in the build order needs to have deployment
enabled (maven-deploy-plugin.skip must be false).
The reason is that for SNAPSHOT builds the upload is performed by the nexus-staging-maven-plugin
after the last project build and EVERYTHING is skipped if this project is not part of the deployment.
See the documentation (https://github.com/sonatype/nexus-maven-plugins/tree/main/staging/maven-plugin#plugin-flags)
and the related issue (https://issues.sonatype.org/browse/NEXUS-9138).

You can verify the build order by executing ./mvnw clean and looking for the "Reactor Build Order log".
-->
</modules>
<packaging>pom</packaging>
<inceptionYear>2019</inceptionYear>
Expand Down Expand Up @@ -127,9 +137,16 @@
<version>2.16.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<skip>${maven-deploy-plugin.skip}</skip>
<!-- The Base URL of Nexus instance where we want to stage -->
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!-- The server "id" element from settings to use authentication from -->
<serverId>sonatype-nexus-staging</serverId>
<skipNexusStagingDeployMojo>${maven-deploy-plugin.skip}</skipNexusStagingDeployMojo>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -297,8 +314,9 @@
<version>2.5.3</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down