Bug#892760: antlr3: FTBFS with Java 9

Tiago Daitx tiago.daitx at canonical.com
Tue Mar 13 23:21:58 UTC 2018


After reviewing this again I found out that the problem is caused by
the direct calling of javadoc's jar goal - note that this is specific
to cdbs, antlr4 relies on dh and calls the 3 goals "package
javadoc:jar javadoc:aggregate" together, which causes generate-sources
to be run before both javadoc goals.

When direct calling a goal, maven won't have a phase/lifecycle
associated to it, thus it won't activate any other plugins except for
the ones in the command line.

For antlr3 this causes a problem because javadoc:jar won't be able to
add the generated sources paths from antlr to javadoc's option
'sourcepath' as well as fail to properly accounting for the
org.antlr.gunit.swingui.parsers package.

Without the antlr3:antlr goal, javadoc:jar will set sourcepath as
'/build/antlr3/antlr3-3.5.2/gunit/src/main/java',
while if the antlr3:antlr goal is run before javadoc's goals the
sourcepath is set as
'/build/antlr3/antlr3-3.5.2/gunit/src/main/java:/build/antlr3/antlr3-3.5.2/gunit/target/generated-sources/antlr3'

And easy fix is to add generate-sources to the DEB_MAVEN_DOC_TARGET in
debian/rules, as such:
-DEB_MAVEN_DOC_TARGET := javadoc:jar javadoc:aggregate
+DEB_MAVEN_DOC_TARGET := generate-sources javadoc:jar javadoc:aggregate

thanks

-- 
Tiago Stürmer Daitx
Software Engineer
tiago.daitx at canonical.com

PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
Fingerprint = 45D0 FE5A 8109 1E91 866E  8CA4 1931 8D5E F5B2 13BE



More information about the pkg-java-maintainers mailing list