aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-08-17 20:25:08 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-08-17 20:25:08 +0000
commitb7b0a0c21579b38b8f1aa553eda35564cb01e3d2 (patch)
tree8f6d7afee458bdd761965d49f4a8ccb218022361 /build.xml
parentf8040e5f8c0e74b064db13c93ec9c5025542848c (diff)
downloadpoi-b7b0a0c21579b38b8f1aa553eda35564cb01e3d2.tar.gz
poi-b7b0a0c21579b38b8f1aa553eda35564cb01e3d2.zip
Activate Forbidden-Apis-Check also for other tests
Max supported Java version is currently Java 14 Fix the check failures git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880944 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml29
1 files changed, 13 insertions, 16 deletions
diff --git a/build.xml b/build.xml
index 6613faee44..54537d17fd 100644
--- a/build.xml
+++ b/build.xml
@@ -1549,7 +1549,7 @@ under the License.
<delete dir="build" includes="test-integration.log*"/>
<path id="test-integration.modules">
- <pathelement path="build/dist/maven/poi"/>
+ <pathelement path="build/dist/maven/poi-tests"/>
<pathelement path="build/dist/maven/poi-ooxml"/>
<pathelement path="build/dist/maven/poi-scratchpad"/>
<pathelement path="build/dist/maven/poi-examples"/>
@@ -2252,16 +2252,22 @@ under the License.
<fileset dir="lib/ooxml-provided" includes="*.jar"/>
<fileset dir="lib/excelant" includes="*.jar"/>
<pathelement location="${ooxml.xsds.jar}"/>
+ <pathelement location="build/dist/maven/poi-tests/poi-${version.id}-tests.jar"/>
<pathelement location="build/dist/maven/poi-examples/poi-examples-${version.id}.jar"/>
<path path="${env.CLASSPATH}"/>
</path>
+ <!-- forbiddenapis bundled signatures max supported version is 14 -->
+ <condition property="forbiddenVersion" value="14">
+ <javaversion atleast="15"/>
+ </condition>
+ <property name="forbiddenVersion" value="${ant.java.version}"/>
<!-- first check rules that apply to all the source code -->
<forbiddenapis
classpathref="forbiddenapis.classpath"
suppressAnnotation="org.apache.poi.util.SuppressForbidden"
- targetVersion="${ant.java.version}"
+ targetVersion="${forbiddenVersion}"
>
<bundledsignatures name="jdk-unsafe"/>
<bundledsignatures name="jdk-deprecated"/>
@@ -2272,29 +2278,20 @@ under the License.
<bundledsignatures name="jdk-system-out"/>
-->
<signaturesFileset file="src/resources/devtools/forbidden-signatures.txt"/>
- <!-- sources -->
- <!-- zipfileset src="build/dist/maven/poi/poi-${version.id}.jar"/ -->
- <!-- zipfileset src="build/dist/maven/poi-ooxml/poi-ooxml-${version.id}.jar"/ -->
- <zipfileset src="build/dist/maven/poi-scratchpad/poi-scratchpad-${version.id}.jar"/>
- <zipfileset src="build/dist/maven/poi-excelant/poi-excelant-${version.id}.jar"/>
- <!--
- <fileset dir="${examples.output.dir}"/>
- -->
<!-- test-sources (incl. sources) -->
<zipfileset src="build/dist/maven/poi-tests/poi-${version.id}-tests.jar"/>
<zipfileset src="build/dist/maven/poi-ooxml-tests/poi-ooxml-${version.id}-tests.jar"/>
- <!--
- <fileset dir="${scratchpad.output.test.dir}"/>
- <fileset dir="${excelant.output.test.dir}"/>
- <fileset dir="${integration.output.test.dir}"/>
- -->
+ <zipfileset src="build/dist/maven/poi-scratchpad-tests/poi-scratchpad-${version.id}-tests.jar"/>
+ <zipfileset src="build/dist/maven/poi-excelant-tests/poi-excelant-${version.id}-tests.jar"/>
+ <zipfileset src="build/dist/maven/poi-examples/poi-examples-${version.id}.jar"/>
+ <zipfileset src="build/dist/maven/poi-integration/poi-integration-${version.id}.jar"/>
</forbiddenapis>
<!-- then check some advanced rules which we only apply to the core code and not tests or examples -->
<forbiddenapis
classpathref="forbiddenapis.classpath"
suppressAnnotation="org.apache.poi.util.SuppressForbidden"
- targetVersion="${jdk.version.source}"
+ targetVersion="${forbiddenVersion}"
>
<signaturesFileset file="src/resources/devtools/forbidden-signatures-prod.txt"/>
<!-- sources -->