Am 14.08.2017 um 10:01 schrieb Lukasz Lenart:
Our own problems with jdk9 were 1) problems with reflection (solution: we
got rid of the offending code), 2) needing to use "--add-modules" on tests
(we changed our pom), 3) problems with JAI (this was fixed by oracle and by
a third party).
Can you show how did you change your pom?
I added this to the parent pom:
<profile>
<id>jdk9</id>
<properties>
<addmod>--add-modules java.activation --add-modules
java.xml.bind</addmod>
</properties>
</profile>
Add/merge
<argLine>${addmod}</argLine>
for the tests:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${addmod}</argLine>
</configuration>
</plugin>
Call mvn with -Pjdk9 to enable this. If you have other -P settings, then
you need to group them with comma, so it would be for us -Pjdk9,pedantic
. You can't use -P several times like you do with -D (that's a mistake I
made).
Builds for non-jdk9 would still work because ${addmod} would be empty.
see also
https://issues.apache.org/jira/browse/PDFBOX-3584
which links to the actual commits.
Tilman