Bug#896436: gradle FTBFS: error fetching java api url when building with openjdk-10
Tiago Stürmer Daitx
tiago.daitx at canonical.com
Fri Apr 20 23:39:00 BST 2018
Package: gradle
Version: 3.4.1-7
Severity: normal
Dear Maintainer,
When using openjdk-10 as the default-jdk gradle will fail with the
following error:
:signing:assemble
:docs:javadocAlljavadoc: error - Error fetching URL: file:/usr/share/doc/default-jdk/api/
javadoc: warning - You have not specified the version of HTML to use.
Until openjdk-9 any missing api URLs were considered a warning but from
openjdk-10 upwards this was changed to an error.
The URL is missing because it has been hardcoded in the
subprojects/docs/docs.gradle file as:
def javaApiUrl = "file:///usr/share/doc/default-jdk/api/"
but the path /usr/share/doc/default-jdk is a link that belongs to the
default-jdk package which is not a build dependency of gradle (it is
in fact listed as an alternate dependency of default-jdk-headless).
Still, that is not enough as the default-jdk package does neither
contain nor depend on a package that holds the required api files.
Those files are in the openjdk-X-doc package and the dependency on it
is done through default-jdk-doc.
gradle already build depends on default-jdk-doc and even gradle-doc has
a dependency on it. By changing the javaApiUrl to point to the right api
directory, as in:
def javaApiUrl = "file:///usr/share/doc/default-jdk-doc/api/"
the build works as expected.
The patch debian/patches/use-local-artifacts.patch should be updated to
reflect this new patch.
thanks
Tiago
-- System Information:
Debian Release: buster/sid
APT prefers bionic
APT policy: (500, 'bionic'), (400, 'bionic-proposed')
Architecture: amd64 (x86_64)
Kernel: Linux 4.15.0-17-lowlatency (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the pkg-java-maintainers
mailing list