1
votes

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

1
Can you post some code from your build.xml?saurabh14292
sure. it's the original build.xml file from the source code: 250 <selector id="needs.apache-bcel"> 251 <or> 252 <filename name="${ant.package}/filters/util/JavaClassHelper*"/> 253 <filename name="${util.package}/depend/bcel/"/> 254 <filename name="${optional.type.package}/depend/ClassFileSetTest*"/> 255 </or> 256 </selector> :Andy

1 Answers

0
votes

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}">