Fix javadoc generation

This commit is contained in:
Mikolaj Izdebski 2021-05-17 12:26:50 +02:00
parent c9e077659e
commit 8a95f68f70
2 changed files with 49 additions and 3 deletions

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

@ -0,0 +1,46 @@
--- build.xml~ 2021-05-17 12:32:48.406394876 +0200
+++ build.xml 2021-05-17 12:32:39.990389601 +0200
@@ -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>
<!--
@@ -819,7 +817,6 @@
</metainf>
<manifest>
<attribute name="Main-Class" value="org.apache.tools.ant.Main"/>
- <attribute name="Class-Path" value="ant.jar xalan.jar"/>
</manifest>
</jar>
@@ -1562,7 +1559,25 @@
verbose="${javadoc.verbose}"
additionalparam="${javadoc.doclint.none}">
- <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

@ -45,6 +45,8 @@ Source2: apache-ant-1.8.ant.conf
# manpage
Source3: ant.asciidoc
Patch0: %{name}-build.xml.patch
BuildRequires: asciidoc
BuildRequires: xmlto
@ -335,9 +337,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 -p0
# clean jar files
find . -name "*.jar" | xargs -t rm