Build per-component javadoc jars, suitable for use with Maven / Maven Central

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1637827 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2014-11-10 12:29:08 +00:00
parent 95e72817a8
commit bb17321d3f
1 changed files with 45 additions and 13 deletions

View File

@ -317,6 +317,14 @@ under the License.
<pathelement location="${additionaljar}"/>
</path>
<path id="javadoc.classpath">
<path refid="main.classpath"/>
<path refid="scratchpad.classpath"/>
<path refid="ooxml.classpath"/>
<path refid="ooxml.xmlsec.classpath"/>
<path path="${env.CLASSPATH}"/>
</path>
<path id="lib.jacoco">
<fileset dir="lib">
<include name="org.jacoco*.jar" />
@ -1140,8 +1148,8 @@ under the License.
description="Generates the API documentation">
<javadoc verbose="false" author="true" destdir="${apidocs.report.dir}"
windowtitle="POI API Documentation" use="true" version="true"
maxmemory="384M" additionalparam="-notimestamp">
maxmemory="384M" additionalparam="-notimestamp"
classpathref="javadoc.classpath">
<packageset dir="${main.src}" defaultexcludes="yes">
<include name="org/apache/poi/**"/>
</packageset>
@ -1153,14 +1161,6 @@ under the License.
<include name="org/apache/poi/**"/>
</packageset>
<classpath id="javadoc.classpath">
<path refid="main.classpath"/>
<path refid="scratchpad.classpath"/>
<path refid="ooxml.classpath"/>
<path refid="ooxml.xmlsec.classpath"/>
<path path="${env.CLASSPATH}"/>
</classpath>
<doctitle><![CDATA[<h1>POI API Documentation</h1>]]></doctitle>
<bottom>
<![CDATA[<i>Copyright ${tstamp.year} The Apache Software Foundation or
@ -1196,7 +1196,6 @@ under the License.
<package name="org.apache.poi.hssf.usermodel.examples*"/>
</group>
</javadoc>
</target>
@ -1335,8 +1334,41 @@ under the License.
</target>
<target name="jar-javadocs" description="JavaDocs for Maven">
<!-- TODO -->
<echo message="TODO - Generate per-component JavaDocs for Maven use" />
<property name="build.maven.javadocs" location="build/tmp/maven-javadocs"/>
<!-- Build and package the main javadocs -->
<antcall target="-do-jar-javadocs">
<param name="srcfolder" value="${main.src}" />
<param name="jarname" value="${jar.name}" />
</antcall>
<!-- Build and package the scratchpad javadocs -->
<antcall target="-do-jar-javadocs">
<param name="srcfolder" value="${scratchpad.src}" />
<param name="jarname" value="${jar.name}-scratchpad" />
</antcall>
<!-- Build and package the ooxml javadocs -->
<antcall target="-do-jar-javadocs">
<param name="srcfolder" value="${ooxml.src}" />
<param name="jarname" value="${jar.name}-ooxml" />
</antcall>
</target>
<target name="-do-jar-javadocs">
<echo message="Building ${jarname} javadocs from ${srcfolder}" />
<delete dir="${build.maven.javadocs}"/>
<mkdir dir="${build.maven.javadocs}"/>
<javadoc verbose="false" author="false" destdir="${build.maven.javadocs}"
windowtitle="POI API Documentation" use="false" version="false"
maxmemory="384M" additionalparam="-notimestamp -quiet"
classpathref="javadoc.classpath">
<packageset dir="${srcfolder}" defaultexcludes="yes">
<include name="org/apache/poi/**"/>
</packageset>
</javadoc>
<jar destfile="${dist.dir}/${jarname}-${version.id}-javadocs-${DSTAMP}.jar"
manifest="build/poi-manifest.mf">
<fileset dir="${build.maven.javadocs}"/>
<metainf dir="legal/"/>
</jar>
</target>
<target name="release-notes" depends="init">