Martin Tzvetanov Grigorov created MCOMPILER-482:
---------------------------------------------------
Summary: JPMS regression: optional transitive module is not found
Key: MCOMPILER-482
URL: https://issues.apache.org/jira/browse/MCOMPILER-482
Project: Maven Compiler Plugin
Issue Type: Bug
Affects Versions: 3.9.0
Reporter: Martin Tzvetanov Grigorov
Apache Wicket's build fails with maven-compiler-plugin:3.9.0:
{code:java}
INFO] --- maven-compiler-plugin:3.9.0:compile (default-compile) @ wicket-core
---
[WARNING]
*******************************************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected:
[commons-fileupload-1.4.jar, javax.servlet-api-3.1.0.jar]. Please don't publish
this project to a public artifact repository! *
[WARNING]
*******************************************************************************************************************************************************************************
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 834 source files to
/home/martin/git/apache/wicket-9.x/wicket-core/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] module not found: org.apiguardian.api
[INFO] 1 error
{code}
Wicket-core module depends on JUnit Jupiter API:
[https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/module-info.java#L31]
and apiguardian comes as a transitive dependency of it.
To reproduce:
1) git clone [https://github.com/apache/wicket.git]
2) edit pom.xml (line 195) to change the version of maven-compiler-plugin from
3.8.1 to 3.9.0
3) export JAVA_HOME=/path/to/jdk-17 (also you need to have an entry for JDK 17
in ~/.m2/toolchains.xml)
4) mvn verify
https://issues.apache.org/jira/browse/MCOMPILER-481 looks similar but I am not
sure it is the same!
--
This message was sent by Atlassian Jira
(v8.20.1#820001)