2002-02-14 21:11:36 -05:00
<?xml version="1.0"?>
2015-08-07 19:33:30 -04:00
<!--
2007-01-02 07:50:54 -05:00
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
2003-04-23 20:53:41 -04:00
<!--
2014-10-20 09:54:41 -04:00
This build was tested with ant 1.9.4 although it will probably work with
2015-01-03 04:35:21 -05:00
other versions, however at least 1.8.0 is required.
2003-04-23 20:53:41 -04:00
To build the documentation you will need to install forrest and set
2003-10-22 19:16:34 -04:00
the FORREST_HOME environment variable. Forrest 0.5.1 required.
2003-04-23 20:53:41 -04:00
2015-08-07 19:33:30 -04:00
Since POI 3.11 you will need JDK 1.6 or newer to build POI.
2008-01-21 13:00:30 -05:00
2008-03-22 14:55:14 -04:00
Some people may find the tests hang when run through Ant. If this
happens to you, try giving Ant some more memory when you run it, eg:
ANT_OPTS="-Xmx1024m -XX:MaxPermSize=256m" ant test
2003-04-23 20:53:41 -04:00
-->
2016-03-06 20:58:26 -05:00
<project name= "POI Build" default= "help" basedir= "."
xmlns:mvn="antlib:org.apache.maven.artifact.ant"
xmlns:openpgp="antlib:org.apache.commons.openpgp.ant"
xmlns:staging="antlib:org.sonatype.nexus.ant.staging"
xmlns:if="ant:if"
xmlns:unless="ant:unless">
2003-04-23 20:53:41 -04:00
2009-11-21 10:30:54 -05:00
<description > The Apache POI project Ant build.</description>
2017-06-24 05:27:28 -04:00
<property name= "version.id" value= "3.17-beta2" />
2016-04-07 19:11:22 -04:00
<property name= "release.rc" value= "RC1" />
2009-11-21 10:30:54 -05:00
<property environment= "env" />
<!-- the repository to download jars from -->
2016-04-12 05:52:42 -04:00
<property name= "repository.m2" value= "https://repo1.maven.org" />
2016-03-30 17:27:03 -04:00
<property name= "repository.pentaho" value= "http://repo.pentaho.org/" />
2009-11-21 10:30:54 -05:00
<property name= "main.lib" location= "lib" />
<property name= "ooxml.lib" location= "ooxml-lib" />
2015-05-28 07:00:32 -04:00
<property name= "compile.lib" location= "compile-lib" />
2009-11-21 10:30:54 -05:00
<property name= "forrest.home" value= "${env.FORREST_HOME}" />
<!-- compiler options options -->
2014-02-03 13:55:37 -05:00
<property name= "jdk.version.source" value= "1.6" description= "JDK version of source code" />
<property name= "jdk.version.class" value= "1.6" description= "JDK version of generated class files" />
2009-11-21 10:30:54 -05:00
<property name= "compile.debug" value= "true" />
2015-08-07 19:33:30 -04:00
<!--
Logging is suppressed by default.
To redirect log output to console, run ant with -Dorg.apache.poi.util.POILogger=org.apache.poi.util.SystemOutLogger
2011-06-25 06:56:46 -04:00
-->
<property name= "org.apache.poi.util.POILogger" value= "org.apache.poi.util.NullLogger" />
2010-06-13 02:26:14 -04:00
<!-- issue warnings if source code contains unmappable characters for encoding ASCII -->
2017-02-08 03:29:18 -05:00
<property name= "java.source.encoding" value= "UTF-8" />
2010-06-13 02:26:14 -04:00
2015-08-07 19:33:30 -04:00
<scriptdef name= "propertyreset" language= "javascript"
description="Allows to assign @{property} new value">
<attribute name= "name" />
<attribute name= "value" />
project.setProperty(attributes.get("name"), attributes.get("value"));
</scriptdef>
2009-11-21 10:30:54 -05:00
<!--
JVM system properties for running tests,
user.language and user.country are required as we have locale-sensitive formatters
-->
2016-09-20 03:55:13 -04:00
<property name= "testpattern" value= "Test*" /> <!-- note: this excludes BaseTest* -->
2009-11-21 10:30:54 -05:00
<property name= "POI.testdata.path" value= "test-data" />
<property name= "java.awt.headless" value= "true" />
2014-11-10 15:37:26 -05:00
<property name= "additionaljar" value= "" />
2015-08-07 19:33:30 -04:00
<propertyreset name= "user.language" value= "en" />
<propertyreset name= "user.country" value= "US" />
<condition property= "http_proxy" value= "${env.http_proxy}" else= "" >
<isset property= "env.http_proxy" />
</condition>
<!-- Fix for strange woodstox references in gump build -->
<property name= "javax.xml.stream.XMLInputFactory" value= "com.sun.xml.internal.stream.XMLInputFactoryImpl" />
2016-11-29 17:41:26 -05:00
<!-- need to override POILogger property before commons logging works -->
2016-05-16 05:49:17 -04:00
<property name= "org.apache.commons.logging.Log" value= "org.apache.commons.logging.impl.Log4JLogger" />
2014-11-10 15:37:26 -05:00
2016-07-02 18:09:00 -04:00
2009-11-21 10:30:54 -05:00
<!-- Main: -->
<property name= "main.resource1.dir" value= "src/resources/main" />
<property name= "main.src" location= "src/java" />
<property name= "main.src.test" location= "src/testcases" />
<property name= "main.documentation" value= "src/documentation" />
<property name= "main.output.dir" location= "build/classes" />
<property name= "main.output.test.dir" location= "build/test-classes" />
<property name= "main.reports.test" location= "build/test-results" />
<property name= "main.testokfile" location= "build/main-testokfile.txt" />
2016-04-17 21:07:37 -04:00
<!-- HSSF subset of Main: -->
<property name= "main.hssf.testokfile" location= "build/main-hssf-testokfile.txt" />
2009-11-21 10:30:54 -05:00
<!-- Scratchpad: -->
<property name= "scratchpad.resource1.dir" value= "src/resources/scratchpad" />
<property name= "scratchpad.src" location= "src/scratchpad/src" />
<property name= "scratchpad.src.test" location= "src/scratchpad/testcases" />
<property name= "scratchpad.reports.test" location= "build/scratchpad-test-results" />
<property name= "scratchpad.output.dir" location= "build/scratchpad-classes" />
<property name= "scratchpad.output.test.dir" location= "build/scratchpad-test-classes" />
<property name= "scratchpad.testokfile" location= "build/scratchpad-testokfile.txt" />
2015-02-21 05:56:03 -05:00
<!-- Scratchpad/Geometry -->
2015-08-07 19:33:30 -04:00
<property name= "geometry.pkg" value= "org.apache.poi.sl.draw.binding" />
<property name= "geometry.output.tmpdir" value= "build/geometry-java" />
2009-11-21 10:30:54 -05:00
<!-- Examples: -->
<property name= "examples.src" location= "src/examples/src" />
<property name= "examples.output.dir" location= "build/examples-classes" />
<!-- OOXML support: -->
<property name= "ooxml.src" location= "src/ooxml/java" />
2011-11-07 04:12:16 -05:00
<property name= "ooxml.resource1.dir" value= "src/resources/ooxml" />
2009-11-21 10:30:54 -05:00
<property name= "ooxml.src.test" location= "src/ooxml/testcases" />
<property name= "ooxml.reports.test" location= "build/ooxml-test-results" />
<property name= "ooxml.output.dir" location= "build/ooxml-classes" />
<property name= "ooxml.output.test.dir" location= "build/ooxml-test-classes" />
<property name= "ooxml.testokfile" location= "build/ooxml-testokfile.txt" />
<property name= "ooxml.lite.output.dir" location= "build/ooxml-lite-classes" />
2016-07-31 13:19:05 -04:00
<property name= "ooxml.lite.testokfile" location= "build/ooxml-lite-testokfile.txt" />
2009-11-21 10:30:54 -05:00
2016-04-17 20:16:28 -04:00
<!-- XSSF/SXSSF subset of OOXML: -->
<property name= "ooxml.ss.testokfile" location= "build/ooxml-ss-testokfile.txt" />
2016-01-04 15:43:16 -05:00
<!-- Integration testing: -->
2014-12-25 04:16:44 -05:00
<property name= "integration.src.test" location= "src/integrationtest" />
<property name= "integration.reports.test" location= "build/integration-test-results" />
<property name= "integration.output.test.dir" location= "build/integration-test-classes" />
<property name= "integration.testokfile" location= "build/integration-testokfile.txt" />
2011-02-18 15:04:50 -05:00
<!-- Excelant: -->
<property name= "excelant.resource.dir" value= "src/excelant/resources" />
<property name= "excelant.src" location= "src/excelant/java" />
<property name= "excelant.src.test" location= "src/excelant/testcases" />
<property name= "excelant.reports.test" location= "build/excelant-test-results" />
<property name= "excelant.output.dir" location= "build/excelant-classes" />
<property name= "excelant.output.test.dir" location= "build/excelant-test-classes" />
<property name= "excelant.testokfile" location= "build/excelant-testokfile.txt" />
2009-11-21 10:30:54 -05:00
<!-- jars in the /lib directory, see the fetch - jars target -->
2015-10-13 12:37:22 -04:00
<property name= "main.commons-logging.jar" location= "${main.lib}/commons-logging-1.2.jar" />
2009-11-21 10:30:54 -05:00
<property name= "main.commons-logging.url"
2015-10-13 12:37:22 -04:00
value="${repository.m2}/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.jar"/>
<property name= "main.commons-codec.jar" location= "${main.lib}/commons-codec-1.10.jar" />
2011-05-10 06:38:17 -04:00
<property name= "main.commons-codec.url"
2015-10-13 12:37:22 -04:00
value="${repository.m2}/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar"/>
2014-02-01 12:21:21 -05:00
<property name= "main.log4j.jar" location= "${main.lib}/log4j-1.2.17.jar" />
<property name= "main.log4j.url" value= "${repository.m2}/maven2/log4j/log4j/1.2.17/log4j-1.2.17.jar" />
2015-01-03 04:35:21 -05:00
<property name= "main.junit.jar" location= "${main.lib}/junit-4.12.jar" />
<property name= "main.junit.url" value= "${repository.m2}/maven2/junit/junit/4.12/junit-4.12.jar" />
2017-05-24 06:07:32 -04:00
<!-- Keep using 1.15 until we switch to Java 7 -->
2017-05-15 19:27:21 -04:00
<property name= "main.jmh.jar" location= "${main.lib}/jmh-core-1.15.jar" />
<property name= "main.jmh.url" value= "${repository.m2}/maven2/org/openjdk/jmh/jmh-core/1.15/jmh-core-1.15.jar" />
<property name= "main.jmhAnnotation.jar" location= "${main.lib}/jmh-generator-annprocess-1.15.jar" />
<property name= "main.jmhAnnotation.url" value= "${repository.m2}/maven2/org/openjdk/jmh/jmh-generator-annprocess/1.15/jmh-generator-annprocess-1.15.jar" />
2017-04-16 02:10:23 -04:00
<property name= "main.hamcrest.jar" location= "${main.lib}/hamcrest-core-1.3.jar" />
<property name= "main.hamcrest.url" value= "${repository.m2}/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" />
2014-05-29 05:16:29 -04:00
<property name= "main.ant.jar" location= "${main.lib}/ant-1.9.4.jar" />
<property name= "main.ant.url" value= "${repository.m2}/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.jar" />
<property name= "main.antlauncher.jar" location= "${main.lib}/ant-launcher-1.9.4.jar" />
<property name= "main.antlauncher.url" value= "${repository.m2}/maven2/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.jar" />
2016-07-31 17:23:34 -04:00
<property name= "main.commons-collections4.jar" location= "${main.lib}/commons-collections4-4.1.jar" />
2016-07-30 04:54:50 -04:00
<property name= "main.commons-collections4.url"
value="${repository.m2}/maven2/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar"/>
2014-08-16 15:21:31 -04:00
2015-08-07 19:33:30 -04:00
<!-- xml signature libs -->
2016-01-24 13:36:56 -05:00
<property name= "dsig.xmlsec.jar" location= "${compile.lib}/xmlsec-2.0.6.jar" />
<property name= "dsig.xmlsec.url" value= "${repository.m2}/maven2/org/apache/santuario/xmlsec/2.0.6/xmlsec-2.0.6.jar" />
2016-03-31 20:57:56 -04:00
<property name= "dsig.bouncycastle-prov.jar" location= "${compile.lib}/bcprov-ext-jdk15on-1.54.jar" />
<property name= "dsig.bouncycastle-prov.url" value= "${repository.m2}/maven2/org/bouncycastle/bcprov-ext-jdk15on/1.54/bcprov-ext-jdk15on-1.54.jar" />
<property name= "dsig.bouncycastle-pkix.jar" location= "${compile.lib}/bcpkix-jdk15on-1.54.jar" />
<property name= "dsig.bouncycastle-pkix.url" value= "${repository.m2}/maven2/org/bouncycastle/bcpkix-jdk15on/1.54/bcpkix-jdk15on-1.54.jar" />
2015-10-22 11:21:25 -04:00
<property name= "dsig.sl4j-api.jar" location= "${compile.lib}/slf4j-api-1.7.12.jar" />
<property name= "dsig.sl4j-api.url" value= "${repository.m2}/maven2/org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.jar" />
2015-08-07 19:33:30 -04:00
<!-- jars in the lib - ooxml directory, see the fetch - ooxml - jars target -->
2016-05-30 15:21:49 -04:00
<property name= "ooxml.curvesapi.jar" location= "${ooxml.lib}/curvesapi-1.04.jar" />
2015-10-19 01:59:42 -04:00
<property name= "ooxml.curvesapi.url"
2016-05-30 15:21:49 -04:00
value="${repository.m2}/maven2/com/github/virtuald/curvesapi/1.04/curvesapi-1.04.jar"/>
2014-08-04 16:40:45 -04:00
<property name= "ooxml.xmlbeans23.jar" location= "${ooxml.lib}/xmlbeans-2.3.0.jar" />
<property name= "ooxml.xmlbeans23.url"
2014-06-12 03:08:21 -04:00
value="${repository.m2}/maven2/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar"/>
2014-08-04 16:40:45 -04:00
<property name= "ooxml.xmlbeans26.jar" location= "${ooxml.lib}/xmlbeans-2.6.0.jar" />
<property name= "ooxml.xmlbeans26.url"
2014-08-05 04:53:15 -04:00
value="${repository.m2}/maven2/org/apache/xmlbeans/xmlbeans/2.6.0/xmlbeans-2.6.0.jar"/>
2015-08-07 19:33:30 -04:00
2013-08-04 12:38:01 -04:00
<!-- coverage libs -->
2016-12-30 14:03:44 -05:00
<property name= "jacoco.zip" location= "${main.lib}/jacoco-0.7.8.zip" />
<property name= "jacoco.url" value= "${repository.m2}/maven2/org/jacoco/jacoco/0.7.8/jacoco-0.7.8.zip" />
2014-07-23 13:41:40 -04:00
<property name= "asm.jar" location= "${main.lib}/asm-all-5.0.3.jar" />
<property name= "asm.url" value= "${repository.m2}/maven2/org/ow2/asm/asm-all/5.0.3/asm-all-5.0.3.jar" />
2015-08-07 19:33:30 -04:00
2015-08-27 09:14:46 -04:00
<!-- license and api checks -->
2016-06-30 17:05:52 -04:00
<property name= "rat.jar" location= "${main.lib}/apache-rat-0.12.jar" />
<property name= "rat.url" value= "${repository.m2}/maven2/org/apache/rat/apache-rat/0.12/apache-rat-0.12.jar" />
2017-06-18 01:59:16 -04:00
<property name= "forbidden.jar" location= "${main.lib}/forbiddenapis-2.3.jar" />
<property name= "forbidden.url" value= "${repository.m2}/maven2/de/thetaphi/forbiddenapis/2.3/forbiddenapis-2.3.jar" />
2014-01-20 14:25:22 -05:00
2009-11-21 10:30:54 -05:00
<!-- See http://www.ecma - international.org/publications/standards/Ecma - 376.htm -->
<!-- "Copy these file(s), free of charge" -->
2014-08-10 14:25:10 -04:00
<property name= "ooxml.xsds.ozip.1" value= "OfficeOpenXML-Part4.zip" />
<property name= "ooxml.xsds.izip.1" value= "OfficeOpenXML-XMLSchema.zip" />
<property name= "ooxml.xsds.url.1"
2009-11-21 10:30:54 -05:00
value="http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip"/>
<property name= "ooxml.xsds.src.dir" location= "build/ooxml-xsds-src" />
2015-11-21 14:37:26 -05:00
<property name= "ooxml.xsds.src.jar" location= "${ooxml.lib}/ooxml-schemas-1.3-sources.jar" />
<property name= "ooxml.xsds.jar" location= "${ooxml.lib}/ooxml-schemas-1.3.jar" />
2009-11-21 10:30:54 -05:00
2015-05-28 07:00:32 -04:00
<!-- additional schemas are packed into the poi schemas jar, -->
<!-- so we don't have to care about a seperate versioning of the original ooxml schemas -->
2016-04-12 05:52:42 -04:00
<property name= "ooxml.xsds.dsig.1" value= "https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" />
2015-05-28 07:00:32 -04:00
<property name= "ooxml.xsds.dsig.2" value= "http://uri.etsi.org/01903/v1.3.2/XAdES.xsd" />
<property name= "ooxml.xsds.dsig.3" value= "http://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd" />
2014-08-10 14:25:10 -04:00
<property name= "ooxml.xsds.ozip.2" value= "OfficeOpenXML-Part2.zip" />
<property name= "ooxml.xsds.izip.2" value= "OpenPackagingConventions-XMLSchema.zip" />
<property name= "ooxml.xsds.url.2"
value="http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip"/>
2014-10-25 15:34:42 -04:00
<property name= "ooxml.security.src.dir" location= "build/ooxml-security-src" />
2015-11-22 19:15:07 -05:00
<property name= "ooxml.security.src.jar" location= "${ooxml.lib}/ooxml-security-1.1-sources.jar" />
<property name= "ooxml.security.jar" location= "${ooxml.lib}/ooxml-security-1.1.jar" />
2014-10-25 15:34:42 -04:00
<property name= "ooxml.security.xsd.dir" location= "src/ooxml/resources/org/apache/poi/poifs/crypt" />
2015-10-06 22:41:30 -04:00
<property name= "ooxml.visio.xsd.dir" location= "src/ooxml/resources/org/apache/poi/xdgf" />
2015-11-21 14:37:26 -05:00
<property name= "ooxml.schema.xsdconfig.dir" location= "src/ooxml/resources/org/apache/poi/schemas" />
2013-12-24 18:13:21 -05:00
2015-11-22 19:15:07 -05:00
<property name= "maven.ooxml.xsds.version.id" value= "1.3" />
2009-11-21 10:30:54 -05:00
<property name= "maven.ooxml.xsds.jar" value= "ooxml-schemas-${maven.ooxml.xsds.version.id}.jar" />
2013-08-04 12:38:01 -04:00
<!-- Coverage -->
<property name= "coverage.dir" value= "build/coverage" />
<!-- Exclude some uninteresting classes from coverage - instrumentation as we do not want to measure coverage in those packages anyway -->
2016-12-31 04:43:13 -05:00
<property name= "coverage.excludes" value= "org.openxmlformats.*:com.*:org.junit.*:junit.*:org.etsi.*:org.w3.*:org.slf4j.*:org.hamcrest.*:org.bouncycastle.*:org.apache.xmlbeans.*:org.apache.tools.*:org.apache.commons.*:org.apache.jcp.*:sun.*:schemaorg_apache_xmlbeans.*" />
2016-12-30 13:37:24 -05:00
<property name= "file.leak.detector" value= "-Dthis.is.a.dummy=true" />
2015-08-07 19:33:30 -04:00
2014-01-20 14:25:22 -05:00
<!-- Apache RAT license check properties -->
<property name= "rat.reportdir" value= "build/rat" />
2015-08-07 19:33:30 -04:00
<property name= "rat.report" value= "${rat.reportdir}/report.txt" />
2014-01-20 14:25:22 -05:00
2009-11-21 10:30:54 -05:00
<!-- build and distro settings -->
<property name= "jar.name" value= "poi" />
<property name= "build.site" location= "build/tmp/site/build/site" />
<property name= "build.site.src" location= "build/tmp/site" />
<property name= "apidocs.report.dir" location= "${build.site}/apidocs" />
<property name= "dist.dir" location= "build/dist" />
<property name= "halt.on.test.failure" value= "true" />
2016-03-30 17:27:03 -04:00
<!-- helper jars for pgp signing, building and nexus staging -->
2016-03-06 20:58:26 -05:00
<property name= "dist.bouncycastle-prov.jar" location= "${compile.lib}/bcprov-ext-jdk15on-1.51.jar" />
<property name= "dist.bouncycastle-prov.url" value= "${repository.m2}/maven2/org/bouncycastle/bcprov-ext-jdk15on/1.51/bcprov-ext-jdk15on-1.51.jar" />
<property name= "dist.bouncycastle-bcpg.jar" location= "${compile.lib}/bcpg-jdk15on-1.51.jar" />
<property name= "dist.bouncycastle-bcpg.url" value= "${repository.m2}/maven2/org/bouncycastle/bcpg-jdk15on/1.51/bcpg-jdk15on-1.51.jar" />
<property name= "dist.commons-openpgp.jar" location= "${compile.lib}/commons-openpgp-1.0-SNAPSHOT.jar" />
2016-04-12 05:52:42 -04:00
<property name= "dist.commons-openpgp.url" value= "https://repository.apache.org/snapshots/org/apache/commons/commons-openpgp/1.0-SNAPSHOT/commons-openpgp-1.0-20140717.171036-11.jar" />
2016-03-06 20:58:26 -05:00
<property name= "dist.nexus-staging.jar" location= "${compile.lib}/nexus-staging-ant-tasks-1.6.3-uber.jar" />
<property name= "dist.nexus-staging.url" value= "${repository.m2}/maven2/org/sonatype/nexus/ant/nexus-staging-ant-tasks/1.6.3/nexus-staging-ant-tasks-1.6.3-uber.jar" />
2016-04-03 18:19:44 -04:00
<property name= "dist.svnant.zip" location= "${compile.lib}/svnant/svnant-1.3.1.zip" />
<property name= "dist.svnant.url" value= "http://subclipse.tigris.org/files/documents/906/49042/svnant-1.3.1.zip" />
<property name= "dist.svnclient.jar" location= "${compile.lib}/svnant/svnClientAdapter-1.3.0.jar" />
2016-03-30 17:27:03 -04:00
<property name= "dist.svnclient.url" value= "${repository.pentaho}/content/groups/omni/tigris/svnClientAdapter/svnant-1.3.0/svnClientAdapter-svnant-1.3.0.jar" />
2016-04-03 18:19:44 -04:00
<property name= "dist.svnkit.jar" location= "${compile.lib}/svnant/svnkit-1.8.11.jar" />
2016-03-30 17:27:03 -04:00
<property name= "dist.svnkit.url" value= "${repository.m2}/maven2/org/tmatesoft/svnkit/svnkit/1.8.11/svnkit-1.8.11.jar" />
2016-04-03 18:19:44 -04:00
<property name= "dist.svnkit-javahl16.jar" location= "${compile.lib}/svnant/svnkit-javahl16-1.8.11.jar" />
<property name= "dist.svnkit-javahl16.url" value= "${repository.m2}/maven2/org/tmatesoft/svnkit/svnkit-javahl16/1.8.11/svnkit-javahl16-1.8.11.jar" />
<property name= "dist.sqljet.jar" location= "${compile.lib}/svnant/sqljet-1.1.10.jar" />
<property name= "dist.sqljet.url" value= "${repository.m2}/maven2/org/tmatesoft/sqljet/sqljet/1.1.10/sqljet-1.1.10.jar" />
<property name= "dist.antlr.jar" location= "${compile.lib}/svnant/antlr-runtime-3.5.2.jar" />
<property name= "dist.antlr.url" value= "${repository.m2}/maven2/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar" />
<property name= "dist.sequence-library.jar" location= "${compile.lib}/svnant/sequence-library-1.0.3.jar" />
<property name= "dist.sequence-library.url" value= "${repository.m2}/maven2/de/regnis/q/sequence/sequence-library/1.0.3/sequence-library-1.0.3.jar" />
2016-03-30 17:27:03 -04:00
2016-06-11 17:23:01 -04:00
<!-- ===========================================================================================================
NOTE: we did not update to 3.x yet because it requires Java 7, but we are still supporting Java 6 currently
===========================================================================================================
-->
2016-08-11 08:00:53 -04:00
<condition property= "findbugs.version" value= "2.0.3" else= "3.0.1" >
<contains string= "${java.version}" substring= "1.6" />
2016-06-11 17:23:01 -04:00
</condition>
2016-12-26 14:51:37 -05:00
<property name= "findbugs.url" value= "http://downloads.sourceforge.net/project/findbugs/findbugs/${findbugs.version}/findbugs-noUpdateChecks-${findbugs.version}.zip?download=" />
2016-11-29 17:41:26 -05:00
<property name= "findbugs.jar" location= "${main.lib}/findbugs-noUpdateChecks-${findbugs.version}.zip" />
2016-06-11 17:23:01 -04:00
2009-11-21 10:30:54 -05:00
<propertyset id= "junit.properties" >
<propertyref name= "POI.testdata.path" />
<propertyref name= "java.awt.headless" />
2011-06-25 06:56:46 -04:00
<propertyref name= "org.apache.poi.util.POILogger" />
2014-11-10 15:37:26 -05:00
<propertyref name= "http_proxy" />
2015-08-07 19:33:30 -04:00
<propertyref name= "additionaljar" />
<propertyref name= "user.language" />
<propertyref name= "user.country" />
<propertyref name= "javax.xml.stream.XMLInputFactory" />
2016-11-29 17:41:26 -05:00
<propertyref name= "org.apache.commons.logging.Log" />
<propertyref name= "java.locale.providers" /> <!-- required for Java 9 compilation -->
2016-10-24 08:07:15 -04:00
<propertyref name= "version.id" /> <!-- to detect if we are running on slow Gump VM -->
2009-11-21 10:30:54 -05:00
</propertyset>
2016-07-02 18:09:00 -04:00
2016-05-29 17:33:28 -04:00
<!-- this can be overwriten to empty when running with Java 9 -->
<property name= "maxpermsize" value= "-XX:MaxPermSize=256m" />
2016-07-31 17:23:25 -04:00
<property name= "java9addmods" value= "-Dthis.is.a.dummy=true" />
2016-12-31 11:53:20 -05:00
<property name= "javadoc9addmods" value= "-J-Dthis.is.a.dummy=true" />
2016-07-31 17:23:25 -04:00
<property name= "java9addmodsvalue" value= "-Dthis.is.a.dummy=true" />
2016-12-30 12:00:13 -05:00
<property name= "java9addopens1" value= "-Dthis.is.a.dummy=true" />
<property name= "java9addopens2" value= "-Dthis.is.a.dummy=true" />
<property name= "java9addopens3" value= "-Dthis.is.a.dummy=true" />
<property name= "java9addopens4" value= "-Dthis.is.a.dummy=true" />
2017-01-26 14:59:10 -05:00
<property name= "java9addopens5" value= "-Dthis.is.a.dummy=true" />
2003-04-23 20:53:41 -04:00
<path id= "main.classpath" >
2011-02-18 15:04:50 -05:00
<pathelement location= "${main.commons-logging.jar}" />
2011-05-10 06:38:17 -04:00
<pathelement location= "${main.commons-codec.jar}" />
2017-06-09 08:49:01 -04:00
<pathelement location= "${main.commons-collections4.jar}" />
</path>
<!-- some libraries should only be required for compiling/running tests -->
<path id= "test.jar.classpath" >
2011-02-18 15:04:50 -05:00
<pathelement location= "${main.junit.jar}" />
2017-05-15 19:27:21 -04:00
<pathelement location= "${main.jmh.jar}" />
<pathelement location= "${main.jmhAnnotation.jar}" />
2013-06-30 16:49:51 -04:00
<pathelement location= "${main.hamcrest.jar}" />
2008-01-21 13:00:30 -05:00
</path>
2003-04-23 20:53:41 -04:00
<path id= "scratchpad.classpath" >
<path refid= "main.classpath" />
<pathelement location= "${main.output.dir}" />
</path>
2014-09-29 19:39:45 -04:00
<path id= "ooxml.xmlsec.classpath" >
<pathelement location= "${dsig.xmlsec.jar}" />
<pathelement location= "${dsig.bouncycastle-prov.jar}" />
<pathelement location= "${dsig.bouncycastle-pkix.jar}" />
<pathelement location= "${dsig.sl4j-api.jar}" />
</path>
2007-12-26 12:39:15 -05:00
<path id= "ooxml.classpath" >
2015-10-19 01:59:42 -04:00
<pathelement location= "${ooxml.curvesapi.jar}" />
2014-08-04 16:40:45 -04:00
<pathelement location= "${ooxml.xmlbeans26.jar}" />
2010-06-28 08:56:57 -04:00
<pathelement location= "${ooxml.xsds.jar}" />
2007-12-26 12:39:15 -05:00
<path refid= "main.classpath" />
2008-11-08 08:21:42 -05:00
<pathelement location= "${main.output.dir}" />
2014-10-25 15:34:42 -04:00
<pathelement location= "${ooxml.security.jar}" />
2015-05-28 07:00:32 -04:00
<!-- classes are omitted on test cases outside the xml - dsign area to avoid classpath poisioning -->
2014-10-18 19:19:49 -04:00
<!-- path refid="ooxml.xmlsec.classpath"/ -->
2015-05-28 07:17:41 -04:00
<!-- Used only for ExtractorFactory, see #57963 -->
2016-11-28 19:46:39 -05:00
<pathelement location= "${scratchpad.output.dir}" unless:true= "${scratchpad.ignore}" />
2007-12-26 12:39:15 -05:00
</path>
2008-03-21 09:41:45 -04:00
<path id= "test.classpath" >
<path refid= "main.classpath" />
<pathelement location= "${main.output.dir}" />
<pathelement location= "${main.output.test.dir}" />
2015-05-28 07:00:32 -04:00
<pathelement location= "${additionaljar}" />
2009-11-21 10:30:54 -05:00
</path>
<path id= "test.scratchpad.classpath" >
<path refid= "scratchpad.classpath" />
<pathelement location= "${main.output.test.dir}" />
<pathelement location= "${scratchpad.output.dir}" />
<pathelement location= "${scratchpad.output.test.dir}" />
2015-05-28 07:00:32 -04:00
<pathelement location= "${additionaljar}" />
2008-03-21 09:41:45 -04:00
</path>
<path id= "test.ooxml.classpath" >
<path refid= "ooxml.classpath" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2008-03-21 09:41:45 -04:00
<pathelement location= "${ooxml.output.dir}" />
<pathelement location= "${ooxml.output.test.dir}" />
2009-11-21 10:30:54 -05:00
<pathelement location= "${main.output.test.dir}" />
2015-05-28 07:00:32 -04:00
<pathelement location= "${additionaljar}" />
2009-11-21 10:30:54 -05:00
</path>
2014-12-25 04:16:44 -05:00
<path id= "test.integration.classpath" >
2016-05-16 05:49:17 -04:00
<pathelement location= "${integration.src.test}" />
2014-12-25 04:16:44 -05:00
<path refid= "scratchpad.classpath" />
<path refid= "ooxml.classpath" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2014-12-25 04:16:44 -05:00
<pathelement location= "${main.output.test.dir}" />
2015-05-28 07:00:32 -04:00
<pathelement location= "${ooxml.output.dir}" />
2014-12-25 04:16:44 -05:00
<pathelement location= "${integration.output.test.dir}" />
2016-04-01 02:25:49 -04:00
<pathelement location= "${examples.output.dir}" />
2014-12-25 04:16:44 -05:00
</path>
2009-11-21 10:30:54 -05:00
<path id= "ooxml-lite.classpath" >
2015-10-19 01:59:42 -04:00
<pathelement location= "${ooxml.curvesapi.jar}" />
2014-08-04 16:40:45 -04:00
<pathelement location= "${ooxml.xmlbeans26.jar}" />
2014-11-09 12:55:22 -05:00
<pathelement location= "${ooxml.lite.output.dir}" /> <!-- instead of ooxml - xsds.jar use the filtered classes -->
2009-11-21 10:30:54 -05:00
<path refid= "main.classpath" />
<pathelement location= "${main.output.dir}" />
2016-11-29 17:41:26 -05:00
<pathelement location= "${scratchpad.output.dir}" unless:true= "${scratchpad.ignore}" />
2014-11-09 12:55:22 -05:00
<!-- path refid="ooxml.classpath"/ -->
2009-11-21 10:30:54 -05:00
<pathelement location= "${ooxml.output.dir}" />
<pathelement location= "${ooxml.output.test.dir}" />
<pathelement location= "${main.output.test.dir}" />
2014-11-09 14:19:02 -05:00
<pathelement location= "${ooxml.security.jar}" />
2008-03-21 09:41:45 -04:00
</path>
2007-12-26 12:39:15 -05:00
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642566,642568-642574,642576 via svnmerge from
https://svn.apache.org/repos/asf/poi/trunk
........
r642566 | nick | 2008-03-29 17:45:28 +0000 (Sat, 29 Mar 2008) | 1 line
Move the missing record aware eventusermodel code out of scratchpad
........
r642571 | nick | 2008-03-29 18:11:48 +0000 (Sat, 29 Mar 2008) | 1 line
Merge several bug tests into one file
........
r642574 | nick | 2008-03-29 18:23:33 +0000 (Sat, 29 Mar 2008) | 1 line
Move the FormulaEvaluator code out of scratchpad
........
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@642591 13f79535-47bb-0310-9956-ffa450edef68
2008-03-29 15:36:53 -04:00
<path id= "examples.classpath" >
<path refid= "main.classpath" />
<pathelement location= "${main.output.dir}" />
2016-11-29 17:41:26 -05:00
<pathelement location= "${scratchpad.output.dir}" unless:true= "${scratchpad.ignore}" />
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642566,642568-642574,642576 via svnmerge from
https://svn.apache.org/repos/asf/poi/trunk
........
r642566 | nick | 2008-03-29 17:45:28 +0000 (Sat, 29 Mar 2008) | 1 line
Move the missing record aware eventusermodel code out of scratchpad
........
r642571 | nick | 2008-03-29 18:11:48 +0000 (Sat, 29 Mar 2008) | 1 line
Merge several bug tests into one file
........
r642574 | nick | 2008-03-29 18:23:33 +0000 (Sat, 29 Mar 2008) | 1 line
Move the FormulaEvaluator code out of scratchpad
........
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@642591 13f79535-47bb-0310-9956-ffa450edef68
2008-03-29 15:36:53 -04:00
</path>
2005-01-25 15:08:18 -05:00
2011-02-18 15:04:50 -05:00
<path id= "excelant.classpath" >
<path refid= "ooxml.classpath" />
<pathelement location= "${main.ant.jar}" />
<pathelement location= "${ooxml.output.dir}" />
</path>
2015-08-07 19:33:30 -04:00
2011-02-18 15:04:50 -05:00
<path id= "test.excelant.classpath" >
<path refid= "ooxml.classpath" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2011-02-18 15:04:50 -05:00
<pathelement location= "${ooxml.output.dir}" />
<pathelement location= "${excelant.output.dir}" />
<pathelement location= "${excelant.output.test.dir}" />
<pathelement location= "${main.output.test.dir}" />
2015-05-28 07:00:32 -04:00
<pathelement location= "${additionaljar}" />
2011-02-18 15:04:50 -05:00
</path>
2005-01-01 18:39:42 -05:00
2014-11-10 07:29:08 -05:00
<path id= "javadoc.classpath" >
<path refid= "main.classpath" />
<path refid= "scratchpad.classpath" />
<path refid= "ooxml.classpath" />
<path refid= "ooxml.xmlsec.classpath" />
2017-06-10 11:01:14 -04:00
<path refid= "test.jar.classpath" />
2014-11-10 07:29:08 -05:00
<path path= "${env.CLASSPATH}" />
</path>
2015-11-08 06:57:58 -05:00
<path id= "forbiddenapis.classpath" >
<path refid= "main.classpath" />
2017-06-09 08:49:58 -04:00
<path refid= "test.jar.classpath" />
2015-11-08 06:57:58 -05:00
<path refid= "scratchpad.classpath" />
<path refid= "ooxml.classpath" />
<path refid= "ooxml.xmlsec.classpath" />
<path refid= "excelant.classpath" />
<path path= "${env.CLASSPATH}" />
</path>
2013-08-04 12:38:01 -04:00
<path id= "lib.jacoco" >
<fileset dir= "lib" >
<include name= "org.jacoco*.jar" />
2014-07-23 13:41:40 -04:00
<include name= "asm-all-*.jar" />
2013-08-04 12:38:01 -04:00
</fileset>
</path>
2016-11-29 17:41:26 -05:00
<patternset id= "exclude-scratchpad-test" >
2016-11-29 18:03:46 -05:00
<exclude name= "**/TestExtractorFactory.java" />
<exclude name= "**/OutlookTextExtactor.java" />
2017-04-30 05:12:48 -04:00
<exclude name= "**/TestEmbedOLEPackage.java" />
2017-06-14 13:21:50 -04:00
<exclude name= "**/TestHxxFEncryption.java" />
2016-11-29 17:41:26 -05:00
</patternset>
2009-11-21 10:30:54 -05:00
<!-- Prints POI's Ant usage help -->
<target name= "help" description= "Prints Apache POI's Ant usage help" >
2009-11-23 03:43:04 -05:00
<echo >
This is POI ${version.id}
2016-08-11 08:00:53 -04:00
Java Version ${ant.java.version}/${java.version}
2009-11-23 03:43:04 -05:00
Timestamp ${DSTAMP}
The main targets of interest are:
- clean Erase all build work products (ie. everything in the build directory)
2010-10-06 03:58:51 -04:00
- compile Compile all files from main, ooxml and scratchpad
- test Run all unit tests from main, ooxml and scratchpad
2009-11-23 03:43:04 -05:00
- jar Produce jar files
2015-05-31 16:11:20 -04:00
- jar-src Produce source-jar files
- assemble Produce the zipped distribution files
2009-11-23 03:43:04 -05:00
- site Generate all documentation (Requires Apache Forrest)
- dist Create a distribution (Requires Apache Forrest)
2009-11-21 10:30:54 -05:00
</echo>
</target>
2005-01-01 18:39:42 -05:00
2009-11-21 10:30:54 -05:00
<tstamp >
<format property= "tstamp.year" pattern= "yyyy" />
</tstamp>
2005-01-01 18:39:42 -05:00
2015-10-05 08:23:07 -04:00
<target name= "init" depends= "fetch-jars,fetch-ooxml-jars" description= "Initialization run before other targets." >
2003-04-23 20:53:41 -04:00
<mkdir dir= "build" />
<mkdir dir= "${main.output.dir}" />
<mkdir dir= "${main.output.test.dir}" />
<mkdir dir= "${main.reports.test}" />
2009-11-21 10:30:54 -05:00
<mkdir dir= "${scratchpad.output.dir}" />
<mkdir dir= "${scratchpad.output.test.dir}" />
2003-04-23 20:53:41 -04:00
<mkdir dir= "${scratchpad.reports.test}" />
2015-08-07 19:33:30 -04:00
<mkdir dir= "${geometry.output.tmpdir}" />
2009-11-21 10:30:54 -05:00
<mkdir dir= "${ooxml.output.dir}" />
<mkdir dir= "${ooxml.output.test.dir}" />
2007-12-27 06:52:12 -05:00
<mkdir dir= "${ooxml.reports.test}" />
2011-02-18 15:04:50 -05:00
<mkdir dir= "${excelant.output.dir}" />
<mkdir dir= "${excelant.output.test.dir}" />
<mkdir dir= "${excelant.reports.test}" />
2009-11-21 10:30:54 -05:00
<mkdir dir= "${examples.output.dir}" />
2014-12-25 04:16:44 -05:00
<mkdir dir= "${integration.output.test.dir}" />
<mkdir dir= "${integration.reports.test}" />
2003-04-23 20:53:41 -04:00
<mkdir dir= "${dist.dir}" />
2009-11-23 03:43:04 -05:00
<mkdir dir= "${build.site}" />
2014-10-06 09:20:12 -04:00
2016-08-11 08:00:53 -04:00
<echo message= "Using Ant: ${ant.version} from ${ant.home}, Ant detected Java ${ant.java.version} (may be different than actual Java sometimes...)" />
2015-08-07 19:33:30 -04:00
<echo message= "Using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}" />
2016-08-11 08:00:53 -04:00
<echo message= "Using Findbugs: ${findbugs.version} for Java ${java.version}" />
2016-04-03 18:19:44 -04:00
<scriptdef name= "release_tag" language= "javascript" >
var rel = ("REL_"+project.getProperty("version.id")).toUpperCase().replace(/\W/g,"_");
if (rel.search(/BETA/) == -1) rel += "_FINAL";
project.setProperty("RELEASE_TAG", rel);
</scriptdef>
<release_tag />
2016-03-30 17:27:03 -04:00
</target>
2003-04-23 20:53:41 -04:00
2015-10-05 08:23:07 -04:00
<target name= "clean" description= "Remove generated artefacts" >
2003-04-23 20:53:41 -04:00
<delete dir= "build" />
2016-03-03 08:36:26 -05:00
<delete includeemptydirs= "true" >
<fileset dir= "sonar" >
<include name= "*/target/**" />
<include name= "*/build/**" />
<include name= "*/src/**" />
</fileset>
</delete>
2003-04-23 20:53:41 -04:00
</target>
2016-03-06 20:58:26 -05:00
<macrodef name= "downloadfile" >
<attribute name= "src" />
<attribute name= "dest" />
<sequential >
2016-07-31 13:19:05 -04:00
<!-- fail
2016-04-12 05:52:42 -04:00
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">
2016-03-06 20:58:26 -05:00
<condition >
<and >
<equals arg1= "${ant.java.version}" arg2= "1.6" />
<contains string= "@{src}" substring= "https" />
</and>
</condition>
2016-04-27 18:17:17 -04:00
</fail-->
2016-07-31 13:19:05 -04:00
<get src= "@{src}" dest= "@{dest}" skipexisting= "true" />
2016-03-06 20:58:26 -05:00
</sequential>
</macrodef>
2008-11-07 04:29:54 -05:00
2003-04-23 20:53:41 -04:00
<target name= "check-jars" >
2015-08-07 19:33:30 -04:00
<!-- remove previous versions of third - party jars to prevent them from lingering around,
we often had hard-to-find build/CI-problems because of these! -->
<mkdir dir= "${main.lib}" />
<mkdir dir= "${compile.lib}" />
2015-10-14 15:27:14 -04:00
<mkdir dir= "${ooxml.lib}" />
2015-08-07 19:33:30 -04:00
<delete verbose= "true" >
<fileset dir= "${main.lib}" >
<include name= "ant-1.8*" />
<include name= "asm-all-4*" />
<include name= "commons-codec-1.5*" />
2015-10-13 12:37:22 -04:00
<include name= "commons-codec-1.9*" />
<include name= "commons-logging-1.1*.jar" />
2015-08-07 19:33:30 -04:00
<include name= "jacoco-0.6*" />
<include name= "jacoco-0.7.1*" />
<include name= "jacoco-0.7.2*" />
<include name= "jacoco-0.7.3*" />
2016-02-27 03:41:07 -05:00
<include name= "jacoco-0.7.4*" />
2016-07-31 17:23:25 -04:00
<include name= "jacoco-0.7.6*" />
2016-12-30 14:03:44 -05:00
<include name= "jacoco-0.7.7*" />
2015-08-07 19:33:30 -04:00
<include name= "log4j-1.2.13*" />
<include name= "org.jacoco.*-0.6.*" />
<include name= "org.jacoco.*-0.7.1*" />
<include name= "org.jacoco.*-0.7.2*" />
<include name= "org.jacoco.*-0.7.3*" />
2016-03-03 08:36:26 -05:00
<include name= "org.jacoco.*-0.7.4*" />
2016-07-31 17:23:25 -04:00
<include name= "org.jacoco.*-0.7.6*" />
2016-12-30 14:03:44 -05:00
<include name= "org.jacoco.*-0.7.7*" />
2015-08-07 19:33:30 -04:00
<include name= "dom4j*" />
<include name= "apache-rat-0.10*" />
<include name= "xercesImpl-*.jar" />
<include name= "junit-3*" />
<include name= "junit-4.11*" />
2016-04-17 18:01:48 -04:00
<include name= "forbiddenapis-1.*.jar" />
2016-05-24 10:17:52 -04:00
<include name= "forbiddenapis-2.0.jar" />
2017-06-18 01:59:16 -04:00
<include name= "forbiddenapis-2.1.jar" />
2016-06-30 17:05:52 -04:00
<include name= "apache-rat-0.11.jar" />
2016-04-17 18:01:48 -04:00
</fileset>
<fileset dir= "${ooxml.lib}" >
<!-- remove jars from previous versions, but not the current version -->
<include name= "ooxml-schemas-src-1.1.jar" />
<include name= "ooxml-schemas-1.1-sources.jar" />
<include name= "ooxml-schemas-1.1.jar" />
<include name= "ooxml-schemas-1.2-sources.jar" />
<include name= "ooxml-schemas-1.2.jar" />
<include name= "ooxml-security-1.0-sources.jar" />
<include name= "ooxml-security-1.0.jar" />
2016-05-31 09:56:47 -04:00
<include name= "curvesapi-1.03.jar" />
2015-08-07 19:33:30 -04:00
</fileset>
2016-03-30 17:27:03 -04:00
<fileset dir= "${compile.lib}" >
<include name= "xercesImpl-*.jar" />
<include name= "xmlsec-2.0.1.jar" />
<include name= "xmlsec-2.0.5.jar" />
<include name= "bcprov-ext-jdk15on-1.51.jar" />
2016-04-02 07:01:43 -04:00
<include name= "bcprov-ext-jdk15on-1.53.jar" />
2016-03-30 17:27:03 -04:00
<include name= "bcpkix-jdk15on-1.51.jar" />
2016-04-02 07:01:43 -04:00
<include name= "bcpkix-jdk15on-1.53.jar" />
2016-03-30 17:27:03 -04:00
<include name= "slf4j-api-1.7.7.jar" />
</fileset>
2015-08-07 19:33:30 -04:00
</delete>
2014-08-03 17:30:30 -04:00
2014-08-10 14:25:10 -04:00
<condition property= "jars.present" >
2003-07-14 08:11:12 -04:00
<or >
<and >
2008-11-07 04:29:54 -05:00
<available file= "${main.commons-logging.jar}" />
2011-05-10 06:38:17 -04:00
<available file= "${main.commons-codec.jar}" />
2008-11-07 04:29:54 -05:00
<available file= "${main.log4j.jar}" />
<available file= "${main.junit.jar}" />
2017-05-15 19:27:21 -04:00
<available file= "${main.jmh.jar}" />
<available file= "${main.jmhAnnotation.jar}" />
2013-06-30 16:49:51 -04:00
<available file= "${main.hamcrest.jar}" />
2011-02-18 15:04:50 -05:00
<available file= "${main.ant.jar}" />
2014-05-29 05:16:29 -04:00
<available file= "${main.antlauncher.jar}" />
2013-08-04 12:38:01 -04:00
<available file= "${asm.jar}" />
<available file= "${jacoco.zip}" />
2014-01-20 14:25:22 -05:00
<available file= "${rat.jar}" />
2015-08-27 09:14:46 -04:00
<available file= "${forbidden.jar}" />
2014-09-29 19:39:45 -04:00
<available file= "${dsig.bouncycastle-prov.jar}" />
<available file= "${dsig.bouncycastle-pkix.jar}" />
<available file= "${dsig.xmlsec.jar}" />
<available file= "${dsig.sl4j-api.jar}" />
2016-07-30 04:54:50 -04:00
<available file= "${main.commons-collections4.jar}" />
2003-07-14 08:11:12 -04:00
</and>
<isset property= "disconnected" />
</or>
2003-04-23 20:53:41 -04:00
</condition>
</target>
2008-11-07 04:29:54 -05:00
<target name= "fetch-jars" depends= "check-jars" unless= "jars.present"
2009-11-21 10:30:54 -05:00
description="Fetches needed JAR files from the Internet">
<mkdir dir= "${main.lib}" />
2016-03-06 20:58:26 -05:00
<downloadfile src= "${main.commons-logging.url}" dest= "${main.commons-logging.jar}" />
<downloadfile src= "${main.commons-codec.url}" dest= "${main.commons-codec.jar}" />
<downloadfile src= "${main.log4j.url}" dest= "${main.log4j.jar}" />
<downloadfile src= "${main.junit.url}" dest= "${main.junit.jar}" />
2017-05-15 19:27:21 -04:00
<downloadfile src= "${main.jmh.url}" dest= "${main.jmh.jar}" />
<downloadfile src= "${main.jmhAnnotation.url}" dest= "${main.jmhAnnotation.jar}" />
2016-03-06 20:58:26 -05:00
<downloadfile src= "${main.hamcrest.url}" dest= "${main.hamcrest.jar}" />
<downloadfile src= "${main.ant.url}" dest= "${main.ant.jar}" />
<downloadfile src= "${main.antlauncher.url}" dest= "${main.antlauncher.jar}" />
<downloadfile src= "${asm.url}" dest= "${asm.jar}" />
<downloadfile src= "${jacoco.url}" dest= "${jacoco.zip}" />
2016-07-30 04:54:50 -04:00
<downloadfile src= "${main.commons-collections4.url}" dest= "${main.commons-collections4.jar}" />
2013-08-04 12:38:01 -04:00
<unzip src= "${jacoco.zip}" dest= "." >
<patternset >
<include name= "lib/*.jar" />
</patternset>
</unzip>
2016-03-06 20:58:26 -05:00
<downloadfile src= "${rat.url}" dest= "${rat.jar}" />
<downloadfile src= "${forbidden.url}" dest= "${forbidden.jar}" />
<downloadfile src= "${dsig.bouncycastle-prov.url}" dest= "${dsig.bouncycastle-prov.jar}" />
<downloadfile src= "${dsig.bouncycastle-pkix.url}" dest= "${dsig.bouncycastle-pkix.jar}" />
<downloadfile src= "${dsig.xmlsec.url}" dest= "${dsig.xmlsec.jar}" />
<downloadfile src= "${dsig.sl4j-api.url}" dest= "${dsig.sl4j-api.jar}" />
2008-11-07 04:29:54 -05:00
</target>
<target name= "check-ooxml-jars" >
<condition property= "ooxml.jars.present" >
<or >
<and >
2015-10-19 01:59:42 -04:00
<available file= "${ooxml.curvesapi.jar}" />
2014-08-04 16:40:45 -04:00
<available file= "${ooxml.xmlbeans23.jar}" />
<available file= "${ooxml.xmlbeans26.jar}" />
2008-11-07 04:29:54 -05:00
</and>
<isset property= "disconnected" />
</or>
</condition>
</target>
<target name= "fetch-ooxml-jars" depends= "check-ooxml-jars" unless= "ooxml.jars.present" >
2009-11-21 10:30:54 -05:00
<mkdir dir= "${ooxml.lib}" />
2016-03-06 20:58:26 -05:00
<downloadfile src= "${ooxml.curvesapi.url}" dest= "${ooxml.curvesapi.jar}" />
2016-03-18 17:34:03 -04:00
<downloadfile src= "${ooxml.xmlbeans23.url}" dest= "${ooxml.xmlbeans23.jar}.orig" />
<downloadfile src= "${ooxml.xmlbeans26.url}" dest= "${ooxml.xmlbeans26.jar}.orig" />
2016-04-17 18:01:48 -04:00
<!-- remove piccolo parser, so we don't use unsafe calls to it instead of using jaxp -->
<zip destfile= "${ooxml.xmlbeans23.jar}" >
<zipfileset src= "${ooxml.xmlbeans23.jar}.orig" excludes= "org/apache/xmlbeans/impl/piccolo/**" />
</zip>
2016-03-18 17:34:03 -04:00
<zip destfile= "${ooxml.xmlbeans26.jar}" >
<zipfileset src= "${ooxml.xmlbeans26.jar}.orig" excludes= "org/apache/xmlbeans/impl/piccolo/**" />
</zip>
2003-04-23 20:53:41 -04:00
</target>
2016-03-30 17:27:03 -04:00
<target name= "check-svn-jars" >
<condition property= "svn.jars.present" >
<or >
<and >
2016-04-03 18:19:44 -04:00
<available file= "${dist.svnant.zip}" />
2016-03-30 17:27:03 -04:00
<available file= "${dist.svnclient.jar}" />
<available file= "${dist.svnkit.jar}" />
2016-04-03 18:19:44 -04:00
<available file= "${dist.svnkit-javahl16.jar}" />
<available file= "${dist.sqljet.jar}" />
<available file= "${dist.antlr.jar}" />
<available file= "${dist.sequence-library.jar}" />
2016-03-30 17:27:03 -04:00
</and>
<isset property= "disconnected" />
</or>
</condition>
</target>
<target name= "fetch-svn-jars" depends= "check-svn-jars" unless= "svn.jars.present" >
2016-04-03 18:19:44 -04:00
<mkdir dir= "${compile.lib}/svnant" />
<downloadfile src= "${dist.svnant.url}" dest= "${dist.svnant.zip}" />
<unzip src= "${dist.svnant.zip}" dest= "${compile.lib}/svnant" >
<patternset >
<include name= "lib/svnant.jar" />
</patternset>
<mapper >
<chainedmapper >
<flattenmapper />
<globmapper from= "svnant.jar" to= "svnant-1.3.1.jar" />
</chainedmapper>
</mapper>
</unzip>
2016-03-30 17:27:03 -04:00
<downloadfile src= "${dist.svnclient.url}" dest= "${dist.svnclient.jar}" />
<downloadfile src= "${dist.svnkit.url}" dest= "${dist.svnkit.jar}" />
2016-04-03 18:19:44 -04:00
<downloadfile src= "${dist.svnkit-javahl16.url}" dest= "${dist.svnkit-javahl16.jar}" />
<downloadfile src= "${dist.sqljet.url}" dest= "${dist.sqljet.jar}" />
<downloadfile src= "${dist.antlr.url}" dest= "${dist.antlr.jar}" />
<downloadfile src= "${dist.sequence-library.url}" dest= "${dist.sequence-library.jar}" />
2016-03-30 17:27:03 -04:00
</target>
2003-04-23 20:53:41 -04:00
2009-11-21 10:30:54 -05:00
<target name= "check-ooxml-xsds" >
2007-12-26 12:39:15 -05:00
<condition property= "ooxml-xsds.present" >
<or >
<and >
2014-08-10 14:25:10 -04:00
<available file= "${ooxml.lib}/${ooxml.xsds.izip.1}" />
2014-10-12 16:07:11 -04:00
<available file= "${ooxml.lib}/${ooxml.xsds.izip.2}" />
2007-12-26 12:39:15 -05:00
</and>
<isset property= "disconnected" />
</or>
</condition>
2009-11-21 10:30:54 -05:00
</target>
2007-12-26 12:39:15 -05:00
<target name= "fetch-ooxml-xsds" unless= "ooxml-xsds.present"
2014-08-10 14:25:10 -04:00
depends="check-ooxml-xsds"
2009-11-21 10:30:54 -05:00
description="Fetches needed OOXML xsd files from the Internet">
2014-08-10 14:25:10 -04:00
<get dest= "${ooxml.lib}" skipexisting= "true" >
2015-08-07 19:33:30 -04:00
<url url= "${ooxml.xsds.url.1}" />
<url url= "${ooxml.xsds.url.2}" />
<url url= "${ooxml.xsds.dsig.1}" />
<url url= "${ooxml.xsds.dsig.2}" />
<url url= "${ooxml.xsds.dsig.3}" />
<chainedmapper >
<flattenmapper />
<firstmatchmapper >
<globmapper from= "Office%20Open%20XML%201st%20edition%20Part%20*%20(PDF).zip" to= "OfficeOpenXML-Part*.zip" />
<identitymapper />
</firstmatchmapper>
</chainedmapper>
</get>
2014-08-10 14:25:10 -04:00
<unzip src= "${ooxml.lib}/${ooxml.xsds.ozip.1}" dest= "${ooxml.lib}" >
2015-08-07 19:33:30 -04:00
<fileset dir= "${ooxml.lib}" includes= "OfficeOpenXML-Part*.zip" />
2009-11-21 10:30:54 -05:00
<patternset >
2014-08-10 14:25:10 -04:00
<include name= "${ooxml.xsds.izip.1}" />
2015-08-07 19:33:30 -04:00
<include name= "${ooxml.xsds.izip.2}" />
2009-11-21 10:30:54 -05:00
</patternset>
</unzip>
</target>
2010-04-26 12:46:08 -04:00
<target name= "check-compiled-ooxml-xsds" depends= "fetch-ooxml-xsds" >
2007-12-27 04:12:57 -05:00
<condition property= "ooxml-compiled-xsds.present" >
<or >
2015-08-07 19:33:30 -04:00
<and >
2014-10-12 16:07:11 -04:00
<available file= "${ooxml.xsds.jar}" />
2014-10-25 15:34:42 -04:00
<available file= "${ooxml.security.jar}" />
2015-02-09 17:32:43 -05:00
<available file= "${ooxml.xsds.src.jar}" />
2015-02-23 08:21:06 -05:00
<available file= "${ooxml.security.src.jar}" />
2015-08-07 19:33:30 -04:00
</and>
2013-12-24 18:13:21 -05:00
<isset property= "disconnected" />
</or>
</condition>
2009-11-21 10:30:54 -05:00
</target>
2015-11-21 14:37:26 -05:00
<macrodef name= "compile-ooxml-xmlbean" >
<attribute name= "classes-jar" />
<attribute name= "sources-jar" />
<attribute name= "noupa" default= "false" />
<attribute name= "nopvr" default= "false" />
<element name= "xsds" />
<sequential >
<!-- We need a fair amount of memory to compile the xml schema, -->
<!-- but limit it in case it goes wrong! -->
<!-- Pick the right amount based on 32 vs 64 bit jvm -->
2017-05-30 09:57:42 -04:00
<condition property= "ooxml.memory" value= "1536m" else= "1024m" >
2015-11-21 14:37:26 -05:00
<equals arg1= "${sun.arch.data.model}" arg2= "64" />
</condition>
<taskdef name= "xmlbean"
classname="org.apache.xmlbeans.impl.tool.XMLBean"
2016-03-20 09:15:04 -04:00
classpath="${ooxml.xmlbeans23.jar}.orig"/>
2015-11-21 14:37:26 -05:00
<property name= "xmlbean.xsds.dir" location= "build/xmlbean-xsds" />
<property name= "xmlbean.sources.dir" location= "build/xmlbean-sources" />
<property name= "xmlbean.classes.dir" location= "build/xmlbean-classes" />
<delete dir= "${xmlbean.xsds.dir}" />
<mkdir dir= "${xmlbean.xsds.dir}" />
<delete dir= "${xmlbean.sources.dir}" />
<mkdir dir= "${xmlbean.sources.dir}" />
<delete dir= "${xmlbean.classes.dir}" />
<mkdir dir= "${xmlbean.classes.dir}" />
<copy todir= "${xmlbean.xsds.dir}" >
<xsds />
</copy>
<!-- javasource > 1.5 will not generate all array accessor -->
<xmlbean
schema="${xmlbean.xsds.dir}"
srcgendir="${xmlbean.sources.dir}"
classgendir="${xmlbean.classes.dir}"
destfile="${xmlbean.xsds.dir}.jar"
srconly="true"
javasource="1.5"
failonerror="true"
fork="true"
memoryMaximumSize="${ooxml.memory}"
noupa="@{noupa}"
nopvr="@{nopvr}"
>
2016-03-21 16:44:32 -04:00
<classpath >
2016-04-17 18:01:48 -04:00
<path location= "${ooxml.xmlbeans23.jar}.orig" />
2016-03-21 16:44:32 -04:00
</classpath>
2015-11-21 14:37:26 -05:00
</xmlbean>
<replace dir= "${xmlbean.sources.dir}" includes= "**/*.java" excludes= "**/impl/**" >
<replacetoken > org.apache.xmlbeans.XmlBeans.getContextTypeLoader()</replacetoken>
<replacevalue > org.apache.poi.POIXMLTypeLoader</replacevalue>
</replace>
2016-04-17 18:01:48 -04:00
<!-- remove deprecated warnings, as we prefer the array methods - see #56854 -->
2015-12-05 16:58:20 -05:00
<replace dir= "${xmlbean.sources.dir}" includes= "**/*.java" excludes= "**/impl/**" >
<replacetoken > < ![CDATA[ * @deprecated
]]></replacetoken>
</replace>
2015-11-21 14:37:26 -05:00
<copy todir= "${xmlbean.sources.dir}" >
2016-04-17 18:01:48 -04:00
<fileset dir= "${ooxml.src}" >
<include name= "org/apache/poi/POIXMLTypeLoader.java" />
<include name= "org/apache/poi/util/DocumentHelper.java" />
<include name= "org/apache/poi/util/SAXHelper.java" />
</fileset>
<fileset dir= "${main.src}" >
<include name= "org/apache/poi/util/POILogFactory.java" />
<include name= "org/apache/poi/util/POILogger.java" />
2016-03-09 16:01:33 -05:00
<include name= "org/apache/poi/util/NullLogger.java" />
<include name= "org/apache/poi/util/Internal.java" />
2016-04-17 18:01:48 -04:00
</fileset>
2015-11-21 14:37:26 -05:00
</copy>
2017-05-30 09:33:07 -04:00
<echo > Forking javac with max heap size ${ooxml.memory}</echo>
2015-11-21 14:37:26 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
srcdir="${xmlbean.sources.dir}"
destdir="${xmlbean.classes.dir}"
encoding="${java.source.encoding}"
fork="yes"
optimize="true"
memoryMaximumSize="${ooxml.memory}"
includeantruntime="false">
<!-- debug="${compile.debug}" -->
<classpath refid= "ooxml.classpath" />
2017-06-09 08:49:01 -04:00
<!-- unfortunately JUnit is required here for OOXMLLite, we should rather move OOXMLLite
to test or a separate folder to clean up dependencies -->
<classpath location= "${main.junit.jar}" />
2015-11-21 14:37:26 -05:00
</javac>
<jar basedir= "${xmlbean.classes.dir}" destfile= "@{classes-jar}" excludes= "org/apache/**" level= "9" />
<jar basedir= "${xmlbean.sources.dir}" destfile= "@{sources-jar}" excludes= "org/apache/**" level= "9" />
<delete file= "${xmlbean.xsds.dir}.jar" />
<delete dir= "${xmlbean.xsds.dir}" />
<delete dir= "${xmlbean.sources.dir}" />
<delete dir= "${xmlbean.classes.dir}" />
</sequential>
</macrodef>
2009-11-21 10:30:54 -05:00
<target name= "compile-ooxml-xsds" unless= "ooxml-compiled-xsds.present"
2015-08-18 01:12:43 -04:00
depends="init,check-compiled-ooxml-xsds"
2014-08-10 14:25:10 -04:00
description="Unpacks the OOXML xsd files, and compiles them into XmlBeans">
2015-11-21 14:37:26 -05:00
<compile-ooxml-xmlbean classes-jar= "${ooxml.xsds.jar}" sources-jar= "${ooxml.xsds.src.jar}" >
<xsds >
<zipfileset src= "${ooxml.lib}/${ooxml.xsds.izip.1}" />
<fileset dir= "${ooxml.visio.xsd.dir}" />
<fileset dir= "${ooxml.schema.xsdconfig.dir}" />
</xsds>
</compile-ooxml-xmlbean>
2015-08-07 19:33:30 -04:00
<!-- Now do the same for the security schemas -->
2016-04-29 16:55:52 -04:00
<compile-ooxml-xmlbean classes-jar= "${ooxml.security.jar}" sources-jar= "${ooxml.security.src.jar}" >
2015-11-21 14:37:26 -05:00
<xsds >
2016-04-29 16:55:52 -04:00
<zipfileset src= "${ooxml.lib}/${ooxml.xsds.izip.2}" includes= "opc-digSig.xsd,opc-relationships.xsd" />
<fileset dir= "${ooxml.lib}" includes= "xmldsig*.xsd,XAdES*.xsd" />
2015-11-21 14:37:26 -05:00
<fileset dir= "${ooxml.security.xsd.dir}" />
</xsds>
</compile-ooxml-xmlbean>
2013-12-24 18:13:21 -05:00
</target>
2009-11-21 10:30:54 -05:00
<target name= "compile" depends= "init, c o m p i l e - m a i n ,
2011-02-18 15:04:50 -05:00
compile-scratchpad, compile-examples, compile-excelant"
2010-10-06 03:58:51 -04:00
description="Compiles the POI main classes, scratchpad and examples"/>
2009-11-21 10:30:54 -05:00
2009-11-23 03:43:04 -05:00
<target name= "compile-all" depends= "compile,compile-ooxml-lite" />
2014-02-14 19:19:50 -05:00
<target name= "compile-main" depends= "init" >
2016-04-17 21:07:37 -04:00
<!-- compile the sources -->
2009-11-21 10:30:54 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${main.output.dir}"
srcdir="${main.src}"
debug="${compile.debug}"
2010-06-13 02:26:14 -04:00
encoding="${java.source.encoding}"
2010-11-25 05:28:02 -05:00
fork="yes"
includeantruntime="false">
2009-11-21 10:30:54 -05:00
<classpath refid= "main.classpath" />
</javac>
2016-04-17 21:07:37 -04:00
<!-- compile the tests -->
2009-11-21 10:30:54 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${main.output.test.dir}"
srcdir="${main.src.test}"
debug="${compile.debug}"
2010-06-13 02:26:14 -04:00
encoding="${java.source.encoding}"
2010-11-25 05:28:02 -05:00
fork="yes"
includeantruntime="false">
2009-11-21 10:30:54 -05:00
<classpath >
<path refid= "main.classpath" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2009-11-21 10:30:54 -05:00
<pathelement path= "${main.output.dir}" />
</classpath>
</javac>
<copy todir= "${main.output.dir}" >
<fileset dir= "${main.resource1.dir}" />
</copy>
</target>
2015-08-07 19:33:30 -04:00
<target name= "generate-geometry" depends= "fetch-ooxml-xsds" if= "ignoreme" >
<delete dir= "${geometry.output.tmpdir}" />
<!-- taskdef xjc -->
<!-- "D:\Program Files\Java\jdk1.6.0_45\bin\xjc" - p org.apache.poi.sl.model.geom.binding - readOnly - Xlocator - mark - generated ooxml - schemas\dml - shapeGeometry.xsd -->
<unzip src= "${ooxml.lib}/${ooxml.xsds.izip.1}" dest= "${geometry.output.tmpdir}" />
<exec executable= "${env.JAVA_HOME}/bin/xjc" >
<arg value= "-p" />
<arg value= "${geometry.pkg}" />
<arg value= "-b" />
<arg file= "src/types/definitions/dml-shapeGeometry.xjb" />
<arg value= "-readOnly" />
<arg value= "-npa" />
<arg value= "-no-header" />
<!-- arg value=" - mark - generated"/ -->
<!-- arg value=" - Xlocator"/ -->
<arg file= "${geometry.output.tmpdir}/dml-shapeGeometry.xsd" />
<arg value= "-d" />
<arg file= "${geometry.output.tmpdir}" />
</exec>
<copy file= "src/java/org/apache/poi/POIDocument.java" tofile= "${geometry.output.tmpdir}/apache-license.txt" >
<filterchain >
<headfilter lines= "16" />
</filterchain>
</copy>
<copy todir= "${main.src}" >
<fileset dir= "${geometry.output.tmpdir}" includes= "**/*.java" />
<filterchain >
<concatfilter prepend= "${geometry.output.tmpdir}/apache-license.txt" />
</filterchain>
</copy>
</target>
<target name= "compile-scratchpad" depends= "compile-main,generate-geometry" >
2016-04-17 21:07:37 -04:00
<!-- compile the sources -->
2009-11-21 10:30:54 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${scratchpad.output.dir}"
srcdir="${scratchpad.src}"
debug="${compile.debug}"
2010-06-13 02:26:14 -04:00
encoding="${java.source.encoding}"
2010-11-25 05:28:02 -05:00
fork="yes"
includeantruntime="false">
2009-11-21 10:30:54 -05:00
<classpath refid= "scratchpad.classpath" />
</javac>
2016-04-17 21:07:37 -04:00
<!-- compile the tests -->
2009-11-21 10:30:54 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${scratchpad.output.test.dir}"
srcdir="${scratchpad.src.test}"
debug="${compile.debug}"
2010-06-13 02:26:14 -04:00
encoding="${java.source.encoding}"
2010-11-25 05:28:02 -05:00
fork="yes"
includeantruntime="false">
2009-11-21 10:30:54 -05:00
<classpath >
<path refid= "scratchpad.classpath" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2009-11-21 10:30:54 -05:00
<pathelement location= "${scratchpad.output.dir}" />
<pathelement location= "${main.output.test.dir}" />
</classpath>
</javac>
<copy todir= "${scratchpad.output.dir}" >
<fileset dir= "${scratchpad.resource1.dir}" />
</copy>
</target>
<target name= "compile-examples" depends= "compile-main,compile-scratchpad,compile-ooxml" >
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${examples.output.dir}"
srcdir="${examples.src}"
debug="${compile.debug}"
2010-06-13 02:26:14 -04:00
encoding="${java.source.encoding}"
2010-11-25 05:28:02 -05:00
fork="yes"
includeantruntime="false">
2009-11-21 10:30:54 -05:00
<classpath >
<path refid= "ooxml.classpath" />
<pathelement path= "${ooxml.output.dir}" />
</classpath>
</javac>
2010-05-10 12:11:50 -04:00
<copy todir= "${examples.output.dir}" >
<fileset dir= "${examples.src}" >
<include name= "**/*.css" />
</fileset>
</copy>
2009-11-21 10:30:54 -05:00
</target>
2014-08-10 14:25:10 -04:00
<target name= "compile-ooxml" depends= "compile-main,compile-scratchpad,compile-ooxml-xsds" >
2016-04-17 20:16:28 -04:00
<!-- compile the sources -->
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${ooxml.output.dir}"
srcdir="${ooxml.src}"
debug="${compile.debug}"
encoding="${java.source.encoding}"
fork="yes"
includeantruntime="false">
<classpath >
<path refid= "ooxml.classpath" />
<path refid= "ooxml.xmlsec.classpath" />
2017-06-09 08:49:01 -04:00
<!-- unfortunately JUnit is required here for OOXMLLite, we should rather move OOXMLLite
to test or a separate folder to clean up dependencies -->
<pathelement location= "${main.junit.jar}" />
2016-04-17 20:16:28 -04:00
</classpath>
</javac>
2016-04-17 21:07:37 -04:00
<!-- compile the tests -->
2016-04-17 20:16:28 -04:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${ooxml.output.test.dir}"
srcdir="${ooxml.src.test}"
debug="${compile.debug}"
encoding="${java.source.encoding}"
fork="yes"
includeantruntime="false">
<classpath >
<path refid= "ooxml.classpath" />
<path refid= "ooxml.xmlsec.classpath" />
<path refid= "test.ooxml.classpath" />
<pathelement path= "${ooxml.output.dir}" />
<pathelement path= "${main.output.test.dir}" />
</classpath>
</javac>
<copy todir= "${ooxml.output.dir}" >
<fileset dir= "${ooxml.resource1.dir}" />
</copy>
</target>
<target name= "compile-ooxml-ss" depends= "compile-main,compile-scratchpad,compile-ooxml-xsds" >
<!-- depends: compile - scratchpad needed for extractor -->
<!-- compile the sources -->
2009-11-21 10:30:54 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${ooxml.output.dir}"
srcdir="${ooxml.src}"
2010-11-25 05:28:02 -05:00
debug="${compile.debug}"
2010-06-13 02:26:14 -04:00
encoding="${java.source.encoding}"
2010-11-25 05:28:02 -05:00
fork="yes"
includeantruntime="false">
2014-10-18 19:19:49 -04:00
<classpath >
2015-08-07 19:33:30 -04:00
<path refid= "ooxml.classpath" />
<path refid= "ooxml.xmlsec.classpath" />
</classpath>
2016-04-17 20:16:28 -04:00
<include name= "org/apache/poi/ss/**/*.java" />
<include name= "org/apache/poi/xssf/**/*.java" />
<include name= "org/apache/poi/extractor/**/*.java" />
2009-11-21 10:30:54 -05:00
</javac>
2016-04-17 21:07:37 -04:00
<!-- compile the tests -->
2009-11-21 10:30:54 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${ooxml.output.test.dir}"
srcdir="${ooxml.src.test}"
debug="${compile.debug}"
2010-06-13 02:26:14 -04:00
encoding="${java.source.encoding}"
2010-11-25 05:28:02 -05:00
fork="yes"
includeantruntime="false">
2009-11-21 10:30:54 -05:00
<classpath >
<path refid= "ooxml.classpath" />
2015-08-07 19:33:30 -04:00
<path refid= "ooxml.xmlsec.classpath" />
<path refid= "test.ooxml.classpath" />
2009-11-21 10:30:54 -05:00
<pathelement path= "${ooxml.output.dir}" />
<pathelement path= "${main.output.test.dir}" />
</classpath>
2016-04-17 20:16:28 -04:00
<include name= "org/apache/poi/ss/**/*.java" />
<include name= "org/apache/poi/xssf/**/*.java" />
2009-11-21 10:30:54 -05:00
</javac>
2011-11-07 04:12:16 -05:00
<copy todir= "${ooxml.output.dir}" >
<fileset dir= "${ooxml.resource1.dir}" />
</copy>
2009-11-21 10:30:54 -05:00
</target>
2011-02-18 15:04:50 -05:00
<target name= "compile-excelant" depends= "compile-main,compile-ooxml" >
2016-04-17 21:07:37 -04:00
<!-- compile the sources -->
2011-02-18 15:04:50 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${excelant.output.dir}"
srcdir="${excelant.src}"
debug="${compile.debug}"
encoding="${java.source.encoding}"
fork="yes"
includeantruntime="false">
<classpath refid= "excelant.classpath" />
</javac>
2016-04-17 21:07:37 -04:00
<!-- compile the tests -->
2011-02-18 15:04:50 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${excelant.output.test.dir}"
srcdir="${excelant.src.test}"
debug="${compile.debug}"
encoding="${java.source.encoding}"
fork="yes"
includeantruntime="false">
<classpath >
<path refid= "excelant.classpath" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2011-02-18 15:04:50 -05:00
<pathelement location= "${excelant.output.dir}" />
<pathelement path= "${main.output.test.dir}" />
</classpath>
</javac>
<copy todir= "${excelant.output.dir}" >
<fileset dir= "${excelant.resource.dir}" />
</copy>
</target>
2016-09-14 13:55:51 -04:00
<target name= "compile-integration" depends= "compile-scratchpad, compile-main, compile-ooxml, compile-examples" >
2014-12-25 04:16:44 -05:00
<javac target= "${jdk.version.class}"
source="${jdk.version.source}"
destdir="${integration.output.test.dir}"
srcdir="${integration.src.test}"
debug="${compile.debug}"
encoding="${java.source.encoding}"
fork="yes"
includeantruntime="false">
<classpath >
<path refid= "scratchpad.classpath" />
<path refid= "ooxml.classpath" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2015-08-07 19:33:30 -04:00
<pathelement location= "${ooxml.output.dir}" />
2014-12-25 04:16:44 -05:00
<pathelement location= "${main.output.test.dir}" />
2016-04-01 02:25:49 -04:00
<pathelement location= "${examples.output.dir}" />
2015-08-07 19:33:30 -04:00
<pathelement location= "${main.ant.jar}" />
2014-12-25 04:16:44 -05:00
</classpath>
</javac>
<!-- copy todir="${integration.output.dir}">
<fileset dir= "${integration.resource1.dir}" />
</copy-->
</target>
2009-11-21 10:30:54 -05:00
<target name= "compile-version" depends= "init"
description="Compiles the version class">
<!-- Generate the .java file -->
<property name= "version.java" value= "${main.output.dir}/org/apache/poi/Version.java" />
<delete file= "${version.java}" />
<copy
file="src/resources/version/Version.java.template"
tofile="${version.java}">
<filterset >
<filter token= "VERSION" value= "${version.id}" />
<filter token= "DSTAMP" value= "${DSTAMP}" />
</filterset>
</copy>
<!-- Compile -->
<javac target= "${jdk.version.class}" source= "${jdk.version.source}"
failonerror="true" destdir="${main.output.dir}" debug="on" fork="yes"
2010-06-13 02:26:14 -04:00
srcdir="${main.output.dir}"
2010-11-25 05:28:02 -05:00
encoding="${java.source.encoding}" includeantruntime="false">
2010-06-13 02:26:14 -04:00
</javac>
2009-11-21 10:30:54 -05:00
<!-- Tidy up -->
<delete file= "${version.java}" />
</target>
2013-08-04 12:38:01 -04:00
<target name= "jacocotask" depends= "" >
2013-08-12 15:43:40 -04:00
<echo message= "Coverage reporting: ${coverage.enabled}" />
2013-08-04 12:38:01 -04:00
<taskdef uri= "antlib:org.jacoco.ant" resource= "org/jacoco/ant/antlib.xml" >
<classpath refid= "lib.jacoco" />
</taskdef>
</target>
2016-04-17 21:23:26 -04:00
<!-- Section: test (execute junit tests on test suites) -->
2013-08-04 12:38:01 -04:00
<target name= "test" depends= "compile,jacocotask,test-main,test-scratchpad,test-ooxml,test-excelant"
2010-10-06 03:58:51 -04:00
description="Tests main, scratchpad and ooxml"/>
2016-04-17 21:23:26 -04:00
<target name= "test-all" depends= "test,test-ooxml-lite,testcoveragereport"
description="Tests main, scratchpad, ooxml, ooxml-lite, and coveragereport"/>
<target name= "test-ss" depends= "test-hssf, test-ooxml-ss"
description="Test POI Spreadsheet classes (SS, HSSF, XSSF, SXSSF)"/>
2013-08-04 12:38:01 -04:00
2013-08-12 15:43:40 -04:00
<target name= "testcoveragereport" depends= "jacocotask" description= "create test-report" xmlns:jacoco= "antlib:org.jacoco.ant" if= "coverage.enabled" >
2013-08-04 12:38:01 -04:00
<delete dir= "${coverage.dir}" />
<mkdir dir= "${coverage.dir}" />
<jacoco:report >
<executiondata >
<fileset dir= "build" >
<include name= "*.exec" />
</fileset>
</executiondata>
2015-08-07 19:33:30 -04:00
2013-08-04 12:38:01 -04:00
<structure name= "Apache POI" >
<group name= "Main" >
<classfiles >
<fileset dir= "${main.output.dir}" >
2016-07-31 13:19:37 -04:00
<!-- exclude some generated classes -->
<exclude name= "org/apache/poi/sl/draw/binding/*.class" />
2015-08-07 19:33:30 -04:00
<!-- exclude large test - class -->
2013-10-30 18:26:13 -04:00
<exclude name= "org/apache/poi/hssf/usermodel/DummyGraphics2d.class" />
2013-08-04 12:38:01 -04:00
</fileset>
</classfiles>
<sourcefiles encoding= "UTF-8" >
<fileset dir= "${main.src}" />
</sourcefiles>
</group>
<group name= "Scratchpad" >
<classfiles >
2014-03-16 15:46:46 -04:00
<fileset dir= "${scratchpad.output.dir}" >
2015-08-07 19:33:30 -04:00
<!-- exclude some generated classes -->
<exclude name= "org/apache/poi/hwpf/model/types/*.class" />
<exclude name= "org/apache/poi/hdf/model/hdftypes/definitions/*.class" />
</fileset>
2013-08-04 12:38:01 -04:00
</classfiles>
<sourcefiles encoding= "UTF-8" >
<fileset dir= "${scratchpad.src}" />
</sourcefiles>
</group>
<group name= "OOXML" >
<classfiles >
2015-01-03 04:34:25 -05:00
<fileset dir= "${ooxml.output.dir}" />
<!-- there are no actual POI classes in build/ooxml - lite - classes, only generated code...
2016-12-31 04:43:13 -05:00
<fileset dir= "${ooxml.lite.output.dir}" />
-->
2013-08-04 12:38:01 -04:00
</classfiles>
<sourcefiles encoding= "UTF-8" >
<fileset dir= "${ooxml.src}" />
<!-- fileset dir="${ooxml.lite.src}"/ -->
</sourcefiles>
</group>
<group name= "Excelant" >
<classfiles >
<fileset dir= "${excelant.output.dir}" />
</classfiles>
<sourcefiles encoding= "UTF-8" >
<fileset dir= "${excelant.src}" />
</sourcefiles>
</group>
2015-01-03 04:34:25 -05:00
<!-- group name="Examples">
<classfiles >
<fileset dir= "${examples.output.dir}" />
</classfiles>
<sourcefiles encoding= "UTF-8" >
<fileset dir= "${examples.src}" />
</sourcefiles>
</group-->
2013-08-04 12:38:01 -04:00
</structure>
2015-08-07 19:33:30 -04:00
2013-08-04 12:38:01 -04:00
<html destdir= "${coverage.dir}" />
<xml destfile= "${coverage.dir}/coverage.xml" />
2015-08-07 19:33:30 -04:00
</jacoco:report>
2015-05-19 06:16:57 -04:00
<echo message= "Coverage results are available at ${coverage.dir}/index.html, ${coverage.dir}/coverage.xml" />
2013-08-04 12:38:01 -04:00
</target>
2003-04-23 20:53:41 -04:00
2016-04-17 20:16:28 -04:00
<!-- Section: test - main -->
2003-04-23 20:53:41 -04:00
<target name= "-test-main-check" >
<uptodate property= "main.test.notRequired" targetfile= "${main.testokfile}" >
<srcfiles dir= "${main.src}" />
<srcfiles dir= "${main.src.test}" />
</uptodate>
</target>
2009-11-21 10:30:54 -05:00
<target name= "test-main" unless= "main.test.notRequired"
2016-04-17 21:23:26 -04:00
depends="compile-main, -test-main-check,jacocotask" xmlns:jacoco="antlib:org.jacoco.ant"
description="tests POI classes that deal with the Microsoft Office binary (BIFF8) file formats (excludes OOXML)">
2013-08-04 12:38:01 -04:00
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-main.exec" >
<junit fork= "yes" forkmode= "once" printsummary= "yes" haltonfailure= "${halt.on.test.failure}"
failureproperty="main.test.failed" showoutput="true">
<classpath refid= "test.classpath" />
2017-06-09 08:49:01 -04:00
<classpath refid= "test.jar.classpath" />
2013-08-04 12:38:01 -04:00
<syspropertyset refid= "junit.properties" />
<jvmarg value= "-ea" />
<jvmarg value= "-Xmx256m" />
2016-04-17 18:01:48 -04:00
<!-- jvmarg value=" - Duser.timezone=UTC"/ -->
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${file.leak.detector}" />
2013-08-04 12:38:01 -04:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${main.reports.test}" >
<fileset dir= "${main.src.test}" >
<include name= "**/${testpattern}.java" />
<exclude name= "**/All*Tests.java" />
<exclude name= "**/TestUnfixedBugs.java" />
<exclude name= "**/TestcaseRecordInputStream.java" />
2016-11-07 16:32:22 -05:00
<exclude name= "**/${testexcludepattern}.java" />
2016-11-29 17:41:26 -05:00
<patternset refid= "exclude-scratchpad-test" if:true= "${scratchpad.ignore}" />
2013-08-04 12:38:01 -04:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
2009-11-21 10:30:54 -05:00
<delete file= "${main.testokfile}" />
<antcall target= "-test-main-write-testfile" />
2003-07-14 08:11:12 -04:00
</target>
2016-11-29 17:41:26 -05:00
<target name= "test-report" depends= "init" >
<mkdir dir= "build/report" />
<junitreport todir= "build/report" >
<fileset dir= "build" >
<include name= "*results/**/TEST-*.xml" />
</fileset>
<report format= "frames" todir= "build/report" />
</junitreport>
</target>
2016-07-31 17:23:25 -04:00
2003-07-14 08:11:12 -04:00
<target name= "-test-property-check" unless= "testcase" >
<echo message= "Please use -Dtestcase=org.your.testcase to run a single test" />
<fail />
2003-05-04 05:17:06 -04:00
</target>
2003-04-23 20:53:41 -04:00
<target name= "-test-main-write-testfile" unless= "main.test.failed" >
<echo file= "${main.testokfile}" append= "false" message= "testok" />
</target>
2016-04-17 21:07:37 -04:00
<!-- Section: test - hssf -->
<target name= "-test-main-hssf-check" >
<uptodate property= "main.hssf.test.notRequired" targetfile= "${main.hssf.testokfile}" >
<srcfiles dir= "${main.src}" />
<srcfiles dir= "${main.src.test}" />
</uptodate>
</target>
<!-- HSSF subset of test - main
Purpose: quicker HSSF testing cycles. Skips some tests for speed reasons. This target is not sufficient for committing changes. -->
<target name= "test-hssf" unless= "main.hssf.test.notRequired"
2016-04-17 21:23:26 -04:00
depends="compile-main, -test-main-hssf-check,jacocotask" xmlns:jacoco="antlib:org.jacoco.ant"
description="test HSSF classes only">
2016-12-31 04:43:13 -05:00
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-hssf.exec" >
2016-04-17 21:07:37 -04:00
<junit fork= "yes" forkmode= "once" printsummary= "yes" haltonfailure= "${halt.on.test.failure}"
failureproperty="main.hssf.test.failed" showoutput="true">
<classpath refid= "test.classpath" />
<syspropertyset refid= "junit.properties" />
<jvmarg value= "-ea" />
<jvmarg value= "-Xmx256m" />
<!-- jvmarg value=" - Duser.timezone=UTC"/ -->
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2016-04-17 21:07:37 -04:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${main.reports.test}" >
<fileset dir= "${main.src.test}" >
<include name= "org/apache/poi/ss/**/${testpattern}.java" />
<include name= "org/apache/poi/hssf/**/${testpattern}.java" />
<!-- skip slow dev tests, especially TestBiffViewer and TestReSave -->
<exclude name= "org/apache/poi/hssf/dev/**/${testpattern}.java" />
<exclude name= "**/All*Tests.java" />
<exclude name= "**/TestUnfixedBugs.java" />
<exclude name= "**/TestcaseRecordInputStream.java" />
2016-11-07 16:32:22 -05:00
<exclude name= "**/${testexcludepattern}.java" />
2016-11-29 17:41:26 -05:00
<patternset refid= "exclude-scratchpad-test" if:true= "${scratchpad.ignore}" />
2016-04-17 21:07:37 -04:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
<delete file= "${main.hssf.testokfile}" />
<antcall target= "-test-main-hssf-write-testfile" />
</target>
<target name= "-test-main-hssf-write-testfile" unless= "main.hssf.test.failed" >
<echo file= "${main.hssf.testokfile}" append= "false" message= "testok" />
</target>
2016-04-17 20:16:28 -04:00
<!-- Section: test - scratchpad -->
2003-04-23 20:53:41 -04:00
<target name= "-test-scratchpad-check" >
<uptodate property= "scratchpad.test.notRequired" targetfile= "${scratchpad.testokfile}" >
<srcfiles dir= "${scratchpad.src}" />
<srcfiles dir= "${scratchpad.src.test}" />
</uptodate>
</target>
2014-02-11 18:16:54 -05:00
<target name= "test-scratchpad" depends= "compile-main,compile-scratchpad,-test-scratchpad-check,jacocotask,test-scratchpad-download-resources"
2016-04-17 21:23:26 -04:00
unless="scratchpad.test.notRequired" xmlns:jacoco="antlib:org.jacoco.ant"
description="test non-OOXML scratchpad classes">
2013-08-04 12:38:01 -04:00
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-scratchpad.exec" >
<junit printsummary= "yes" fork= "yes" forkmode= "once" haltonfailure= "${halt.on.test.failure}"
failureproperty="scratchpad.test.failed">
<classpath refid= "test.scratchpad.classpath" />
2017-06-09 08:49:01 -04:00
<classpath refid= "test.jar.classpath" />
2013-08-04 12:38:01 -04:00
<syspropertyset refid= "junit.properties" />
<jvmarg value= "-ea" />
2016-04-17 18:01:48 -04:00
<!-- jvmarg value=" - Duser.timezone=UTC"/ -->
2016-12-30 13:37:24 -05:00
<jvmarg value= "${file.leak.detector}" />
2015-08-07 19:33:30 -04:00
<!--
YK: ensure that JUnit has enough memory to run tests.
Without the line below tests fail on Mac OS X with jdk-1.6.26
and on Windows with jdk-1.5.22
2013-08-04 12:38:01 -04:00
-->
2016-12-30 12:00:13 -05:00
<jvmarg value= "-Xmx512m" />
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2013-08-04 12:38:01 -04:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${scratchpad.reports.test}" >
<fileset dir= "${scratchpad.src.test}" >
<include name= "**/${testpattern}.java" />
<exclude name= "**/AllTests.java" />
2016-11-07 16:32:22 -05:00
<exclude name= "**/${testexcludepattern}.java" />
2016-11-29 17:41:26 -05:00
<patternset refid= "exclude-scratchpad-test" if:true= "${scratchpad.ignore}" />
2013-08-04 12:38:01 -04:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
2003-04-23 20:53:41 -04:00
<delete file= "${scratchpad.testokfile}" />
<antcall target= "-test-scratchpad-write-testfile" />
</target>
<target name= "-test-scratchpad-write-testfile" unless= "scratchpad.test.failed" >
<echo file= "${scratchpad.testokfile}" append= "false" message= "testok" />
</target>
2016-04-17 20:16:28 -04:00
<!-- Section: test - ooxml -->
2007-12-27 06:52:12 -05:00
<target name= "-test-ooxml-check" >
<uptodate property= "ooxml.test.notRequired" targetfile= "${ooxml.testokfile}" >
<srcfiles dir= "${ooxml.src}" />
<srcfiles dir= "${ooxml.src.test}" />
</uptodate>
</target>
2015-08-07 19:33:30 -04:00
<macrodef name= "ooxml-test-runner" xmlns:jacoco= "antlib:org.jacoco.ant" >
2009-11-21 10:30:54 -05:00
<attribute name= "classpath" />
2013-08-04 12:38:01 -04:00
<attribute name= "type" />
2009-11-21 10:30:54 -05:00
<sequential >
2013-08-04 12:38:01 -04:00
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-@{type}.exec" >
<junit printsummary= "yes" fork= "yes" forkmode= "once" haltonfailure= "${halt.on.test.failure}"
failureproperty="ooxml.test.failed">
2017-06-09 08:49:01 -04:00
<classpath >
<path refid= "@{classpath}" />
<path refid= "test.jar.classpath" />
</classpath>
2013-08-04 12:38:01 -04:00
<syspropertyset refid= "junit.properties" />
2016-05-29 17:33:28 -04:00
<jvmarg value= "${maxpermsize}" />
2016-04-17 18:01:48 -04:00
<jvmarg value= "-Xmx768M" />
2014-02-09 16:19:20 -05:00
<jvmarg value= "-ea" />
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2016-12-30 12:00:13 -05:00
<!-- jvmarg value=" - Duser.timezone=UTC"/ -->
<jvmarg value= "${file.leak.detector}" />
2013-08-04 12:38:01 -04:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${ooxml.reports.test}" >
<fileset dir= "${ooxml.src.test}" >
<include name= "**/${testpattern}.java" />
<exclude name= "**/TestUnfixedBugs.java" />
<exclude name= "**/All*Tests.java" />
2016-11-07 16:32:22 -05:00
<exclude name= "**/TestSignatureInfo.java" />
<exclude name= "**/${testexcludepattern}.java" />
2016-11-29 17:41:26 -05:00
<patternset refid= "exclude-scratchpad-test" if:true= "${scratchpad.ignore}" />
2014-10-18 19:19:49 -04:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
2016-11-29 17:41:26 -05:00
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-@{type}-xmlsec.exec" >
2014-10-18 19:19:49 -04:00
<junit printsummary= "yes" fork= "yes" forkmode= "once" haltonfailure= "${halt.on.test.failure}"
failureproperty="ooxml.xmlsec.test.failed">
<classpath >
2015-08-07 19:33:30 -04:00
<path refid= "@{classpath}" />
2017-06-09 08:49:01 -04:00
<path refid= "test.jar.classpath" />
2015-08-07 19:33:30 -04:00
<path refid= "ooxml.xmlsec.classpath" />
2014-10-18 19:19:49 -04:00
</classpath>
<syspropertyset refid= "junit.properties" />
2016-04-17 18:01:48 -04:00
<jvmarg value= "-Xmx768M" />
2014-10-18 19:19:49 -04:00
<jvmarg value= "-ea" />
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2014-10-18 19:19:49 -04:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${ooxml.reports.test}" >
<fileset dir= "${ooxml.src.test}" >
2015-08-07 19:33:30 -04:00
<include name= "**/TestSignatureInfo.java" />
2013-08-04 12:38:01 -04:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
2009-11-21 10:30:54 -05:00
</sequential>
2015-08-07 19:33:30 -04:00
</macrodef>
2009-11-21 10:30:54 -05:00
2016-04-17 21:23:26 -04:00
<target name= "test-ooxml" depends= "compile-main,compile-ooxml,-test-ooxml-check,jacocotask" unless= "ooxml.test.notRequired"
description="test OOXML classes">
2013-08-04 12:38:01 -04:00
<ooxml-test-runner classpath= "test.ooxml.classpath" type= "ooxml" />
2007-12-27 06:52:12 -05:00
<delete file= "${ooxml.testokfile}" />
<antcall target= "-test-ooxml-write-testfile" />
</target>
<target name= "-test-ooxml-write-testfile" unless= "ooxml.test.failed" >
<echo file= "${ooxml.testokfile}" append= "false" message= "testok" />
</target>
2016-04-17 20:16:28 -04:00
<!-- Section: test - ooxml - ss -->
<target name= "-test-ooxml-ss-check" >
<uptodate property= "ooxml.ss.test.notRequired" targetfile= "${ooxml.ss.testokfile}" >
<srcfiles dir= "${ooxml.src}" />
<srcfiles dir= "${ooxml.src.test}" />
</uptodate>
</target>
<macrodef name= "ooxml-ss-test-runner" xmlns:jacoco= "antlib:org.jacoco.ant" >
<attribute name= "classpath" />
<attribute name= "type" />
<sequential >
2016-12-31 04:43:13 -05:00
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-@{type}-ss.exec" >
2016-04-17 20:16:28 -04:00
<junit printsummary= "yes" fork= "yes" forkmode= "once" haltonfailure= "${halt.on.test.failure}"
failureproperty="ooxml.ss.test.failed">
<classpath refid= "@{classpath}" />
<syspropertyset refid= "junit.properties" />
2016-05-29 17:33:28 -04:00
<jvmarg value= "${maxpermsize}" />
2016-04-17 20:16:28 -04:00
<jvmarg value= "-Xmx768M" />
<jvmarg value= "-ea" />
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2016-12-30 12:00:13 -05:00
<!-- jvmarg value=" - Duser.timezone=UTC"/ -->
2016-04-17 20:16:28 -04:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${ooxml.reports.test}" >
<fileset dir= "${ooxml.src.test}" >
<include name= "**/org/apache/poi/ss/**/${testpattern}.java" />
<include name= "**/org/apache/poi/xssf/**/${testpattern}.java" />
<exclude name= "**/TestUnfixedBugs.java" />
<exclude name= "**/All*Tests.java" />
2016-11-07 16:32:22 -05:00
<exclude name= "**/${testexcludepattern}.java" />
2016-11-29 17:41:26 -05:00
<patternset refid= "exclude-scratchpad-test" if:true= "${scratchpad.ignore}" />
2016-04-17 20:16:28 -04:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
</sequential>
</macrodef>
<!-- XSSF and SXSSF subset of test - ooxml -->
2016-04-17 21:23:26 -04:00
<target name= "test-ooxml-ss" depends= "compile-main,compile-ooxml-ss,-test-ooxml-ss-check,jacocotask" unless= "ooxml.ss.test.notRequired"
description="test XSSF and SXSSF classes">
2016-04-17 20:16:28 -04:00
<ooxml-ss-test-runner classpath= "test.ooxml.classpath" type= "ooxml" />
<delete file= "${ooxml.ss.testokfile}" />
<antcall target= "-test-ooxml-ss-write-testfile" />
</target>
<target name= "-test-ooxml-ss-write-testfile" unless= "ooxml.ss.test.failed" >
<echo file= "${ooxml.ss.testokfile}" append= "false" message= "testok" />
</target>
<!-- Section: test - integration -->
2014-12-25 04:16:44 -05:00
<target name= "-test-integration-check" >
<uptodate property= "integration.test.notRequired" targetfile= "${integration.testokfile}" >
<srcfiles dir= "${integration.src.test}" />
</uptodate>
</target>
<target name= "test-integration" depends= "compile-integration,-test-integration-check,jacocotask"
unless="integration.test.notRequired" xmlns:jacoco="antlib:org.jacoco.ant">
2016-11-29 17:41:26 -05:00
<propertyreset name= "org.apache.poi.util.POILogger" value= "org.apache.poi.util.CommonsLogger" />
<delete dir= "build" includes= "test-integration.log*" />
2014-12-25 04:16:44 -05:00
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-integration.exec" >
2016-02-27 03:41:07 -05:00
<junit printsummary= "yes" fork= "yes" forkmode= "once" haltonfailure= "${halt.on.test.failure}"
2014-12-25 04:16:44 -05:00
failureproperty="integration.test.failed" showoutput="true">
<classpath refid= "test.integration.classpath" />
<syspropertyset refid= "junit.properties" />
<jvmarg value= "-ea" />
2015-08-07 19:33:30 -04:00
<jvmarg value= "-Xmx1512M" />
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2014-12-25 04:16:44 -05:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${integration.reports.test}" >
<fileset dir= "${integration.src.test}" >
<include name= "**/${testpattern}.java" />
2016-11-07 16:32:22 -05:00
<exclude name= "**/${testexcludepattern}.java" />
2016-11-29 17:41:26 -05:00
<patternset refid= "exclude-scratchpad-test" if:true= "${scratchpad.ignore}" />
2014-12-25 04:16:44 -05:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
<delete file= "${integration.testokfile}" />
<antcall target= "-test-integration-write-testfile" />
</target>
<target name= "-test-integration-write-testfile" unless= "integration.test.failed" >
<echo file= "${integration.testokfile}" append= "false" message= "testok" />
</target>
2015-08-07 19:33:30 -04:00
2016-04-17 20:16:28 -04:00
<!-- Section: test - ooxml - lite -->
2016-07-31 13:19:05 -04:00
<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" />
2013-12-24 18:13:21 -05:00
<property name= "ooxml.lite-merged.dir" location= "build/ooxml-lite-merged" />
<mkdir dir= "${ooxml.lite-merged.dir}" />
2015-08-07 19:33:30 -04:00
<jar destfile= "${ooxml.lite-merged.dir}/ooxml-lite-merged.jar" >
<zipfileset includes= "**/*" src= "${ooxml.xsds.jar}" />
<zipfileset includes= "**/*" src= "${ooxml.security.jar}" />
2013-12-24 18:13:21 -05:00
</jar>
2015-08-07 19:33:30 -04:00
2014-11-07 17:33:54 -05:00
<java classname= "org.apache.poi.util.OOXMLLite" fork= "yes"
2015-08-07 19:33:30 -04:00
failonerror="true">
<classpath >
<pathelement path= "${ooxml.lite-merged.dir}/ooxml-lite-merged.jar" />
</classpath>
2009-11-21 10:30:54 -05:00
<classpath refid= "test.ooxml.classpath" />
2015-08-07 19:33:30 -04:00
<classpath refid= "ooxml.xmlsec.classpath" />
2009-11-21 10:30:54 -05:00
<syspropertyset refid= "junit.properties" />
2016-05-29 17:33:28 -04:00
<jvmarg value= "${maxpermsize}" />
2015-08-23 14:10:01 -04:00
<jvmarg value= "-Xmx512m" />
2016-11-29 17:41:26 -05:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${file.leak.detector}" />
2015-08-07 19:33:30 -04:00
<arg value= "-ooxml" />
2013-12-24 18:13:21 -05:00
<arg value= "${ooxml.lite-merged.dir}/ooxml-lite-merged.jar" />
2012-10-26 07:50:20 -04:00
<arg value= "-test" />
<arg value= "${ooxml.output.test.dir}" />
<arg value= "-dest" />
<arg value= "${ooxml.lite.output.dir}" />
2009-11-21 10:30:54 -05:00
</java>
2016-07-31 13:19:05 -04:00
<echo file= "${ooxml.lite.testokfile}" append= "false" message= "testok" />
2008-03-11 08:52:46 -04:00
</target>
2015-01-03 04:35:34 -05:00
<target name= "test-ooxml-lite" depends= "jacocotask,compile-ooxml-xsds,compile-ooxml-lite" >
2009-11-21 10:30:54 -05:00
<delete file= "${ooxml.testokfile}" />
2009-11-23 03:43:04 -05:00
<echo message= "Running ooxml tests against 'poi-ooxml-schemas'" />
2013-08-04 12:38:01 -04:00
<ooxml-test-runner classpath= "ooxml-lite.classpath" type= "ooxml-lite" />
2009-11-21 10:30:54 -05:00
</target>
2015-08-07 19:33:30 -04:00
2016-04-17 20:16:28 -04:00
<!-- Section: test - excelant -->
2011-02-18 15:04:50 -05:00
<target name= "-test-excelant-check" >
<uptodate property= "excelant.test.notRequired" targetfile= "${excelant.testokfile}" >
<srcfiles dir= "${excelant.src}" />
<srcfiles dir= "${excelant.src.test}" />
</uptodate>
</target>
<target name= "-test-excelant-write-testfile" unless= "excelant.test.failed" >
<echo file= "${excelant.testokfile}" append= "false" message= "testok" />
</target>
2013-08-04 12:38:01 -04:00
<target name= "test-excelant" depends= "compile-excelant,-test-excelant-check,jacocotask"
unless="excelant.test.notRequired" xmlns:jacoco="antlib:org.jacoco.ant">
<jacoco:coverage enabled= "${coverage.enabled}" excludes= "${coverage.excludes}" destfile= "build/jacoco-excelant.exec" >
<junit printsummary= "yes" fork= "yes" forkmode= "once" haltonfailure= "${halt.on.test.failure}"
failureproperty="excelant.test.failed">
<classpath refid= "test.excelant.classpath" />
<syspropertyset refid= "junit.properties" />
<jvmarg value= "-ea" />
2016-07-31 17:23:25 -04:00
<jvmarg value= "${java9addmods}" />
<jvmarg value= "${java9addmodsvalue}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${java9addopens1}" />
<jvmarg value= "${java9addopens2}" />
<jvmarg value= "${java9addopens3}" />
<jvmarg value= "${java9addopens4}" />
2017-01-26 14:59:10 -05:00
<jvmarg value= "${java9addopens5}" />
2016-12-30 12:00:13 -05:00
<jvmarg value= "${file.leak.detector}" />
2013-08-04 12:38:01 -04:00
<formatter type= "plain" />
<formatter type= "xml" />
<batchtest todir= "${excelant.reports.test}" >
<fileset dir= "${excelant.src.test}" >
<include name= "**/${testpattern}.java" />
2016-11-07 16:32:22 -05:00
<exclude name= "**/${testexcludepattern}.java" />
2016-11-29 17:41:26 -05:00
<patternset refid= "exclude-scratchpad-test" if:true= "${scratchpad.ignore}" />
2013-08-04 12:38:01 -04:00
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
2011-02-18 15:04:50 -05:00
<delete file= "${excelant.testokfile}" />
<antcall target= "-test-excelant-write-testfile" />
</target>
2016-04-17 20:16:28 -04:00
<!-- GENERATE DOCUMENTATION -->
2011-02-18 15:04:50 -05:00
2016-04-17 20:16:28 -04:00
<!-- Section: docs -->
2003-04-23 20:53:41 -04:00
<target name= "-check-docs" >
2015-10-06 09:36:30 -04:00
<echo message= "Checking if documentation recreation is necessary, i.e. if any file at ${main.documentation} is newer than ${build.site}/index.html" />
2003-04-23 20:53:41 -04:00
<uptodate property= "main.docs.notRequired" targetfile= "${build.site}/index.html" >
2011-03-04 06:59:23 -05:00
<srcfiles dir= "${main.documentation}" />
2003-04-23 20:53:41 -04:00
</uptodate>
</target>
<target name= "-check-forrest-installed" unless= "env.FORREST_HOME" >
2003-08-02 15:48:57 -04:00
<echo > Please install Apache Forrest (see
2016-04-12 05:52:42 -04:00
< https://forrest.apache.org/index.html> ) and set the
2009-11-21 10:30:54 -05:00
FORREST_HOME environment variable!
</echo>
2003-08-02 15:48:57 -04:00
<fail message= "Apache Forrest is not installed." />
2003-04-23 20:53:41 -04:00
</target>
2005-01-03 10:38:43 -05:00
<target name= "docs" depends= "init, -check-forrest-installed, -check-docs"
2009-11-21 10:30:54 -05:00
unless="main.docs.notRequired" description="Builds the POI website">
2003-04-23 20:53:41 -04:00
2009-11-21 10:30:54 -05:00
<mkdir dir= "${build.site.src}/${main.documentation}" />
<copy todir= "${build.site.src}/${main.documentation}" >
<fileset dir= "${main.documentation}" />
2003-04-23 20:53:41 -04:00
</copy>
2009-11-21 10:30:54 -05:00
<copy file= "forrest.properties" tofile= "${build.site.src}/forrest.properties" />
2003-04-23 20:53:41 -04:00
2004-12-31 08:26:31 -05:00
<move
2009-11-21 10:30:54 -05:00
file="${build.site.src}/src/documentation/content/xdocs/status.xml"
tofile="${build.site.src}/status.xml"/>
2003-04-23 20:53:41 -04:00
2009-11-21 10:30:54 -05:00
<ant antfile= "${env.FORREST_HOME}/forrest.antproxy.xml" target= "site" >
2003-08-23 15:07:41 -04:00
<property name= "project.home" location= "${build.site.src}" />
2003-04-23 20:53:41 -04:00
</ant>
<echo > Broken links:</echo>
<echo file= "${build.site}/../tmp/brokenlinks.txt" />
2016-04-17 18:01:48 -04:00
<fixcrlf srcdir= "${build.site}" includes= "**/*.html,**/*.css" eol= "unix" eof= "remove" />
2016-03-11 19:34:26 -05:00
2016-04-17 18:01:48 -04:00
<touch >
2003-04-23 20:53:41 -04:00
<fileset dir= "${build.site}" />
</touch>
</target>
2009-11-21 10:30:54 -05:00
<!-- Generates the API documentation. -->
<target name= "javadocs"
description="Generates the API documentation">
<javadoc verbose= "false" author= "true" destdir= "${apidocs.report.dir}"
2015-08-07 19:33:30 -04:00
windowtitle="POI API Documentation" use="true" version="true"
maxmemory="384M" additionalparam="-notimestamp" locale="en_US"
2014-11-10 07:29:08 -05:00
classpathref="javadoc.classpath">
2009-11-21 10:30:54 -05:00
<packageset dir= "${main.src}" defaultexcludes= "yes" >
<include name= "org/apache/poi/**" />
</packageset>
<packageset dir= "${scratchpad.src}" defaultexcludes= "yes" >
<include name= "org/apache/poi/**" />
<exclude name= "org/apache/poi/hdf/**" />
</packageset>
<packageset dir= "${ooxml.src}" defaultexcludes= "yes" >
<include name= "org/apache/poi/**" />
</packageset>
2016-12-31 11:53:20 -05:00
<arg value= "${javadoc9addmods}" />
2009-11-21 10:30:54 -05:00
<doctitle > <![CDATA[<h1>POI API Documentation</h1>]]> </doctitle>
<bottom >
<![CDATA[<i> Copyright ${tstamp.year} The Apache Software Foundation or
2005-01-25 15:08:18 -05:00
its licensors, as applicable.</i> ]]>
2009-11-21 10:30:54 -05:00
</bottom>
<group >
<title > DDF - Dreadful Drawing Format</title>
<package name= "org.apache.poi.ddf*" />
</group>
<group >
<title > HPSF - Horrible Property Set Format</title>
<package name= "org.apache.poi.hpsf*" />
</group>
2016-04-17 20:28:13 -04:00
<group >
<title > SS - Common Spreadsheet Format</title>
<package name= "org.apache.poi.ss*" />
</group>
2009-11-21 10:30:54 -05:00
<group >
<title > HSSF - Horrible Spreadsheet Format</title>
<package name= "org.apache.poi.hssf*" />
</group>
2016-04-17 20:28:13 -04:00
<group >
<title > XSSF - Open Office XML Spreadsheet Format</title>
<package name= "org.apache.poi.xssf*" />
</group>
<group >
<title > SL - Common Slideshow Format</title>
<package name= "org.apache.poi.sl*" />
</group>
<group >
<title > HSLF - Horrible Slideshow Format</title>
<package name= "org.apache.poi.hslf*" />
</group>
<group >
<title > XSLF - Open Office XML Slideshow Format</title>
<package name= "org.apache.poi.xslf*" />
</group>
2009-11-21 10:30:54 -05:00
<group >
<title > HWPF - Horrible Word Processor Format</title>
<package name= "org.apache.poi.hwpf*" />
</group>
2016-04-17 20:28:13 -04:00
<group >
<title > XWPF - Open Office XML Word Processor Format</title>
<package name= "org.apache.poi.xwpf*" />
</group>
<group >
<title > HDGF - Horrible Diagram Format</title>
<package name= "org.apache.poi.hdgf*" />
</group>
<group >
<title > XDGF - Open Office XML Diagram Format</title>
<package name= "org.apache.poi.xdgf*" />
</group>
2009-11-21 10:30:54 -05:00
<group >
<title > POIFS - POI File System</title>
<package name= "org.apache.poi.poifs*" />
</group>
<group >
<title > Utilities</title>
<package name= "org.apache.poi.util*" />
</group>
<group >
<title > Examples</title>
<package name= "org.apache.poi.hpsf.examples*" />
<package name= "org.apache.poi.hssf.usermodel.examples*" />
</group>
</javadoc>
</target>
2003-09-04 15:52:11 -04:00
2005-01-01 18:39:42 -05:00
<!-- Generates documentation and reports -->
2009-11-21 10:30:54 -05:00
<target name= "site" depends= "docs,javadocs"
description="Generates POI's website's contents"/>
<target name= "maven-poms"
description="Builds the POM files for a maven distribution, and copies these and the jars to the appropriate locations">
<!-- Build the org.apache.poi poms -->
2016-03-06 20:58:26 -05:00
<copy todir= "${dist.dir}/maven" >
<fileset dir= "maven" includes= "poi*.pom" />
<chainedmapper >
<firstmatchmapper >
<regexpmapper from= "^(.*).pom$$" to= "\1/\1.pom" />
<globmapper from= "poi.pom" to= "poi/poi.pom" />
</firstmatchmapper>
<globmapper from= "*.pom" to= "*-${version.id}.pom" />
</chainedmapper>
2009-11-21 10:30:54 -05:00
<filterchain >
<replacetokens >
<token key= "VERSION" value= "${version.id}" />
</replacetokens>
</filterchain>
</copy>
2009-11-23 03:43:04 -05:00
<echo > Maven POMs are located in ${dist.dir}</echo>
2016-03-06 20:58:26 -05:00
<echo > Use ant dist-nexus to deploy the artifacts in the remote repository</echo>
2009-11-21 10:30:54 -05:00
</target>
2014-11-14 19:00:30 -05:00
<target name= "-manifest" >
2009-11-21 10:30:54 -05:00
<manifest file= "build/poi-manifest.mf" >
<attribute name= "Built-By" value= "${user.name}" />
<attribute name= "Specification-Title" value= "Apache POI" />
<attribute name= "Specification-Version" value= "${version.id}" />
<attribute name= "Specification-Vendor" value= "The Apache Software Foundation" />
<attribute name= "Implementation-Title" value= "Apache POI" />
<attribute name= "Implementation-Version" value= "${version.id}" />
<attribute name= "Implementation-Vendor-Id" value= "org.apache.poi" />
<attribute name= "Implementation-Vendor" value= "The Apache Software Foundation" />
</manifest>
2014-11-14 19:00:30 -05:00
</target>
2016-03-06 20:58:26 -05:00
<macrodef name= "maven-jar" >
<attribute name= "dir" />
<sequential >
<local name= "destfile" />
<pathconvert property= "destfile" targetos= "unix" >
<path > <pathelement path= "@{dir}" /> </path>
<mapper >
<chainedmapper >
<filtermapper >
<replaceregex pattern= "ooxml-lite" replace= "ooxml-schemas" flags= "g" />
<replaceregex pattern= "(.java|.src)$$" replace= "-sources" />
<replaceregex pattern= ".*(?:build|src).?(.*)?" replace= "\1" />
<replaceregex pattern= "(.*)(-classes|-sources)" replace= "poi-\1/poi-\1-${version.id}\2" />
<replaceregex pattern= "^(classes|sources)$$" replace= "poi/poi-${version.id}-\1" />
<replaceregex pattern= "-classes" replace= "" />
</filtermapper>
</chainedmapper>
</mapper>
</pathconvert>
<jar destfile= "build/dist/maven/${destfile}.jar"
manifest="build/poi-manifest.mf">
<fileset dir= "@{dir}" />
<metainf dir= "legal/" />
</jar>
</sequential>
</macrodef>
2014-11-14 19:00:30 -05:00
<target name= "jar" depends= "compile-all, compile-version, -manifest" description= "Creates jar files for distribution" >
2016-03-06 20:58:26 -05:00
<maven-jar dir= "${main.output.dir}" />
<maven-jar dir= "${scratchpad.output.dir}" />
<maven-jar dir= "${ooxml.output.dir}" />
<maven-jar dir= "${examples.output.dir}" />
<maven-jar dir= "${excelant.output.dir}" />
<maven-jar dir= "${ooxml.lite.output.dir}" />
2009-05-17 14:38:33 -04:00
</target>
2009-11-21 10:30:54 -05:00
2015-05-31 16:11:20 -04:00
<target name= "jar-src" depends= "compile-all, compile-version, -manifest" description= "Sources for Maven" >
2016-03-06 20:58:26 -05:00
<maven-jar dir= "${main.src}" />
<maven-jar dir= "${scratchpad.src}" />
<maven-jar dir= "${ooxml.src}" />
<maven-jar dir= "${examples.src}" />
<maven-jar dir= "${excelant.src}" />
2009-11-21 10:30:54 -05:00
</target>
2014-11-14 19:00:30 -05:00
<target name= "-do-jar-check-javadocs-package-list" >
<condition property= "javadocs.package-list.present" >
2015-08-07 19:33:30 -04:00
<available file= "build/tmp/site/build/site/apidocs/package-list" />
2014-11-14 19:00:30 -05:00
</condition>
</target>
<target name= "-do-jar-create-javadocs-package-list"
2015-08-07 19:33:30 -04:00
depends="-do-jar-check-javadocs-package-list"
unless="javadocs.package-list.present">
<antcall target= "javadocs" />
2014-11-14 19:00:30 -05:00
</target>
2015-08-07 19:33:30 -04:00
<target name= "jar-javadocs" description= "JavaDocs for Maven" depends= "compile,-manifest,-do-jar-create-javadocs-package-list" >
2014-11-10 07:29:08 -05:00
<property name= "build.maven.javadocs" location= "build/tmp/maven-javadocs" />
<!-- Build and package the main javadocs -->
2016-04-17 18:01:48 -04:00
<maven-javadocs src= "${main.src}" dest= "${jar.name}" />
2014-11-10 07:29:08 -05:00
<!-- Build and package the scratchpad javadocs -->
2016-04-17 18:01:48 -04:00
<maven-javadocs src= "${scratchpad.src}" dest= "${jar.name}-scratchpad" />
2014-11-10 07:29:08 -05:00
<!-- Build and package the ooxml javadocs -->
2016-04-17 18:01:48 -04:00
<maven-javadocs src= "${ooxml.src}" dest= "${jar.name}-ooxml" />
2014-11-10 06:20:48 -05:00
</target>
2016-03-06 20:58:26 -05:00
<macrodef name= "maven-javadocs" >
<attribute name= "src" />
<attribute name= "dest" />
<sequential >
<echo message= "Building @{dest} javadocs from @{src}" />
<local name= "build.maven.javadocs" />
<property name= "build.maven.javadocs" location= "build/tmp/maven-javadocs" />
<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" locale="en_US"
classpathref="javadoc.classpath">
<packageset dir= "@{src}" defaultexcludes= "yes" >
<include name= "org/apache/poi/**" />
</packageset>
<link offline= "true" href= "https://poi.apache.org/apidocs" packagelistLoc= "build/tmp/site/build/site/apidocs" />
</javadoc>
<jar destfile= "${dist.dir}/maven/@{dest}/@{dest}-${version.id}-javadoc.jar"
manifest="build/poi-manifest.mf">
<fileset dir= "${build.maven.javadocs}" />
<metainf dir= "legal/" />
</jar>
</sequential>
</macrodef>
2016-04-03 18:19:44 -04:00
2014-07-30 03:32:21 -04:00
<target name= "release-notes" depends= "init" >
2016-04-17 18:01:48 -04:00
<copy file= "src/documentation/RELEASE-NOTES.txt" todir= "build/dist/" overwrite= "true" >
2014-07-30 03:32:21 -04:00
<filterset >
<filter token= "VERSION" value= "${version.id}" />
<filter token= "DSTAMP" value= "${DSTAMP}" />
2016-04-03 18:19:44 -04:00
<filter token= "RELEASE_TAG" value= "${RELEASE_TAG}" />
2014-07-30 03:32:21 -04:00
</filterset>
</copy>
</target>
2014-11-10 06:20:48 -05:00
<target name= "assemble" depends= "jar,jar-src,jar-javadocs" >
2016-04-07 19:11:22 -04:00
<property name= "zipdir" value= "${jar.name}-${version.id}" />
<mappedresources id= "legal-files" cache= "true" >
<fileset dir= "legal" />
<globmapper from= "*" to= "${zipdir}/*" />
</mappedresources>
<!-- jars to include in binary assemblies -->
<union id= "bin-files" cache= "true" >
<mappedresources refid= "legal-files" />
<mappedresources cache= "true" >
<fileset dir= "${main.lib}" >
<include name= "commons-codec-*.jar" />
<include name= "commons-logging-*.jar" />
2016-07-31 17:23:34 -04:00
<include name= "commons-collections4-*.jar" />
2016-04-07 19:11:22 -04:00
<include name= "junit-*.jar" />
<include name= "log4j-*.jar" />
</fileset>
<globmapper from= "*" to= "${zipdir}/lib/*" />
</mappedresources>
<mappedresources cache= "true" >
2016-07-31 17:23:34 -04:00
<fileset dir= "${ooxml.lib}" includes= "xmlbeans-2.6.0.jar.orig,curvesapi-*.jar" />
2016-04-07 19:11:22 -04:00
<regexpmapper from= "^(.*\.jar)(\.orig)?$$" to= "${zipdir}/ooxml-lib/\1" />
</mappedresources>
<mappedresources cache= "true" >
<fileset dir= "${dist.dir}/maven" includes= "**/*.jar" excludes= "**/*-javadoc.jar,**/*-sources.jar" />
<chainedmapper >
<flattenmapper />
<globmapper from= "*" to= "${zipdir}/*" />
</chainedmapper>
</mappedresources>
<mappedresources cache= "true" >
<fileset dir= "${build.site}" />
<globmapper from= "*" to= "${zipdir}/docs/*" />
</mappedresources>
</union>
2009-11-23 03:43:04 -05:00
2015-08-07 19:33:30 -04:00
<!-- patterns to exclude from source assemblies -->
2016-04-07 19:11:22 -04:00
<union id= "src-files" cache= "true" >
<mappedresources refid= "legal-files" />
<mappedresources cache= "true" >
<fileset dir= "." excludes= "build/**,
2014-11-08 08:40:53 -05:00
dist*/**,
2009-11-23 03:43:04 -05:00
lib/**,
2016-11-14 14:50:39 -05:00
bin/**,
out/**,
sonar/**/target/**,
sonar/*/src/**,
2014-11-08 08:40:53 -05:00
compile-lib/**,
2009-11-23 03:43:04 -05:00
ooxml-lib/**,
scripts/**,
TEST*,
*.ipr,
*.iml,
*.iws,
*.lnk,
*.rdf,
*.swp,
2016-11-14 14:50:39 -05:00
*.launch,
*.log,
.gradle/**,
.idea/**,
2010-08-05 07:20:25 -04:00
.settings/**,
2009-11-23 03:43:04 -05:00
.classpath,
2010-09-21 07:55:17 -04:00
.settings/**,
2009-11-23 03:43:04 -05:00
.project"/>
2016-04-07 19:11:22 -04:00
<globmapper from= "*" to= "${zipdir}/*" />
</mappedresources>
</union>
2009-11-21 10:30:54 -05:00
<zip destfile= "${dist.dir}/${jar.name}-bin-${version.id}-${DSTAMP}.zip" >
2016-04-07 19:11:22 -04:00
<union refid= "bin-files" />
2009-11-21 10:30:54 -05:00
</zip>
2016-04-07 19:11:22 -04:00
<tar destfile= "${dist.dir}/${jar.name}-bin-${version.id}-${DSTAMP}.tar.gz" longfile= "gnu" compression= "gzip" >
<union refid= "bin-files" />
</tar>
2009-11-21 10:30:54 -05:00
<zip destfile= "${dist.dir}/${jar.name}-src-${version.id}-${DSTAMP}.zip" >
2016-04-07 19:11:22 -04:00
<union refid= "src-files" />
2009-11-21 10:30:54 -05:00
</zip>
2015-08-07 19:33:30 -04:00
2016-04-07 19:11:22 -04:00
<tar destfile= "${dist.dir}/${jar.name}-src-${version.id}-${DSTAMP}.tar.gz" longfile= "gnu" compression= "gzip" >
<union refid= "src-files" />
2009-11-21 10:30:54 -05:00
</tar>
2015-08-07 19:33:30 -04:00
2009-11-21 10:30:54 -05:00
<echo > Creating Maven POMs</echo>
<antcall target= "maven-poms" />
2009-11-23 03:43:04 -05:00
<echo > Distribution located in ${dist.dir}</echo>
2016-04-07 19:11:22 -04:00
<echo > Use "ant dist-checksum" to create md5/sha1 checksums and GPG signatures</echo>
2007-12-30 13:11:55 -05:00
</target>
2003-04-23 20:53:41 -04:00
2015-04-24 21:53:30 -04:00
<target name= "osgi" depends= "mvn-install" >
<echo message= "Building OSGi bundle via Maven" />
2015-04-24 22:18:06 -04:00
<mvn:mvn pom= "osgi/pom.xml" >
2015-04-24 21:53:30 -04:00
<arg value= "-Dpoi.version=${version.id}" />
<arg value= "install" />
</mvn:mvn>
</target>
2015-08-27 09:07:36 -04:00
<target name= "dist" depends= "clean, compile-all, test-all, rat-check, forbidden-apis-check, site, jar, release-notes, assemble"
2009-11-21 10:30:54 -05:00
description="Creates the entire distribution into build/dist, from scratch">
</target>
2016-06-13 03:15:47 -04:00
<!-- continuous integration targets -->
<target name= "gump" depends= "compile-all, test-all, jar"
description="Target for running with Apache Gump continuous integration. Builds and tests POI and generates jar artifacts." />
<target name= "jenkins" depends= "compile-all, test-all, test-integration, jar, javadocs, assemble, findbugs, release-notes, rat-check, forbidden-apis-check"
description="Target run by Jenkins on a continuous basis. Builds and tests POI, generates artifacts and documentation, and searches for problems."/>
2014-08-10 14:25:10 -04:00
2010-01-24 08:05:48 -05:00
<available property= "maven.ant.tasks.present" classname= "org.apache.maven.artifact.ant.Pom" />
<target name= "maven.ant.tasks-check" >
<fail unless= "maven.ant.tasks.present" >
Maven ant tasks not found.
2015-08-07 19:33:30 -04:00
Please make sure the maven-ant-tasks jar is in ANT_HOME/lib, or made
2010-01-24 08:05:48 -05:00
available to Ant using other mechanisms like -lib or CLASSPATH.
2015-08-07 19:33:30 -04:00
2016-04-12 05:52:42 -04:00
You can download the Maven Ant Tasks from https://maven.apache.org/ant-tasks/download.html
2010-01-24 08:05:48 -05:00
</fail>
</target>
<macrodef name= "m2-install" >
<attribute name= "artifactId" />
2015-08-07 19:33:30 -04:00
2010-01-24 08:05:48 -05:00
<sequential >
2016-05-31 05:13:46 -04:00
<mvn:install file= "${dist.dir}/maven/@{artifactId}/@{artifactId}-${version.id}.jar" >
<pom file= "${dist.dir}/maven/@{artifactId}/@{artifactId}-${version.id}.pom" />
2010-01-24 08:05:48 -05:00
</mvn:install>
</sequential>
2015-08-07 19:33:30 -04:00
</macrodef>
2010-01-24 08:05:48 -05:00
2015-10-05 08:23:07 -04:00
<target name= "mvn-install" depends= "maven.ant.tasks-check,jar,maven-poms" description= "Install POI artifacts into the local repository. Equivalent of 'mvn install'" >
2010-01-24 08:05:48 -05:00
<m2-install artifactId= "poi" />
<m2-install artifactId= "poi-scratchpad" />
<m2-install artifactId= "poi-ooxml" />
<m2-install artifactId= "poi-examples" />
<m2-install artifactId= "poi-ooxml-schemas" />
2011-02-18 15:04:50 -05:00
<m2-install artifactId= "poi-excelant" />
2010-01-24 08:05:48 -05:00
</target>
2015-08-07 19:33:30 -04:00
2015-10-05 08:23:07 -04:00
<target name= "rat-check" depends= "init" description= "Runs the Apache Creadur Rat check against the source code, to spot any files which are missing the correct license headers" >
2014-01-20 14:25:22 -05:00
<mkdir dir= "${rat.reportdir}" />
2010-05-24 10:16:15 -04:00
<typedef resource= "org/apache/rat/anttasks/antlib.xml"
2014-01-20 14:25:22 -05:00
uri="antlib:org.apache.rat.anttasks"
2014-10-10 02:48:29 -04:00
classpath="${rat.jar}" />
2014-01-20 14:25:22 -05:00
<rat:report xmlns:rat= "antlib:org.apache.rat.anttasks" reportFile= "${rat.report}" >
2010-05-24 10:16:15 -04:00
<fileset dir= "src/" >
2014-07-30 08:53:19 -04:00
<exclude name= "documentation/*.txt" />
2010-05-24 10:16:15 -04:00
<exclude name= "documentation/content/xdocs/dtd/" />
<exclude name= "documentation/content/xdocs/entity/" />
<exclude name= "scratchpad/testcases/dummy.txt" />
2011-03-04 06:00:13 -05:00
<exclude name= "contrib/testcases/dummy.txt" />
2010-05-24 10:16:15 -04:00
<exclude name= "examples/lib/dummy.txt" />
2014-10-28 20:45:47 -04:00
<exclude name= "resources/ooxml/org/apache/poi/xslf/usermodel/notesMaster.xml" />
2015-08-23 14:09:56 -04:00
<exclude name= "resources/ooxml/org/apache/poi/xslf/usermodel/empty.pptx" />
2015-07-24 17:47:55 -04:00
<exclude name= "resources/main/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml" />
2017-05-15 02:30:06 -04:00
<exclude name= "resources/ooxml/org/apache/poi/xssf/usermodel/presetTableStyles.xml" />
2015-10-07 09:13:39 -04:00
<exclude name= "ooxml/resources/org/apache/poi/xdgf/visio.xsd" />
2012-11-25 07:01:54 -05:00
<exclude name= "examples/src/org/apache/poi/xslf/usermodel/pie-chart-data.txt" />
2015-09-07 16:19:50 -04:00
<exclude name= "**/*.iml" />
2016-11-27 16:14:55 -05:00
<exclude name= "documentation/resources/images/pb-poi.cdr" />
2016-11-29 17:41:26 -05:00
<exclude name= "scratchpad/models/poi-hdf.zargo" />
2010-05-24 10:16:15 -04:00
</fileset>
</rat:report>
2015-08-07 19:33:30 -04:00
2016-04-17 18:01:48 -04:00
<!-- remove clutter to compact build output -->
2015-12-20 12:01:46 -05:00
<!-- replaceregexp doesn't work within loadfile ... -->
<replaceregexp file= "${rat.report}" match= "\s+Printing headers for files without AL header.++" replace= "" flags= "s" />
2016-03-06 20:58:26 -05:00
2015-12-20 12:01:46 -05:00
<loadfile property= "rat.reportcontent" srcFile= "${rat.report}" >
<filterchain >
2016-04-17 18:01:48 -04:00
<linecontainsregexp negate= "true" >
<regexp pattern= "^\s+(AL|B|N)\s+" />
</linecontainsregexp>
2015-12-20 12:01:46 -05:00
</filterchain>
</loadfile>
2015-08-07 19:33:30 -04:00
<echo > ${rat.reportcontent}</echo>
2014-01-20 14:25:22 -05:00
<!-- fail the build if at least one note is in the report -->
2014-01-20 14:55:44 -05:00
<fail > <condition > <matches pattern= "[1-9][0-9]* Unknown Licens" string= "${rat.reportcontent}" /> </condition> </fail>
2010-05-24 10:16:15 -04:00
</target>
2015-08-07 19:33:30 -04:00
2015-08-27 09:07:36 -04:00
<!-- Runs the Forbiddens APIs checker against the source code, to -->
<!-- spot any cases where we've accidently used methods we shouldn't -->
<!-- See https://github.com/policeman - tools/forbidden - apis for details -->
<!-- of the checks that this can do -->
2016-04-10 21:33:21 -04:00
<target name= "forbidden-apis-check" depends= "init, compile" >
2016-03-06 20:58:26 -05:00
<taskdef name= "forbiddenapis"
classname="de.thetaphi.forbiddenapis.ant.AntTask"
2015-08-27 09:23:44 -04:00
classpath="${forbidden.jar}"/>
2015-12-02 16:47:52 -05:00
<!-- first check rules that apply to all the source code -->
2016-03-06 20:58:26 -05:00
<forbiddenapis
2015-11-08 06:57:58 -05:00
classpathref="forbiddenapis.classpath"
2015-11-08 05:01:48 -05:00
suppressAnnotation="org.apache.poi.util.SuppressForbidden"
2016-05-24 10:17:52 -04:00
targetVersion="${jdk.version.source}"
2015-11-08 05:01:48 -05:00
>
2016-05-24 10:17:52 -04:00
<bundledsignatures name= "jdk-unsafe" />
<bundledsignatures name= "jdk-deprecated" />
<bundledsignatures name= "jdk-internal" />
<bundledsignatures name= "jdk-non-portable" />
<bundledsignatures name= "jdk-reflection" />
2016-03-06 20:58:26 -05:00
<!--
2015-11-08 05:01:48 -05:00
<bundledsignatures name= "jdk-system-out" />
-->
<signaturesFileset file= "src/resources/devtools/forbidden-signatures.txt" />
<!-- sources -->
<fileset dir= "${main.output.dir}" />
<fileset dir= "${ooxml.output.dir}" />
<fileset dir= "${scratchpad.output.dir}" />
<fileset dir= "${excelant.output.dir}" />
<!--
<fileset dir= "${examples.output.dir}" />
-->
<!-- test - sources -->
<fileset dir= "${main.output.test.dir}" />
<fileset dir= "${ooxml.output.test.dir}" />
<!--
<fileset dir= "${scratchpad.output.test.dir}" />
<fileset dir= "${excelant.output.test.dir}" />
-->
2015-08-27 09:23:44 -04:00
</forbiddenapis>
2015-12-02 16:47:52 -05:00
<!-- then check some advanced rules which we only apply to the core code and not tests or examples -->
2016-03-06 20:58:26 -05:00
<forbiddenapis
2015-12-02 16:47:52 -05:00
classpathref="forbiddenapis.classpath"
suppressAnnotation="org.apache.poi.util.SuppressForbidden"
2016-05-24 10:17:52 -04:00
targetVersion="${jdk.version.source}"
2015-12-02 16:47:52 -05:00
>
<signaturesFileset file= "src/resources/devtools/forbidden-signatures-prod.txt" />
<!-- sources -->
<fileset dir= "${main.output.dir}" />
<fileset dir= "${ooxml.output.dir}" />
<fileset dir= "${scratchpad.output.dir}" />
<fileset dir= "${excelant.output.dir}" />
</forbiddenapis>
2015-08-27 09:07:36 -04:00
</target>
2016-07-31 13:19:05 -04:00
<target name= "findbugs" depends= "jar" >
2016-06-11 17:23:01 -04:00
<downloadfile src= "${findbugs.url}" dest= "${findbugs.jar}" />
2014-02-08 18:44:42 -05:00
2016-03-12 06:37:12 -05:00
<property name= "findbugs.home" value= "build/findbugs" />
2016-11-29 17:41:26 -05:00
<delete dir= "${findbugs.home}" />
2016-06-11 17:23:01 -04:00
<unzip src= "${findbugs.jar}" dest= "${findbugs.home}" >
2016-11-29 17:41:26 -05:00
<patternset includes= "findbugs*/lib/**,findbugs*/plugin/**" />
<cutdirsmapper dirs= "1" />
2015-08-07 19:33:30 -04:00
</unzip>
<taskdef name= "findbugs" classname= "edu.umd.cs.findbugs.anttask.FindBugsTask" >
<classpath >
2016-06-11 17:23:01 -04:00
<fileset dir= "${findbugs.home}/lib" includes= "*.jar" />
2015-08-07 19:33:30 -04:00
</classpath>
</taskdef>
2016-06-11 17:23:01 -04:00
2016-11-29 17:41:26 -05:00
<findbugs home= "${findbugs.home}"
output="xml:withMessages"
outputFile="build/findbugs.xml"
effort="max"
2016-07-31 17:23:34 -04:00
failOnError="true"
2016-06-11 17:23:01 -04:00
excludeFilter="src/resources/devtools/findbugs-filters.xml">
2016-03-09 16:36:26 -05:00
<fileset dir= "${dist.dir}/maven" >
<include name= "poi/poi-${version.id}.jar" />
<include name= "poi-scratchpad/poi-scratchpad-${version.id}.jar" />
<include name= "poi-ooxml/poi-ooxml-${version.id}.jar" />
2016-07-31 13:19:05 -04:00
<include name= "poi-excelant/poi-excelant-${version.id}.jar" />
2015-08-07 19:33:30 -04:00
</fileset>
2015-10-22 11:21:25 -04:00
<auxClasspath path= "${dsig.bouncycastle-pkix.jar}" />
<auxClasspath path= "${dsig.bouncycastle-prov.jar}" />
<auxClasspath path= "${dsig.sl4j-api.jar}" />
<auxClasspath path= "${dsig.xmlsec.jar}" />
2015-10-06 22:41:30 -04:00
<auxClasspath path= "${ooxml.xsds.jar}" />
2015-10-22 11:21:25 -04:00
<auxClasspath path= "${ooxml.security.jar}" />
2016-01-29 17:08:55 -05:00
<auxClasspath path= "${ooxml.curvesapi.jar}" />
2015-10-22 11:21:25 -04:00
<auxClasspath path= "${ooxml.xmlbeans26.jar}" />
2016-07-31 17:23:34 -04:00
<auxClasspath path= "${main.commons-collections4.jar}" />
2015-10-13 12:37:22 -04:00
<auxClasspath path= "${main.commons-codec.jar}" />
<auxClasspath path= "${main.commons-logging.jar}" />
2015-10-22 11:21:25 -04:00
<auxClasspath path= "${main.junit.jar}" />
2017-05-15 19:27:21 -04:00
<auxClasspath path= "${main.jmh.jar}" />
<auxClasspath path= "${main.jmhAnnotation.jar}" />
2016-07-31 17:23:34 -04:00
<auxClasspath path= "${main.ant.jar}" />
2015-08-07 19:33:30 -04:00
<sourcePath path= "src/java" />
<sourcePath path= "src/ooxml/java" />
<sourcePath path= "src/scratchpad/src" />
</findbugs>
2016-07-02 18:09:00 -04:00
2016-11-29 17:41:26 -05:00
<!-- instead of calling findbugs again, we simply transform the xml -->
<makeurl file= "${findbugs.home}/lib/findbugs.jar" property= "findbugs.jarurl" />
2016-06-11 17:23:01 -04:00
<!-- although there's a findbugs history task too, it doesn't make much sense to provide it, -->
<!-- as the build directory (i.e. the old findbugs.xml) is deleted regularly -->
2016-11-29 17:41:26 -05:00
<xslt basedir= "build" destdir= "build" includes= "findbugs.xml" force= "true" >
<style >
<!-- fancy - hist is a bit less bugged than fancy ... -->
<url url= "jar:${findbugs.jarurl}!/fancy-hist.xsl" />
</style>
</xslt>
2015-08-07 19:33:30 -04:00
</target>
<target name= "test-scratchpad-download-resources" >
<!-- disable font downloading until TestFontRendering works on all plattforms -->
<!-- ... eventually copy the files into the resource dirs ... -->
<!--
<mkdir dir= "build/scratchpad-test-resources" />
2014-02-11 18:16:54 -05:00
<antcall target= "downloadfile" >
2016-04-12 05:52:42 -04:00
<param name= "sourcefile" value= "https://sourceforge.net/projects/monafont/files/monafont/monafont-2.90/monafont-ttf-2.90.zip/download" />
2014-02-11 18:16:54 -05:00
<param name= "destfile" value= "build/scratchpad-test-resources/monafont-ttf-2.90.zip" />
</antcall>
2015-08-07 19:33:30 -04:00
<unzip src= "build/scratchpad-test-resources/monafont-ttf-2.90.zip"
dest="build/scratchpad-test-resources">
<patternset >
<include name= "mona.ttf" />
</patternset>
</unzip>
2014-02-11 18:16:54 -05:00
<antcall target= "downloadfile" >
<param name= "sourcefile" value= "https://googlefontdirectory.googlecode.com/hg-history/c5955de4df3e40f6ab705bbccbd1f5ad93998287/cabin/Cabin-Regular.ttf" />
<param name= "destfile" value= "build/scratchpad-test-resources/Cabin-Regular.ttf" />
</antcall>
2014-03-04 17:23:29 -05:00
-->
2015-08-07 19:33:30 -04:00
</target>
2016-03-06 20:58:26 -05:00
<target name= "dist-checksum" depends= "load-maven-server-settings" >
<fileset id= "dist-archives" dir= "${dist.dir}" includes= "**/*.jar,**/*.pom,**/*.zip,**/*.tar.gz" />
<checksum algorithm= "sha1" format= "MD5SUM" >
<fileset refid= "dist-archives" />
</checksum>
<checksum algorithm= "md5" format= "MD5SUM" >
<fileset refid= "dist-archives" />
</checksum>
<fixcrlf srcDir= "${dist.dir}" includes= "**/*.md5,**/*.sha1" eol= "unix" />
<downloadfile src= "${dist.bouncycastle-prov.url}" dest= "${dist.bouncycastle-prov.jar}" />
<downloadfile src= "${dist.bouncycastle-bcpg.url}" dest= "${dist.bouncycastle-bcpg.jar}" />
<downloadfile src= "${dist.commons-openpgp.url}" dest= "${dist.commons-openpgp.jar}" />
<taskdef resource= "org/apache/commons/openpgp/ant/antlib.xml" uri= "antlib:org.apache.commons.openpgp.ant" >
<classpath >
<pathelement path= "${dist.commons-openpgp.jar}" />
<pathelement path= "${dist.bouncycastle-prov.jar}" />
<pathelement path= "${dist.bouncycastle-bcpg.jar}" />
</classpath>
</taskdef>
<openpgp:signer secring= "${settings.poi-signing.privateKey}"
pubring="${settings.poi-signing.publicKey}"
password="${settings.poi-signing.passphrase}" keyid="${settings.poi-signing.username}"
asciiarmor="true">
<fileset refid= "dist-archives" />
</openpgp:signer>
</target>
2016-04-17 21:28:11 -04:00
<target name= "dist-nexus" depends= "load-maven-server-settings,dist-checksum"
description="upload build artifacts to nexus">
2016-04-15 07:06:58 -04:00
<delete dir= "build/repo" />
<delete dir= "build/nexus-stage" />
<nexus-upload artifactId= "poi" />
<nexus-upload artifactId= "poi-examples" />
<nexus-upload artifactId= "poi-excelant" />
<nexus-upload artifactId= "poi-ooxml" />
<nexus-upload artifactId= "poi-ooxml-schemas" />
<nexus-upload artifactId= "poi-scratchpad" />
</target>
2016-03-06 20:58:26 -05:00
<macrodef name= "nexus-upload" >
<attribute name= "artifactId" />
<sequential >
2016-04-15 07:06:58 -04:00
<local name= "repo" />
<property name= "repo" location= "build/repo/@{artifactId}" />
<copy todir= "${repo}" >
<mappedresources >
<fileset dir= "build/dist/maven" includes= "@{artifactId}/**" />
<regexpmapper from= "^([^/]+)/(.*)$$" to= "org/apache/poi/\1/${version.id}/\2" handledirsep= "true" />
</mappedresources>
</copy>
<local name= "lastUpdated" />
<tstamp >
<format property= "lastUpdated" pattern= "yyyyMMddHHmmss" timezone= "UTC" />
2016-05-16 05:49:17 -04:00
</tstamp>
2016-04-15 07:06:58 -04:00
<local name= "metadir" />
<property name= "metadir" location= "${repo}/org/apache/poi/@{artifactId}" />
<echo file= "${metadir}/maven-metadata.xml" > <![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<metadata >
<groupId > org.apache.poi</groupId>
<artifactId > @{artifactId}</artifactId>
<versioning >
<latest > ${version.id}</latest>
<release > ${version.id}</release>
<versions >
<version > ${version.id}</version>
</versions>
<lastUpdated > ${lastUpdated}</lastUpdated>
</versioning>
</metadata> ]]></echo>
<fixcrlf srcdir= "${metadir}" includes= "maven-metadata.xml" eol= "unix" eof= "remove" />
<checksum algorithm= "sha1" format= "MD5SUM" >
<fileset dir= "${metadir}" includes= "maven-metadata.xml" />
</checksum>
<checksum algorithm= "md5" format= "MD5SUM" >
<fileset dir= "${metadir}" includes= "maven-metadata.xml" />
</checksum>
<fixcrlf srcDir= "${metadir}" includes= "*.md5,*.sha1" eol= "unix" />
2016-03-06 20:58:26 -05:00
<downloadfile src= "${dist.nexus-staging.url}" dest= "${dist.nexus-staging.jar}" />
<taskdef uri= "antlib:org.sonatype.nexus.ant.staging" resource= "org/sonatype/nexus/ant/staging/antlib.xml" >
<classpath > <pathelement path= "${dist.nexus-staging.jar}" /> </classpath>
</taskdef>
2016-04-15 07:06:58 -04:00
<staging:stageLocally description= "@{artifactId} ${version.id}" >
<staging:nexusStagingInfo stagingDirectory= "build/nexus-stage/@{artifactId}" />
<fileset dir= "${repo}" />
</staging:stageLocally>
<!-- if this throws a "... dh keypair ..." exception, use Java 7+ for executing the task -->
<staging:stageRemotely description= "@{artifactId} ${version.id}" >
<staging:nexusStagingInfo stagingDirectory= "build/nexus-stage/@{artifactId}" >
2016-03-06 20:58:26 -05:00
<staging:projectInfo groupId= "org.apache.poi" artifactId= "@{artifactId}" version= "${version.id}" />
2016-04-15 07:06:58 -04:00
<staging:connectionInfo baseUrl= "https://repository.apache.org/" >
2016-04-03 18:19:44 -04:00
<staging:authentication username= "${settings.apache-id.username}" password= "${settings.apache-id.password}" />
2016-03-06 20:58:26 -05:00
</staging:connectionInfo>
</staging:nexusStagingInfo>
</staging:stageRemotely>
</sequential>
</macrodef>
2016-04-07 19:11:22 -04:00
<target name= "-init-svn" depends= "init,fetch-svn-jars,load-maven-server-settings" >
<!-- JAVA_HOME needs to point to a JRE/JDK7+, otherwise the svn/https connection throws a "Could not generate DH keypair" -->
<fail message= "Environment needs to point to a java 7+" >
<condition >
<or >
<equals arg1= "${ant.java.version}" arg2= "1.6" />
<equals arg1= "${ant.java.version}" arg2= "1.5" />
</or>
</condition>
</fail>
<path id= "path.svnant" >
<fileset dir= "${compile.lib}/svnant" includes= "*.jar" />
</path>
<taskdef resource= "org/tigris/subversion/svnant/svnantlib.xml" classpathref= "path.svnant" />
<svnSetting
svnkit="true"
javahl="false"
username="${settings.apache-id.username}"
password="${settings.apache-id.password}"
id="svn.settings"
/>
</target>
2017-01-31 19:59:20 -05:00
<target name= "release-prep0" depends= "-init-svn" description= "check to make sure the release tag doesn't exist yet" >
<!-- verify that svn username/password are valid ... -->
2017-02-01 19:48:03 -05:00
<fail message= "Unable to connect to SVN repo. Verify apache-id username and password. If these are correct, change the release-prep0 target to check over http, which would indicate a problem with your https setup." >
2017-01-31 19:59:20 -05:00
<condition >
2017-02-01 19:48:03 -05:00
<not > <svnExists refid= "svn.settings" target= "https://svn.apache.org/repos/asf/poi/" /> </not>
2017-01-31 19:59:20 -05:00
</condition>
</fail>
<!-- verify that the release tag that we're about to create in release - prep1 does not already exist (no overwriting tags!) -->
2017-01-31 20:24:02 -05:00
<fail message= "Cannot create release tag. https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG} already exists. Verify the requested release version (${version.id})." >
2017-01-31 19:59:20 -05:00
<condition >
2017-02-01 19:48:03 -05:00
<svnExists refid= "svn.settings" target= "https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}/" />
2017-01-31 19:59:20 -05:00
</condition>
</fail>
</target>
2016-04-07 19:11:22 -04:00
<!-- experimental release preparation ... tbd. ... -->
2017-01-31 19:59:20 -05:00
<target name= "release-prep1" depends= "-init-svn,release-prep0" description= "update the documentation and create the svn tag - needs Java7+" >
2016-04-03 18:19:44 -04:00
<local name= "tstamp_rel" />
<local name= "tstamp_next" />
<local name= "rel_next" />
<tstamp >
<format property= "tstamp_rel" pattern= "yyyy-MM-dd" offset= "7" unit= "day" />
<format property= "tstamp_next" pattern= "yyyy-MM" offset= "3" unit= "month" />
</tstamp>
<scriptdef name= "getnextrel" language= "javascript" >
var relCurr = new String(project.getProperty("version.id"));
var relNext = relCurr.replace(/[0-9]+$/, function(lastNum){ return new String(new Number(lastNum)+1); });
if (relNext.search(/beta/i) == -1) relNext += "-beta1";
project.setProperty("rel_next", relNext);
</scriptdef>
<getnextrel />
<antcall target= "-update-build.xml" >
<param name= "version_id" value= "${version.id}" />
</antcall>
<replaceregexp byline= "true" >
<regexp pattern= "<release.*date=".*\?\?">" />
<substitution expression= "<!-- release version="${rel_next}" date="${tstamp_next}-??"> </release --> <release version="${version.id}" date="${tstamp_rel}">" />
<fileset dir= "src/documentation/content/xdocs" >
<include name= "status.xml" />
</fileset>
</replaceregexp>
<fixcrlf srcdir= "." includes= "src/documentation/content/xdocs/status.xml" eol= "unix" eof= "remove" />
<!-- can't combine updating and pinning of the documentation ... so we need two commits -->
<!-- (revision)properties can't be set and read within one svn block -->
<echo message= "updating build.xml and status.xml" />
2016-08-21 17:43:38 -04:00
<exec command= "svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'release prepare for ${version.id} - updating build.xml and status.xml' build.xml src/documentation/content/xdocs/status.xml" />
2016-08-21 17:33:03 -04:00
<svn refid= "svn.settings" >
2016-08-21 17:43:38 -04:00
<!-- <commit message="release prepare for ${version.id} - updating build.xml and status.xml" recurse="false">
2016-04-03 18:19:44 -04:00
<fileset dir= "." includes= "build.xml,src/documentation/content/xdocs/status.xml" />
2016-08-21 17:43:38 -04:00
</commit> -->
2016-04-03 18:58:08 -04:00
<update dir= "." recurse= "true" />
2016-04-03 18:19:44 -04:00
<status path= "." revisionProperty= "svn_version1" />
2016-08-21 17:33:03 -04:00
</svn>
2016-04-03 18:58:08 -04:00
<echo message= "pin documentation - release ${svn_version1}" />
2016-08-21 17:43:38 -04:00
<exec command= "svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'release prepare for ${version.id} - pin documentation' src" />
2016-04-03 18:19:44 -04:00
<svn refid= "svn.settings" >
<propset path= "src" name= "svn:externals" value= "documentation -r${svn_version1} https://svn.apache.org/repos/asf/poi/site/src/documentation" />
2016-08-21 17:43:38 -04:00
<!-- <commit message="release prepare for ${version.id} - pin documentation" dir="src" recurse="false"/> -->
2016-04-03 18:58:08 -04:00
<update dir= "." recurse= "true" />
2016-04-03 18:19:44 -04:00
<status path= "." revisionProperty= "svn_version2" />
</svn>
<echo message= "create release tag" />
<svn refid= "svn.settings" >
<copy
srcUrl="https://svn.apache.org/repos/asf/poi/trunk"
destUrl="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}"
2016-04-03 18:58:08 -04:00
message="tag r${svn_version2} as ${version.id}"/>
2016-04-03 18:19:44 -04:00
</svn>
<!-- update build.xml to the next beta version -->
<antcall target= "-update-build.xml" >
<param name= "version_id" value= "${rel_next}" />
</antcall>
<!-- update sonar pom.xmls -->
<replaceregexp byline= "true" >
<regexp pattern= "<version>.*-SNAPSHOT</version>" />
<substitution expression= "<version>${rel_next}-SNAPSHOT</version>" />
<fileset dir= "sonar" >
<include name= "**/pom.xml" />
</fileset>
</replaceregexp>
<!-- unpin documentation and commit next beta version -->
<svn refid= "svn.settings" >
2016-04-03 18:23:21 -04:00
<update dir= "." recurse= "true" />
2016-04-03 18:19:44 -04:00
<propset path= "src" name= "svn:externals" value= "documentation https://svn.apache.org/repos/asf/poi/site/src/documentation" />
2016-08-21 17:43:38 -04:00
<!-- <commit message="prepare for ${rel_next}" recurse="false">
2016-04-03 18:19:44 -04:00
<fileset dir= "." includes= "build.xml" />
<fileset dir= "sonar" includes= "**/pom.xml" />
<dirset dir= "src" />
2016-08-21 17:43:38 -04:00
</commit> -->
2016-04-03 18:19:44 -04:00
</svn>
2016-08-21 17:43:38 -04:00
<exec command= "svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'prepare for ${rel_next}' build.xml sonar src" />
2016-04-07 19:11:22 -04:00
<mkdir dir= "build/release" />
<svn refid= "svn.settings" >
<checkout url= "https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}" destPath= "build/release" />
</svn>
</target>
<target name= "release-prep2" depends= "init" description= "compile the freshly checked out svn tag and upload it to the nexus - needs a JDK6" >
<!-- JAVA_HOME needs to point to a JDK6, otherwise the ant invocation is failing on a missing javac -->
<fail message= "Environment needs to point to a java 6 jdk" >
<condition >
<not > <equals arg1= "${ant.java.version}" arg2= "1.6" /> </not>
</condition>
</fail>
<local name= "DSTAMP" />
<tstamp >
<format property= "DSTAMP" pattern= "yyyyMMdd" offset= "7" unit= "day" />
</tstamp>
<ant dir= "build/release" inheritAll= "false" inheritRefs= "false" useNativeBasedir= "true" >
<property name= "DSTAMP" value= "${DSTAMP}" />
<target name= "dist" />
</ant>
</target>
<target name= "release-prep3" depends= "-init-svn" description= "write the dist to the release candidate repo - needs Java7+" >
2016-07-02 18:09:00 -04:00
<ant dir= "build/release" inheritAll= "false" inheritRefs= "false" useNativeBasedir= "true" >
<target name= "dist-nexus" />
</ant>
2016-11-29 17:41:26 -05:00
<svn refid= "svn.settings" >
2016-04-07 19:11:22 -04:00
<import path= "build/release/build/dist"
url="https://dist.apache.org/repos/dist/dev/poi"
2016-04-09 07:28:12 -04:00
newEntry="${version.id}-${release.rc}"
2016-04-07 19:11:22 -04:00
message="release candidate POI ${version.id}"/>
</svn>
2016-04-03 18:19:44 -04:00
</target>
<target name= "-update-build.xml" >
<replaceregexp byline= "true" >
<regexp pattern= "(<property name="version.id" value=")[^"]+("/>)" />
<substitution expression= "\1${version_id}\2" />
<fileset dir= "." >
<include name= "build.xml" />
</fileset>
</replaceregexp>
<fixcrlf srcdir= "." includes= "build.xml" eol= "unix" eof= "remove" />
</target>
2016-03-06 20:58:26 -05:00
<!--
Configure gpg settings in local maven settings.xml
see release-guide.txt for more details
-->
<target name= "load-maven-server-settings" >
<xslt in= "${user.home}/.m2/settings.xml" out= "build/tmp/signing.properties" >
<style >
<string > < ![CDATA[
<xsl:stylesheet version= "1.0" xmlns:xsl= "http://www.w3.org/1999/XSL/Transform" xmlns:mvn= "http://maven.apache.org/SETTINGS/1.0.0" >
<xsl:output method= "text" version= "1.0" encoding= "ISO-8859-1" />
<xsl:template match= "@*|text()" />
2016-04-03 18:19:44 -04:00
<xsl:template match= "//mvn:server[contains('poi-signing|apache-id',mvn:id/text())]/*[name(.)!='id']" >
2016-03-06 20:58:26 -05:00
<xsl:value-of select= "concat('settings.',../mvn:id,'.',name(.),'=',translate(text(),'\','/'),'
')" />
</xsl:template>
</xsl:stylesheet>
]]></string>
</style>
</xslt>
<loadproperties srcFile= "build/tmp/signing.properties" />
<pathconvert property= "settings.poi-signing.publicKey" >
<path > <pathelement path= "${settings.poi-signing.privateKey}" /> </path>
<mapper > <filtermapper > <replacestring from= "secring" to= "pubring" /> </filtermapper> </mapper>
</pathconvert>
</target>
2016-07-02 18:09:00 -04:00
2016-11-29 17:41:26 -05:00
<macrodef name= "loadChecksum" >
<attribute name= "url" />
<attribute name= "property" />
<sequential >
<loadresource property= "@{property}" >
<url url= "@{url}" />
<filterchain >
<striplinebreaks />
<replaceregex pattern= " .*" replace= "" />
</filterchain>
</loadresource>
</sequential>
</macrodef>
2016-07-02 18:09:00 -04:00
<scriptdef name= "bytes2mega" language= "javascript"
description="Convert size in bytes to megabytes">
<attribute name= "property" />
<attribute name= "bytes" />
2016-11-29 17:41:26 -05:00
var bytes = Number(attributes.get("bytes"));
var mega = String((bytes/(1024.0*1024.0)).toFixed(2));
2016-07-02 18:09:00 -04:00
project.setProperty(attributes.get("property"), mega);
</scriptdef>
2016-11-29 17:41:26 -05:00
2016-07-02 18:09:00 -04:00
<macrodef name= "loadFilesize" >
<attribute name= "url" />
<attribute name= "property" />
<sequential >
2016-11-29 17:41:26 -05:00
<delete file= "build/loadFilesize.txt" />
<record name= "build/loadFilesize.txt" action= "start" loglevel= "verbose" append= "false" />
<http url= "@{url}" method= "HEAD" expected= "200" printrequestheaders= "false" printresponseheaders= "false" />
<record name= "build/loadFilesize.txt" action= "stop" />
<local name= "fileSize" />
<loadfile property= "fileSize" srcFile= "build/loadFilesize.txt" >
<filterchain >
<tokenfilter >
<containsstring contains= "Content-Length" />
<replaceregex pattern= ".* ([0-9]+)$" replace= "\1" flags= "gi" />
</tokenfilter>
</filterchain>
</loadfile>
<bytes2mega property= "@{property}" bytes= "${fileSize}" />
2016-07-02 18:09:00 -04:00
</sequential>
</macrodef>
2016-11-29 17:41:26 -05:00
<!-- TODO: currently this only saves a copy and paste snipplet to a file ...
would be nice if it really changes status.xml and download.xml
Doesn't work with Java6 - the https urls can't be accessed via loadChecksum
-->
<target name= "update-download" >
2016-11-23 17:23:09 -05:00
<downloadfile src= "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/missing-link/ml-ant-http-1.1.3.zip" dest= "${compile.lib}/ml-ant-http-1.1.3.zip" />
2016-07-02 18:09:00 -04:00
<unzip src= "${compile.lib}/ml-ant-http-1.1.3.zip" dest= "${compile.lib}" >
<patternset >
<include name= "ml-ant-http-1.1.3.jar" />
</patternset>
2016-11-29 17:41:26 -05:00
</unzip>
2016-07-02 18:09:00 -04:00
<taskdef name= "http" classname= "org.missinglink.ant.task.http.HttpClientTask" >
<classpath >
<path location= "${compile.lib}/ml-ant-http-1.1.3.jar" />
</classpath>
</taskdef>
2016-11-29 17:41:26 -05:00
<tstamp >
<format property= "rel_date" pattern= "dd MMMM yyyy" locale= "US" />
<format property= "file_date" pattern= "yyyyMMdd" locale= "US" />
</tstamp>
2016-07-02 18:09:00 -04:00
<!-- TODO: change reltype (dev/release), depending on BETA / FINAL -->
2016-11-29 17:41:26 -05:00
<property name= "reltype" value= "dev" />
<property name= "baseurl" value= "https://www.apache.org/dist/poi/${reltype}" />
2016-07-02 18:09:00 -04:00
<loadChecksum property= "bin-tar-md5" url= "${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz.md5" />
<loadChecksum property= "bin-tar-sha1" url= "${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha1" />
<loadChecksum property= "bin-zip-md5" url= "${baseurl}/bin/poi-bin-${version.id}-${file_date}.zip.md5" />
<loadChecksum property= "bin-zip-sha1" url= "${baseurl}/bin/poi-bin-${version.id}-${file_date}.zip.sha1" />
<loadChecksum property= "src-tar-md5" url= "${baseurl}/src/poi-src-${version.id}-${file_date}.tar.gz.md5" />
<loadChecksum property= "src-tar-sha1" url= "${baseurl}/src/poi-src-${version.id}-${file_date}.tar.gz.sha1" />
<loadChecksum property= "src-zip-md5" url= "${baseurl}/src/poi-src-${version.id}-${file_date}.zip.md5" />
<loadChecksum property= "src-zip-sha1" url= "${baseurl}/src/poi-src-${version.id}-${file_date}.zip.sha1" />
2016-11-29 17:41:26 -05:00
<loadFilesize property= "bin-tar-size" url= "${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz" />
2016-07-02 18:09:00 -04:00
<loadFilesize property= "bin-zip-size" url= "${baseurl}/bin/poi-bin-${version.id}-${file_date}.zip" />
<loadFilesize property= "src-tar-size" url= "${baseurl}/src/poi-src-${version.id}-${file_date}.tar.gz" />
<loadFilesize property= "src-zip-size" url= "${baseurl}/src/poi-src-${version.id}-${file_date}.zip" />
2016-11-29 17:41:26 -05:00
<echo file= "download-snipplet.xml" > < ![CDATA[
2016-07-02 18:09:00 -04:00
<section id= "POI-${version.id}" > <title > ${rel_date} - POI ${version.id} available</title>
<p > The Apache POI team is pleased to announce the release of ${version.id}.
Featured are a handful of new areas of functionality and numerous bug fixes.</p>
<p > A summary of changes is available in the
2016-11-14 00:56:19 -05:00
<link href= "https://www.apache.org/dyn/closer.lua/poi/${reltype}/RELEASE-NOTES.txt" > Release Notes</link> .
2016-07-02 18:09:00 -04:00
A full list of changes is available in the <link href= "changes.html" > change log</link> .
People interested should also follow the <link href= "mailinglists.html" > dev list</link>
to track progress.</p>
<p >
The POI source release as well as the pre-built binary deployment packages are listed below.
2017-04-16 16:40:47 -04:00
Pre-built versions of all <link href= "overview.html#components" > POI components</link>
2016-07-02 18:09:00 -04:00
are available in the central Maven repository under Group ID "org.apache.poi" and Version
"${version.id}".
</p>
2017-04-16 16:40:47 -04:00
<section id= "POI-${version.id}-bin" > <title > Binary Distribution</title>
2016-07-02 18:09:00 -04:00
<ul >
2016-11-14 00:56:19 -05:00
<li > <link href= "https://www.apache.org/dyn/closer.lua/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz" > poi-bin-${version.id}-${file_date}.tar.gz</link>
(${bin-tar-size} MB, <link href= "https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.asc" > signature (.asc)</link> )
2016-07-02 18:09:00 -04:00
<br />
2016-11-14 00:56:19 -05:00
MD5 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.md5" >
2016-07-02 18:09:00 -04:00
${bin-tar-md5}</link>
<br />
2016-11-14 00:56:19 -05:00
SHA1 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha1" >
2016-07-02 18:09:00 -04:00
${bin-tar-sha1}</link>
</li>
2016-11-14 00:56:19 -05:00
<li > <link href= "https://www.apache.org/dyn/closer.lua/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip" > poi-bin-${version.id}-${file_date}.zip</link>
(${bin-zip-size} MB, <link href= "https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.asc" > signature (.asc)</link> )
2016-07-02 18:09:00 -04:00
<br />
2016-11-14 00:56:19 -05:00
MD5 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.md5" >
2016-11-29 17:41:26 -05:00
${bin-zip-md5}</link>
2016-07-02 18:09:00 -04:00
<br />
2016-11-14 00:56:19 -05:00
SHA1 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.sha1" >
2016-11-29 17:41:26 -05:00
${bin-zip-sha1}</link>
2016-07-02 18:09:00 -04:00
</li>
</ul>
</section>
2017-04-16 16:40:47 -04:00
<section id= "POI-${version.id}-src" > <title > Source Distribution</title>
2016-07-02 18:09:00 -04:00
<ul >
2016-11-14 00:56:19 -05:00
<li > <link href= "https://www.apache.org/dyn/closer.lua/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz" > poi-src-${version.id}-${file_date}.tar.gz</link>
(${src-tar-size} MB, <link href= "https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.asc" > signature (.asc)</link> )
2016-07-02 18:09:00 -04:00
<br />
2016-11-14 00:56:19 -05:00
MD5 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.md5" >
2016-07-02 18:09:00 -04:00
${src-tar-md5}</link>
<br />
2016-11-14 00:56:19 -05:00
SHA1 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.sha1" >
2016-11-29 17:41:26 -05:00
${src-tar-sha1}</link>
2016-07-02 18:09:00 -04:00
</li>
2016-11-14 00:56:19 -05:00
<li > <link href= "https://www.apache.org/dyn/closer.lua/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip" > poi-src-${version.id}-${file_date}.zip</link>
(${src-zip-size} MB, <link href= "https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.asc" > signature (.asc)</link> )
2016-07-02 18:09:00 -04:00
<br />
2016-11-14 00:56:19 -05:00
MD5 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.md5" >
2016-11-29 17:41:26 -05:00
${src-zip-md5}</link>
2016-07-02 18:09:00 -04:00
<br />
2016-11-14 00:56:19 -05:00
SHA1 checksum: <link href= "https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.sha1" >
2016-11-29 17:41:26 -05:00
${src-zip-sha1}</link>
2016-07-02 18:09:00 -04:00
</li>
</ul>
</section>
</section>
]]></echo>
2016-11-29 17:41:26 -05:00
</target>
2016-12-30 12:00:13 -05:00
</project>