Description
Per Robert Scholte https://issues.apache.org/jira/browse/MCOMPILER-367 can only be fixed in this plugin.
Here is the problem description:
I will attach a testcase showing the following problem.
If you compile a project that has compiler warnings, javac's output indicates which Xlint option will suppress the warning. But when compiling the same code under this plugin, this vital information is suppressed so the user has a difficult time figuring out which option to use.
Expected behavior: output should indicate which Xlint option corresponds to the warning.
Running mvn compile on the testcase results in:
[INFO] — maven-compiler-plugin:3.8.0:compile (default-compile) @ testcase —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\Gili\Documents\3rdparty\testcase\target\classes
[WARNING] /C:/Users/Gili/Documents/3rdparty/testcase/src/main/java/module-info.java:[2,32] module not found: someOtherModule
I then run the following compilation:
javac -d C:\Users\Gili\Documents\3rdparty\testcase\target\classes -classpath C:\Users\Gili\Documents\3rdparty\testcase\target\classes; -sourcepath C:\Users\Gili\Documents\3rdparty\testcase\src\main\java;C:\Users\Gili\Documents\3rdparty\testcase\target\generated-sources\annotations; -s C:\Users\Gili\Documents\3rdparty\testcase\target\generated-sources\annotations -g -target 11 -source 11 -encoding UTF-8 com\company\SomeClass.java module-info.java
I get:
module-info.java:2: warning: [module] module not found: someOtherModule
exports com.company to someOtherModule;
^
1 warning
Notice that the javac output includes "[module]" at the beginning of the warning message. This indicates that "-Xlint:-module" will suppress this warning. I am expecting maven-plugin-compiler to show this information in its output.
Please let me know if have any questions and/or would like me to attach the testcase here.