When I set up a maven project using Apache fop and Java 11 I get warnings and a NullPointerException
with maven-compiler-plugin 3.8.0.
The used archetype is working fine with Java 11 to quickly create a desktop application, but only if I do not add the dependency to fop-2.3. (I also wonder how it is possible that the same Java code works fine in mvn test but fails when adding the fop dependency.)
adding
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>2.3</version>
</dependency>
to pom.xml and running with mvn test leads to
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ checkXslt ---
[WARNING] Can't extract module name from batik-script-1.10.jar: Provider class org.apache.batik.bridge.RhinoInterpreterFactory not in module
[WARNING] Can't extract module name from xalan-2.7.2.jar: Provider class org.apache.bsf.BSFManager not in module
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project checkXslt: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile failed. NullPointerException -> [Help 1]
I wonder if there is a pom.xml using fop dependency and compiling for Java 11.