Reputation: 41
I reinstalled between jdk-8 and jdk-12, the building process shows different errors but both failed. And both are showing in the log that the bcel package is missing as the first error.
I've set JAVA_HOME in both jdk with the corresponding value;
sh build.sh -Ddist.dir=~/tmp/ant dist this is the code I get from the org document for building.
Loading source files for package org.apache.tools.tar... Loading source files for package org.apache.tools.zip... Constructing Javadoc information... /home/uppdev/tmp/ant/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java:23: error: package org.apache.bcel.classfile does not exist import org.apache.bcel.classfile.ClassParser; ^ /home/uppdev/tmp/ant/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java:24: error: package org.apache.bcel.classfile does not exist import org.apache.bcel.classfile.ConstantValue;
: : :
Building index for all the packages and classes... Building index for all classes... Generating /home/uppdev/tmp/ant/build/javadocs/help-doc.html... Note: Custom tags that could override future standard tags: @todo. To avoid potential overrides, use at least one period character (.) in custom tag names. 26 errors 100 warnings
BUILD FAILED /home/uppdev/tmp/ant/build.xml:1012: The following error occurred while executing this line: /home/uppdev/tmp/ant/build.xml:1520: Javadoc returned 1
Total time: 20 seconds
Upvotes: 1
Views: 250
Reputation: 5807
If this is for ant 1.10.2 then I can provide info:
JDK8 returns an error for missing references in javadocs (see https://bugs.openjdk.java.net/browse/JDK-8224266) which can be maded non-fatal by passing -Xdoclint:none
to javadoc
.
ant 1.10.2 removed this flag together with the configure param withDoclint
which made builds fail if the optional dependencies were not found.
A workaround is to add additionalparam="-Xdoclint:none"
to the <javadoc ...>
tag in the <target name="javadocs"
in build.xml before building.
Fixed part of 1.10.2:
<target name="javadocs" depends="check-javadoc"
description="--> creates the API documentation" unless="javadoc.notrequired">
<mkdir dir="${build.javadocs}"/>
<javadoc additionalparam="-Xdoclint:none"
useexternalfile="yes"
destdir="${build.javadocs}"
failonerror="true"
author="true"
version="true"
locale="en"
windowtitle="${Name} API"
doctitle="${Name}"
maxmemory="1000M"
verbose="${javadoc.verbose}">
Upvotes: 1