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

Deploy to sonatype not working in Java > 1.8 #191

Open
fabriciofx opened this issue Oct 7, 2022 · 4 comments
Open

Deploy to sonatype not working in Java > 1.8 #191

fabriciofx opened this issue Oct 7, 2022 · 4 comments

Comments

@fabriciofx
Copy link
Contributor

I'm trying to deploy some artifacts to sonatype but I can't (I think because my JDK version is 11). See the log (with error message):

[INFO] --- nexus-staging-maven-plugin:1.6.13:deploy (jcabi-deploy-to-sonatype) @ cactoos-jdbc ---
[INFO] Performing local staging (local stagingDirectory="/Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging")...
[INFO]  + Using server credentials "oss.sonatype.org" from Maven settings.
[INFO]  * Connected to Nexus at https://oss.sonatype.org:443/, is version 2.15.1-02 and edition "Professional"
[INFO]  * Using staging profile ID "58caed69ac0b07" (matched by Nexus).
[INFO] Installing /Users/fbc/code/cactoos-jdbc/target/cactoos-jdbc-0.6.1.jar to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.jar
[INFO] Installing /Users/fbc/code/cactoos-jdbc/pom.xml to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.pom
[INFO] Installing /Users/fbc/code/cactoos-jdbc/target/cactoos-jdbc-0.6.1-sources.jar to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-sources.jar
[INFO] Installing /Users/fbc/code/cactoos-jdbc/target/cactoos-jdbc-0.6.1-javadoc.jar to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-javadoc.jar
[INFO] Installing /Users/fbc/code/cactoos-jdbc/target/cactoos-jdbc-0.6.1.jar.asc to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.jar.asc
[INFO] Installing /Users/fbc/code/cactoos-jdbc/target/cactoos-jdbc-0.6.1.pom.asc to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.pom.asc
[INFO] Installing /Users/fbc/code/cactoos-jdbc/target/cactoos-jdbc-0.6.1-sources.jar.asc to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-sources.jar.asc
[INFO] Installing /Users/fbc/code/cactoos-jdbc/target/cactoos-jdbc-0.6.1-javadoc.jar.asc to /Users/fbc/code/cactoos-jdbc/target/nexus-staging/staging/58caed69ac0b07/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-javadoc.jar.asc
[INFO] Performing remote staging...
[INFO] 
[INFO]  * Remote staging into staging profile ID "58caed69ac0b07"
[INFO]  * Created staging repository with ID "comgithubfabriciofx-1011".
[INFO]  * Staging repository at https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011
[INFO]  * Uploading locally staged artifacts to profile com.github.fabriciofx
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.jar.asc
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.jar.asc (659 B at 2.0 kB/s)
Downloading from oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/maven-metadata.xml
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/maven-metadata.xml
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/maven-metadata.xml (313 B at 405 B/s)
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.pom.asc
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.pom.asc (659 B at 2.6 kB/s)
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.jar
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.jar (82 kB at 81 kB/s)
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.pom
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1.pom (11 kB at 14 kB/s)
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-javadoc.jar
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-javadoc.jar (439 kB at 415 kB/s)
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-sources.jar.asc
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-sources.jar.asc (659 B at 2.6 kB/s)
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-sources.jar
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-sources.jar (91 kB at 117 kB/s)
Uploading to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-javadoc.jar.asc
Uploaded to oss.sonatype.org: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubfabriciofx-1011/com/github/fabriciofx/cactoos-jdbc/0.6.1/cactoos-jdbc-0.6.1-javadoc.jar.asc (659 B at 2.6 kB/s)
[INFO]  * Upload of locally staged artifacts finished.
[INFO]  * Closing staging repository with ID "comgithubfabriciofx-1011".

Waiting for operation to complete...
...............

[INFO] Remote staged 1 repositories, finished with success.
[INFO] 
[INFO] --- nexus-staging-maven-plugin:1.6.13:release (jcabi-deploy-to-sonatype) @ cactoos-jdbc ---
[INFO]  + Using server credentials "oss.sonatype.org" from Maven settings.
[INFO]  * Connected to Nexus at https://oss.sonatype.org:443/, is version 2.15.1-02 and edition "Professional"
[INFO] Releasing staging repository with IDs=[comgithubfabriciofx-1011]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:19 min
[INFO] Finished at: 2022-10-06T23:55:47-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:release (jcabi-deploy-to-sonatype) on project cactoos-jdbc: Execution jcabi-deploy-to-sonatype of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:release failed: No converter available
[ERROR] ---- Debugging information ----
[ERROR] message             : No converter available
[ERROR] type                : java.util.Arrays$ArrayList
[ERROR] converter           : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
[ERROR] message[1]          : Unable to make field protected transient int java.util.AbstractList.modCount accessible: module java.base does not "opens java.util" to unnamed module @7c3ebc6b
[ERROR] -------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
@0crat 0crat added the 0crat/new label Oct 7, 2022
@yegor256
Copy link
Member

yegor256 commented Nov 3, 2022

@fabriciofx just run it again. it happens to me too sometimes

@fabriciofx
Copy link
Contributor Author

fabriciofx commented Nov 4, 2022

@yegor256 I just tried it 3 times and nothing. I think still there's a step to conclude. Look:

image

image

The files have been uploaded but aren't be listed in search.maven.org.

@fabriciofx
Copy link
Contributor Author

I think have found a workaround fot this problem: just add these parameters to JVM using a environment variable: JDK_JAVA_OPTIONS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED"

@yegor256
Copy link
Member

@fabriciofx maybe you can add this information to this document: https://github.com/jcabi/jcabi-parent/blob/master/src/site/apt/profile-sonatype.apt.vm

fabriciofx added a commit to fabriciofx/jcabi-parent that referenced this issue Nov 27, 2022
We need add some parameters to JVM do Sonatype deploy work properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants