Bug#892760: antlr3: FTBFS with Java 9
Thank you, the fix looks good. Do you want to upload it? Emmanuel Bourg
Bug#892760: antlr3: FTBFS with Java 9
I am attaching a simple fix to get rid of the FTBFS when building with openjdk-9. BTW, I didn't mention this before, but the reason that javadoc goals worked with openjdk-8 is because openjdk-8's javadoc binary ignored the missing packages/files instead of failing to run - the documentation for the generated sources was never included. thanks -- Tiago Stürmer Daitx Software Engineer tiago.da...@canonical.com PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com) Fingerprint = 45D0 FE5A 8109 1E91 866E 8CA4 1931 8D5E F5B2 13BE diff -Nru antlr3-3.5.2/debian/changelog antlr3-3.5.2/debian/changelog --- antlr3-3.5.2/debian/changelog 2017-08-02 11:53:56.0 +0200 +++ antlr3-3.5.2/debian/changelog 2018-03-14 15:21:31.0 +0100 @@ -1,3 +1,11 @@ +antlr3 (3.5.2-9) UNRELEASED; urgency=medium + + * Add generate-sources to docs goals to activate antlr before javadoc's +goals, otherwise javadoc:jar fails because the sourcepath is incomplete. +(Closes: #892760) + + -- Tiago Stürmer DaitxWed, 14 Mar 2018 14:21:31 + + antlr3 (3.5.2-8) unstable; urgency=medium * Team upload. diff -Nru antlr3-3.5.2/debian/rules antlr3-3.5.2/debian/rules --- antlr3-3.5.2/debian/rules 2017-06-30 11:10:45.0 +0200 +++ antlr3-3.5.2/debian/rules 2018-03-14 15:20:48.0 +0100 @@ -8,7 +8,7 @@ DEB_MAVEN_INSTALL_TO_USJ := false DEB_MAVEN_BUILD_TARGET := package install -DEB_MAVEN_DOC_TARGET := javadoc:jar javadoc:aggregate +DEB_MAVEN_DOC_TARGET := generate-sources javadoc:jar javadoc:aggregate PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | cut -d'+' -f1 -) JAVA_HOME:= /usr/lib/jvm/default-java
Bug#892760: antlr3: FTBFS with Java 9
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.da...@canonical.com PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com) Fingerprint = 45D0 FE5A 8109 1E91 866E 8CA4 1931 8D5E F5B2 13BE
Bug#892760: antlr3: FTBFS with Java 9
Package: antlr3 Version: 3.5.2-8 Severity: normal User: debian-j...@lists.debian.org Usertags: default-java9 antlr3 fails to build with Java 9: [INFO] [INFO] Reactor Summary: [INFO] [INFO] ANTLR 3 Master build control POM ... SUCCESS [ 0.570 s] [INFO] ANTLR 3 Runtime SUCCESS [ 4.100 s] [INFO] ANTLR 3 Tool ... SUCCESS [ 6.755 s] [INFO] ANTLR 3 Maven plugin ... SUCCESS [ 1.580 s] [INFO] ANTLR 3 gUnit .. FAILURE [ 1.392 s] [INFO] ANTLR 3 gUnit Maven plugin . SKIPPED [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 14.708 s [INFO] Finished at: 2018-03-12T17:41:21+01:00 [INFO] Final Memory: 12M/42M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0:jar (default-cli) on project gunit: MavenReportException: Error while generating Javadoc: [ERROR] Exit code: 1 - ./antlr3/gunit/src/main/java/org/antlr/gunit/swingui/model/TestSuiteFactory.java:30: error: package org.antlr.gunit.swingui.parsers does not exist [ERROR] import org.antlr.gunit.swingui.parsers.ANTLRv3Lexer; [ERROR] ^ [ERROR] ./antlr3/gunit/src/main/java/org/antlr/gunit/swingui/model/TestSuiteFactory.java:31: error: package org.antlr.gunit.swingui.parsers does not exist [ERROR] import org.antlr.gunit.swingui.parsers.ANTLRv3Parser; [ERROR] ^ [ERROR] ./antlr3/gunit/src/main/java/org/antlr/gunit/swingui/model/TestSuiteFactory.java:32: error: package org.antlr.gunit.swingui.parsers does not exist [ERROR] import org.antlr.gunit.swingui.parsers.StGUnitLexer; [ERROR] ^ [ERROR] ./antlr3/gunit/src/main/java/org/antlr/gunit/swingui/model/TestSuiteFactory.java:33: error: package org.antlr.gunit.swingui.parsers does not exist [ERROR] import org.antlr.gunit.swingui.parsers.StGUnitParser; [ERROR] ^ [ERROR] [ERROR] Command line was: /usr/lib/jvm/java-9-openjdk-amd64/bin/javadoc @options @packages [ERROR] [ERROR] Refer to the generated Javadoc files in './antlr3/gunit/target/apidocs' dir.