maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Heinz Marbaise (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MCOMPILER-244) Compiler plugin silently drops -XD flags when fork=false
Date Sat, 12 Aug 2017 19:18:00 GMT

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

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
(v6.4.14#64029)

Mime
View raw message