Karl Heinz Marbaise commented on MCOMPILER-302:

After taken a deeper look into that...I think I can explain the problem..
The issue is based on the generation of two command line option sets in the 
case for JDK 7 which looks in debug output like this:
[DEBUG]  /Users/kama/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar
[DEBUG] Source roots:
[DEBUG]  /Users/kama/ws-git-maven-bugs/failingCompile/src/main/java
[DEBUG] Command line options:
[DEBUG] -d /Users/kama/ws-git-maven-bugs/failingCompile/target/classes 
-classpath .....
[DEBUG] -d /Users/kama/ws-git-maven-bugs/failingCompile/target/classes 
-classpath .....
[DEBUG] incrementalBuildHelper#beforeRebuildExecution
[INFO] Compiling 1 source file to 
[DEBUG] incrementalBuildHelper#afterRebuildExecution
[INFO] --- maven-resources-pl
which in the end causes an error of javac on command line:
javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options
The first thing is that shouldn't happen and of course the failure output of 
javac should somehow catched up and produce a useful error message for the 
user...and being silently ignored...

Using JDK 8 there is exactly a single line of command line options being 

But the most important question is: Why does it produce two command line 
options sets in JDK 7 whereas in JDK 8 it does not...

> Project doesn't compile with jdk7 (does with jdk8)
> --------------------------------------------------
>                 Key: MCOMPILER-302
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-302
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.6.2
>         Environment: Windows 7
>            Reporter: Sander Theetaert
>              Labels: maven
>         Attachments: failingCompile.zip
> When building attached project there are no .class files generated in the 
> target/classes 
> folder, 
> this is a trimmed down example project but we do face this issue and can't 
> use jdk8 for other reasons.
> At least a workaround would be nice...

This message was sent by Atlassian JIRA

Reply via email to