Adjust build:

* Use "skipexisting" in Get from Ant 1.8
* Do not always re-run ooxml-lite
* Findbugs does not require src- and javadocs-jars, so depend on "jar" instead of "assemble"

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1754672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2016-07-31 17:19:05 +00:00
parent 45772fed96
commit 3ba5f7fd73

View File

@ -133,6 +133,7 @@ under the License.
<property name="ooxml.output.test.dir" location="build/ooxml-test-classes"/> <property name="ooxml.output.test.dir" location="build/ooxml-test-classes"/>
<property name="ooxml.testokfile" location="build/ooxml-testokfile.txt"/> <property name="ooxml.testokfile" location="build/ooxml-testokfile.txt"/>
<property name="ooxml.lite.output.dir" location="build/ooxml-lite-classes"/> <property name="ooxml.lite.output.dir" location="build/ooxml-lite-classes"/>
<property name="ooxml.lite.testokfile" location="build/ooxml-lite-testokfile.txt"/>
<!-- XSSF/SXSSF subset of OOXML: --> <!-- XSSF/SXSSF subset of OOXML: -->
<property name="ooxml.ss.testokfile" location="build/ooxml-ss-testokfile.txt"/> <property name="ooxml.ss.testokfile" location="build/ooxml-ss-testokfile.txt"/>
@ -502,9 +503,7 @@ under the License.
<attribute name="src"/> <attribute name="src"/>
<attribute name="dest"/> <attribute name="dest"/>
<sequential> <sequential>
<local name="exists"/> <!--fail
<available file="@{dest}" property="exists"/>
<!--fail unless:true="${exists}"
message="Java version might be uncapable to download https URLs - see https://stackoverflow.com/questions/6851461/java-why-does-ssl-handshake-give-could-not-generate-dh-keypair-exception"> message="Java version might be uncapable to download https URLs - see https://stackoverflow.com/questions/6851461/java-why-does-ssl-handshake-give-could-not-generate-dh-keypair-exception">
<condition> <condition>
<and> <and>
@ -513,7 +512,7 @@ under the License.
</and> </and>
</condition> </condition>
</fail--> </fail-->
<get src="@{src}" dest="@{dest}" unless:true="${exists}"/> <get src="@{src}" dest="@{dest}" skipexisting="true"/>
</sequential> </sequential>
</macrodef> </macrodef>
@ -1509,7 +1508,20 @@ under the License.
</target> </target>
<!-- Section: test-ooxml-lite --> <!-- Section: test-ooxml-lite -->
<target name="compile-ooxml-lite" depends="compile-ooxml"> <target name="-compile-ooxml-lite-check">
<uptodate property="ooxml.lite.test.notRequired" targetfile="${ooxml.lite.testokfile}">
<srcfiles dir="${ooxml.src}"/>
<srcfiles dir="${ooxml.src.test}"/>
<srcfiles file="${ooxml.xsds.jar}"/>
<srcfiles file="${ooxml.security.jar}"/>
</uptodate>
</target>
<target name="compile-ooxml-lite" depends="-compile-ooxml-lite-check,compile-ooxml"
unless="ooxml.lite.test.notRequired">
<delete file="${ooxml.lite.testokfile}"/>
<echo message="Running ooxml-lite generator"/>
<property name="ooxml.lite-merged.dir" location="build/ooxml-lite-merged"/> <property name="ooxml.lite-merged.dir" location="build/ooxml-lite-merged"/>
<mkdir dir="${ooxml.lite-merged.dir}"/> <mkdir dir="${ooxml.lite-merged.dir}"/>
@ -1535,6 +1547,8 @@ under the License.
<arg value="-dest"/> <arg value="-dest"/>
<arg value="${ooxml.lite.output.dir}"/> <arg value="${ooxml.lite.output.dir}"/>
</java> </java>
<echo file="${ooxml.lite.testokfile}" append="false" message="testok"/>
</target> </target>
<target name="test-ooxml-lite" depends="jacocotask,compile-ooxml-xsds,compile-ooxml-lite"> <target name="test-ooxml-lite" depends="jacocotask,compile-ooxml-xsds,compile-ooxml-lite">
@ -2089,7 +2103,7 @@ under the License.
</forbiddenapis> </forbiddenapis>
</target> </target>
<target name="findbugs" depends="assemble"> <target name="findbugs" depends="jar">
<downloadfile src="${findbugs.url}" dest="${findbugs.jar}"/> <downloadfile src="${findbugs.url}" dest="${findbugs.jar}"/>
<property name="findbugs.home" value="build/findbugs" /> <property name="findbugs.home" value="build/findbugs" />
@ -2114,6 +2128,7 @@ under the License.
<include name="poi/poi-${version.id}.jar"/> <include name="poi/poi-${version.id}.jar"/>
<include name="poi-scratchpad/poi-scratchpad-${version.id}.jar"/> <include name="poi-scratchpad/poi-scratchpad-${version.id}.jar"/>
<include name="poi-ooxml/poi-ooxml-${version.id}.jar"/> <include name="poi-ooxml/poi-ooxml-${version.id}.jar"/>
<include name="poi-excelant/poi-excelant-${version.id}.jar"/>
</fileset> </fileset>
<auxClasspath path="${dsig.bouncycastle-pkix.jar}" /> <auxClasspath path="${dsig.bouncycastle-pkix.jar}" />
<auxClasspath path="${dsig.bouncycastle-prov.jar}" /> <auxClasspath path="${dsig.bouncycastle-prov.jar}" />