Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.

Commit cf07ea8

Browse files
authored
chore: add workaround for sonatype issue with Java 17 (#1703)
The release in https://togithub.com/googleapis/sdk-platform-java/pull/1674 failed with the following error: ``` [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:release (default-cli) on project gapic-generator-java-root: Execution default-cli 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 @6a1d526c [ERROR] ------------------------------- ``` Using the workaround created in https://togithub.com/GoogleCloudPlatform/spring-cloud-gcp/pull/1576 to resolve this issue.
1 parent b204f3f commit cf07ea8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.kokoro/release/stage.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ pushd $(dirname "$0")/../../
3030
setup_environment_secrets
3131
create_settings_xml_file "settings.xml"
3232

33+
# workaround for nexus maven plugin issue with Java 16+: https://issues.sonatype.org/browse/OSSRH-66257
34+
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
35+
3336
mvn clean deploy -B \
3437
-DskipTests=true \
3538
-Dclirr.skip=true \

0 commit comments

Comments
 (0)