[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: passing -XDignore.symbol.file to compiler with maven



On 13 July 2017 at 21:03, Markus Koschany <apo@debian.org> wrote:
> Am 11.07.2017 um 15:53 schrieb Carnë Draug:
>> Hi
>>
>> I'm trying to package JLargeArrays [1] to Debian which requires
>> passing the '-XDignore.symbol.file' option to the compiler [2].  This
>> package uses maven and 'mvn package' works fine in Debian Stretch.
>>
>> However, the Debian package I prepared [3] failed to build until I set
>> the maven.compiler.fork option [4].  I found online that maven would
>> silently discard '-XD' flags unless fork is set but upstream does not
>> have that set and it builds fine in Debian.  Could someone explain to
>> me why?  This is my first Java Debian package and I'm probably missing
>> something pretty obvious.
>
> Apparently this is the first package in Debian which has to use this
> kind of workaround. [1]

>From what I figured, it is also the first Debian package that uses
maven and requires the -XDignore.symbol.file flag.

> I don't know why it is necessary but I would not worry too much if
> passing maven.compiler.fork=true in maven.properties resolves the issue.

It's just that when things work and I don't know why, it means I don't
understand them, and they later come to bite me.

I'm still unsure of the real reason but I'm guessing it may be that
upstream specifies version 2.3.2 of the maven compiler plugin.  While
the documentation of that older version [5] still says that fork must
be true to pass compilerArgument, I guess that did not really happen.
The reason for thinking that is a bug report against the compiler
plugin version 3.0 onwards that fork became required [6].

Carnë

>
> [1] https://codesearch.debian.net/search?q=maven.compiler.fork+path%3Adebian%2Fmaven.properties

[5] https://web.archive.org/web/20120426071308/https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
[6] https://issues.apache.org/jira/browse/MCOMPILER-244


Reply to: