The generated promote script fails to release the staging repository on JDK 17 and later

Abierto
#1,757 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, shell, wasm
Área
tooling

Línea de trabajo

The pinned plugin call is at line 74 of release.sh, which generates promote-$version.sh; the rc-drop call in the generated revert script needs the same check. Start by reproducing the rc-release failure on JDK 17 or later and confirming that the MAVEN_OPTS add-opens flags make it pass with 1.7.0. Done means the generated promote and revert scripts use one plugin version and the required opens, on both master and wicket-10.x.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The promote-$version.sh that release.sh generates fails at the Nexus release step when Maven runs on JDK 17 or later, and with set -e (#1749) it stops there. By then the tag is pushed and the distribution has moved to dist/release, but the staging repository isn't released and the next development version isn't set.

release.sh line 74 pins the plugin for that step:

mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-release -DstagingRepositoryId=$stagingrepoid ...

while rc-list, rc-close and rc-drop use LATEST. Version 1.6.7 bundles xstream 1.4.7, which can't run on a current JDK:

An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-release: java.lang.ExceptionInInitializerError: null
... Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module

Moving to 1.7.0 (LATEST) is not enough on its own. rc-list and rc-close work with it, but rc-release serializes a list through xstream and fails the same way:

Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.7.0:rc-release ... No converter available
type      : java.util.Arrays$ArrayList
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

It succeeds with 1.7.0 when the JVM opens the packages xstream reflects on:

MAVEN_OPTS="--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED" \
  mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.7.0:rc-release ...

The generated promote script should use the same plugin version as the other steps and pass these options for the release step. rc-drop in the generated revert script runs the same plugin and should be checked for the same failure. Both master and wicket-10.x have the pin.

Found while promoting 11.0.0. Follows up on #1749.

Lenguaje dominante
Java
Estrellas
799
Forks
421
Merge medio
20 h 5 min
PR fusionados (30 d)
125

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/wicket

Todos los issues de apache/wicket

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.