Closed gtiwari333 closed 7 months ago
https://github.com/drewnoakes/metadata-extractor/pull/634
Opened this new PR.
@drewnoakes I would really appreciate if you review/merge/release this PR.
I ran the regression tests, pushed a few updates to this PR, merged it, and tried to make a release. I hit an error:
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project metadata-extractor: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
Upgrading to 1.6.13 was recommended online but led to another error:
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:release (default-cli) on project metadata-extractor: 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 @316acbb5
[ERROR] -------------------------------
Any ideas about this? I'm out of time to look further today.
In the end I found a workaround here, via:
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"
Your change should be available in 2.19.0. Let me know if you hit any issues.
In the end I found a workaround here, via:
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"
Bitten by some of the new restrictions in more recent Java versions it seems. Use Java 8 and those things don't exist 😉
Sounds like going back to Java 8 would be a good step forward 😆
This PR ports the change that were made on C# repo to this Java repo. https://github.com/drewnoakes/metadata-extractor-dotnet/pull/341/files