Upgrading nexus staging plugin version #371
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
Upgrading nexus-staging-maven-plugin due to receiving the following error on the latest workflow:
After looking around, I found this is an error specific to the compatibility of the nexus-staging-maven-plugin with JDK 17. There are multiple issues opened on Sonatype related to this (https://issues.sonatype.org/browse/OSSRH-77531, https://issues.sonatype.org/browse/OSSRH-66257, https://issues.sonatype.org/browse/NEXUS-26993) .
One of the workarounds is too add
MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED"
as an environment variable to the GitHub Actions. Another solution however was to upgrade the stream dependency which was done in the latest release of the plugin. Based on this comment it was solved for some of the user by upgrading the staging plugin to 1.6.13 (https://issues.sonatype.org/browse/NEXUS-27902?focusedId=1161045&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1161045) however people are still complaining as of January 2023 that there is no official solution for everyone. This has worked for me when testing against a local nexus server, however it would require paying money to get the nexus license that is identical to what the official release environment has so I am as confident as can be for now. Another option is to be okay with the workaround here of addingMAVEN_OPTS
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.