aws / random-cut-forest-by-aws

An implementation of the Random Cut Forest data structure for sketching streaming data, with support for anomaly detection, density estimation, imputation, and more.
https://github.com/aws/random-cut-forest-by-aws
Apache License 2.0
206 stars 33 forks source link

Upgrading nexus staging plugin version #371

Closed amitgalitz closed 1 year ago

amitgalitz commented 1 year ago

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 commented 1 year ago

@dblock wondering if you have any input on this?