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
while if the antlr3:antlr goal is run before javadoc's goals the
sourcepath is set as

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


Tiago Stürmer Daitx
Software Engineer

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

Reply via email to