[ 
https://issues.apache.org/jira/browse/MCOMPILER-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713697#comment-16713697
 ] 

Gili commented on MCOMPILER-367:
--------------------------------

Running "mvn clean install" on the testcase results in:
{quote}[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
{quote}
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}}

This outputs:
{quote}module-info.java:2: warning: [module] module not found: someOtherModule
 exports com.company to someOtherModule;
 ^
 1 warning
{quote}
Notice that javac includes "[module]". This indicates that "-Xlint:-module" 
will suppress this warning. I am expecting maven-plugin-compiler to show this 
information in its output.

> Plugin should output information needed to suppress Xlint warnings
> ------------------------------------------------------------------
>
>                 Key: MCOMPILER-367
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-367
>             Project: Maven Compiler Plugin
>          Issue Type: Improvement
>    Affects Versions: 3.8.0
>            Reporter: Gili
>            Priority: Major
>         Attachments: testcase.zip
>
>
> 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.



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

Reply via email to