Hello Robert
Le 11/04/2018 à 18:45, Robert Scholte a écrit :
> I am not aware of such problem. Did you create a Jira[1] issue for it?
>
> There should be no reason to have a workaround, all the information is
> there so Maven is capable to divide jars properly over both paths. If
> you can add a project so I can reproduce the issue, I can have a look
> at it.
>
I have not yet created a JIRA issue. I tried last week to create a
minimal test case reproducing the issue, without success. The issue
happen with the real project; I have not yet isolated all the conditions
that make the issue happen.
The issue happen with GeoAPI [1]. The following works fine (assuming a
JSR 385 2.0-SNAPSHOT is available on the local repository):
mvn clean install -Pjdk9
But running the following immediately after:
mvn install -Pjdk9
cause the following error message:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile)
on project geoapi: Compilation failure
[ERROR] module not found: java.measure
Executing in debug mode, we can see that the java.measure (JSR-385)
dependency is correctly put in modulepath when maven-compiler-plugin
compiles everything (e.g. when the "clean" phase is present), but not
when the plugin compiles only the classes that have been modified and
that set of classes do not include module-info.java. For example the
following work
touch geoapi/src/main/java9/module-info.java
mvn install -Pjdk9
But maven-compiler-plugin then fails on the next module, unless I touch
the module-info.java of that next module too, /etc./
I will see if I can do a new attempt at creating a minimal test case
later this week.
Martin
[1] https://github.com/opengeospatial/geoapi