Hi
I'm using Flying Saucer in one of my projects to generate pdf files. We are using Java 12 and I came across a modularity problem with the flying-saucer dependencies.
For some reason org.xhtmlrenderer.simple is exported by both flying.saucer.pdf.itext5 and flying.saucer.core.
Error:java: module java.xml.bind reads package org.xhtmlrenderer.simple from both flying.saucer.pdf.itext5 and flying.saucer.core
If you look in the pom of flying.saucer.pdf.itext5 you can find something like:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-SymbolicName>org.xhtmlrenderer.flying.saucer.pdf.itext5</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<!-- Dependency resolution seems not to work properly with default
behavior of importing the exported packages. -->
<Import-Package>!org.xhtmlrenderer.*,*</Import-Package>
<!-- Do not export package org.xhtmlrenderer.simple as it is
already exported by flying-saucer-core and this would lead to a split package
without correctly marking it as such. -->
<Export-Package>!org.xhtmlrenderer.simple,org.xhtmlrenderer.*</Export-Package>
</instructions>
</configuration>
</plugin>
But looks like this doesn't help.
Any suggestions how to fix this?
Greetings.
Joey