Karl Heinz Marbaise commented on MCOMPILER-244:

If you use {{<fork>true</fork>}} javac  be called which then can use the given 
options. If you don't use {{<fork>true</fork>}} the internal compiler api be 
used and no such options can be changed during the build of Maven. You could 
give them via {{MAVEN_OPTS}} also to the JVM which is used by Maven.

> Compiler plugin silently drops -XD flags when fork=false
> --------------------------------------------------------
>                 Key: MCOMPILER-244
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-244
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.1, 3.2, 3.3
>            Reporter: Paweł Kozioł
> I have Java code that uses two classes from private Java API 
> (sun.security.\*). When i tried to compile it using jdk1.8.0_45 it failed 
> with error saying that package sun.security.\* does not exist. I found that i 
> should add flag {{-XDignore.symbol.file}} to compiler arguments.
> It turns out that Maven Compiler Plugin silently ignores that flag and it 
> does not work unless you also specify {{<fork>true</fork>}} ([thanks to 
> karmakaze from StackOverflow for 
> sollution|http://stackoverflow.com/a/30472473])
> If you cannot fix this to work with fork=false maybe you could add printing 
> warning/error to stdout?

This message was sent by Atlassian JIRA

Reply via email to