aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2015-08-27 13:23:44 +0000
committerNick Burch <nick@apache.org>2015-08-27 13:23:44 +0000
commit5c9317bcd840a642e66aa742b6a05200fdb2eb9d (patch)
treecdcbe929147a686301c512346d6803c80e347914
parentda6635ceb41c12c56197775381ec1d5194008326 (diff)
downloadpoi-5c9317bcd840a642e66aa742b6a05200fdb2eb9d.tar.gz
poi-5c9317bcd840a642e66aa742b6a05200fdb2eb9d.zip
Enable the Forbidden APIs checks on Main, Scratchpad and OOXML. Run with "ant forbidden-apis-check"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1698148 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build.xml22
1 files changed, 21 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 89718f9a9b..add72bbbd9 100644
--- a/build.xml
+++ b/build.xml
@@ -1730,7 +1730,27 @@ under the License.
<!-- See https://github.com/policeman-tools/forbidden-apis for details -->
<!-- of the checks that this can do -->
<target name="forbidden-apis-check" depends="init">
- <fail message="TODO" />
+ <taskdef name="forbiddenapis"
+ classname="de.thetaphi.forbiddenapis.AntTask"
+ classpath="${forbidden.jar}"/>
+ <antcall target="-do-forbidden-apis-check">
+ <param name="dir" value="${main.output.dir}"/>
+ </antcall>
+ <antcall target="-do-forbidden-apis-check">
+ <param name="dir" value="${scratchpad.output.dir}"/>
+ </antcall>
+ <antcall target="-do-forbidden-apis-check">
+ <param name="dir" value="${ooxml.output.dir}"/>
+ </antcall>
+ </target>
+ <target name="-do-forbidden-apis-check">
+ <forbiddenapis
+ internalRuntimeForbidden="true"
+ classpathref="javadoc.classpath"
+ dir="${dir}">
+ <bundledsignatures name="jdk-unsafe-${jdk.version.source}"/>
+ <bundledsignatures name="jdk-deprecated-${jdk.version.source}"/>
+ </forbiddenapis>
</target>
<target name="findbugs"><!-- depends="assemble" -->