Skip to content
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

Upgrading nexus staging plugin version #371

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

amitgalitz
Copy link
Contributor

Description of changes:
Upgrading nexus-staging-maven-plugin due to receiving the following error on the latest workflow: 


Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) on project randomcutforest-parent: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy failed: 
An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy: java.lang.ExceptionInInitializerError: null


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 adding MAVEN_OPTS.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@amitgalitz amitgalitz requested a review from sudiptoguha March 6, 2023 20:08
@amitgalitz
Copy link
Contributor Author

@dblock wondering if you have any input on this?

@sudiptoguha sudiptoguha merged commit fc4f82e into aws:main Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants