Dspace mvn compilation error
psigx opened this issue · comments
Hello There!
Trying to install Dspace via maven build (on Windows server 2016) and an unhandled exception was thrown by the Error Prone static analysis plugin. See deets below, as directed to share these here:
Error-prone version: 2.10.0
BugPattern: ReferenceEquality
Stack Trace:
com.google.common.util.concurrent.ExectutionError: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree$JCExpression com.sun.tools.javac.tree.TreeMaker.Select(com.sun.tools.javac.tree.JCTree$Expression, com.sun.tools.javac.code.Symbol)'
Please see accompanying screenshot attached :)
Any help would be greatly appreciated.
Simon
The TreeMaker.Select
issue is a change in recent JDK versions, newer releases of Error Prone include a fix.
Updating to the latest version of Error Prone should fix the crash.
Did you try editing DSpace's build to use the latest version of Error Prone?
I think updating this line of the pom.xml
file should do it:
https://github.com/DSpace/DSpace/blob/2af0509a4c739e2a4b64753744f58c81d610fb14/pom.xml#L32
Fwiw, I would "just" try building with a not-so-recent JDK, their CI uses JDK 17: https://github.com/DSpace/DSpace/blob/main/.github/workflows/build.yml