apache / apache/maven-compiler-plugin
[MCOMPILER-327] Sibling "module not found" with unrelated, non-jar dependency
- Dominant language
- Java
- Stars
- 261
- Forks
- 191
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 8
Description
**[James Marble](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=james.d.marble)** opened **[MCOMPILER-327](https://issues.apache.org/jira/browse/MCOMPILER-327?redirect=false)** and commented
I have a multi-module Maven build using JDK 9. One sibling depends on another. Both have "module-info.java" files. This builds correctly unless the dependent module also has a Maven, non-jar dependency. Then maven-compiler-plugin fails with "module not found".
```java
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project problem: Compilation failure
/home/jm6534/Documents/pomdeptest/problem/src/main/java/module-info.java:[2,24] module not found: pomdeptest.sibling
```
Attached is a minimal project that reproduces the issue and the resulting output.
The build is successful if all non-jar dependencies are removed from the "problem" module.
---
**Affects:** 3.7.0
**Attachments:**
- [failed_output.txt](https://issues.apache.org/jira/secure/attachment/12912089/failed_output.txt) (_110.98 kB_)
- [pomdeptest.zip](https://issues.apache.org/jira/secure/attachment/12912088/pomdeptest.zip) (_5.34 kB_)
- [targzdeptest.zip](https://issues.apache.org/jira/secure/attachment/12912109/targzdeptest.zip) (_6.19 kB_)
Contributor guide
No contributing guide indexed for this repository
Research direction
Unpack pomdeptest.zip and reproduce the failure with JDK 9 and maven-compiler-plugin 3.7.0. Inspect the module-info.java files and Maven dependency setup, then verify that the sibling module resolves when the dependent module also has a non-jar dependency; add a regression test if the project’s test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100