[ 
https://issues.apache.org/jira/browse/MCOMPILER-336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Scholte closed MCOMPILER-336.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.7.1

Fixed in 
[bc99395b15f2b3062431c41269fb97efa9df5671|https://gitbox.apache.org/repos/asf?p=maven-compiler-plugin.git;a=commit;h=bc99395b15f2b3062431c41269fb97efa9df5671]

> Dependency that should be on modulepath sometime put on classpath
> -----------------------------------------------------------------
>
>                 Key: MCOMPILER-336
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-336
>             Project: Maven Compiler Plugin
>          Issue Type: Task
>    Affects Versions: 3.7.0
>            Reporter: Martin Desruisseaux
>            Assignee: Robert Scholte
>            Priority: Major
>             Fix For: 3.7.1
>
>         Attachments: module-vs-classpath.zip
>
>
> {{maven-compiler-plugin}} sometime puts modularized dependencies on the 
> {{javac}} {{-classpath}} option instead than {{-modulepath}}, which cause 
> compilation failure. A test case is attached. Step to reproduce:
> {noformat}
> cd module-vs-classpath
> cd a
> mvn install
> cd ../b
> mvn clean install
> mvn install
> {noformat}
> The last command fail with the following error message:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile 
> (default-compile) on project b: Compilation failure
> [ERROR] module not found: test.a
> {noformat}
> Execution with the {{-X}} option shows that the {{test.a}} dependency is 
> correctly declared in {{-modulepath}} when executing {{mvn clean install}}, 
> but is wrongly declared in {{-classpath}} when executing {{mvn install}}.
> A workaround is to remove the 
> {{<useIncrementalCompilation>false</useIncrementalCompilation>}} option in 
> the {{pom.xml}} files, or to execute {{touch src/main/java/module-info.java}} 
> before {{mvn install}}. However the same error message occurs when attempting 
> to execute {{mvn site}}, for which case I have found no workaround yet (note: 
> the {{mvn site}} problem is not reproduced by the attached 
> {{module-vs-classpath.zip}} file).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to