Fix javadoc generation on JDK 11

This commit is contained in:
Mikolaj Izdebski 2019-10-31 14:11:30 +01:00
parent 4423548e42
commit fe0c89c29f
2 changed files with 50 additions and 6 deletions

46
ant-build.xml.patch Normal file
View File

@ -0,0 +1,46 @@
--- apache-ant-1.10.7/build.xml~ 2019-10-31 14:10:07.739864466 +0100
+++ apache-ant-1.10.7/build.xml 2019-10-31 14:10:12.018897830 +0100
@@ -145,8 +145,6 @@
-->
<pathelement location="${src.junit}"/>
<pathelement location="${tests.etc.dir}"/>
- <!-- Otherwise many tests fail with "com.sun.tools.javac.Main is not on the classpath.": -->
- <pathelement location="${java.home}/../lib/tools.jar"/>
</path>
<!--
@@ -801,7 +799,6 @@
</metainf>
<manifest>
<attribute name="Main-Class" value="org.apache.tools.ant.Main"/>
- <attribute name="Class-Path" value="ant.jar xalan.jar"/>
</manifest>
</jar>
@@ -1543,7 +1540,25 @@
maxmemory="1000M"
verbose="${javadoc.verbose}">
- <packageset dir="${java.dir}"/>
+ <fileset dir="${java.dir}">
+ <include name="**/*.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/email/MimeMailer.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/optional/NetRexxC.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/optional/image/Image.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Arc.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/BasicShape.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Draw.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/DrawOperation.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Ellipse.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/ImageOperation.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Rectangle.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Rotate.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Scale.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Text.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/TransformOperation.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/ColorMapper.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/optional/image/ImageIOTask.java"/>
+ </fileset>
<!-- hide some meta information for javadoc -->
<tag name="todo" description="To do:" scope="all"/>

View File

@ -43,6 +43,8 @@ Source2: apache-ant-1.8.ant.conf
# manpage
Source3: ant.asciidoc
Patch0: %{name}-build.xml.patch
BuildRequires: javapackages-local
BuildRequires: java-devel >= 1:1.8.0
BuildRequires: ant >= 1.10.2
@ -331,9 +333,7 @@ Javadoc pour %{name}.
%prep
%setup -q -n apache-ant-%{version}
# Fix class-path-in-manifest rpmlint warning
%pom_xpath_remove 'attribute[@name="Class-Path"]' build.xml
%patch0 -p1
# clean jar files
find . -name "*.jar" | xargs -t rm
@ -374,9 +374,7 @@ mv LICENSE.utf8 LICENSE
%pom_xpath_remove pom:optional src/etc/poms/ant-antlr/pom.xml
%build
%{ant} jars test-jar
%{ant} javadocs
%{ant} jars test-jar javadocs
# typeset the manpage
mkdir man