dashorst opened a new issue, #1757:
URL: https://github.com/apache/wicket/issues/1757
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]