LUCENE-5945: Changes to forbidden, as discussed on issue.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1624785 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2014-09-13 21:59:31 +00:00
parent 3eb66fb19c
commit 6a4bce5e17
1 changed files with 6 additions and 11 deletions

View File

@ -2356,7 +2356,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
</path>
</target>
<condition property="islucene" value="true" else="false">
<condition property="forbidden-isLucene">
<not>
<or>
<matches pattern="^(solr)\b" string="${name}"/>
@ -2365,22 +2365,17 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
</not>
</condition>
<target name="check-forbidden-apis" depends="-check-forbidden-all,-check-forbidden-core,-check-forbidden-tests,-check-forbidden-lucene" description="Check forbidden API calls in compiled class files"/>
<target name="check-forbidden-apis" depends="-check-forbidden-all,-check-forbidden-core,-check-forbidden-tests" description="Check forbidden API calls in compiled class files"/>
<!-- applies to both source and test code -->
<target name="-check-forbidden-all" depends="-init-forbidden-apis,compile-core,compile-test">
<forbidden-apis internalRuntimeForbidden="true" classpathref="forbidden-apis.allclasses.classpath">
<bundledSignatures name="jdk-unsafe-${javac.target}"/>
<bundledSignatures name="jdk-deprecated-${javac.target}"/>
<signaturesFileSet file="${common.dir}/tools/forbiddenApis/base.txt"/>
<fileset dir="${build.dir}/classes/java" excludes="${forbidden-base-excludes}"/>
<fileset dir="${build.dir}/classes/test" excludes="${forbidden-tests-excludes}" erroronmissingdir="false"/>
</forbidden-apis>
</target>
<!-- applies to only lucene API -->
<target name="-check-forbidden-lucene" depends="-init-forbidden-apis,compile-core,compile-test" if="${islucene}">
<forbidden-apis signaturesFile="${common.dir}/tools/forbiddenApis/lucene.txt" classpathref="forbidden-apis.allclasses.classpath">
<signaturesFileSet dir="${common.dir}/tools/forbiddenApis">
<include name="base.txt"/>
<include name="lucene.txt" if="forbidden-isLucene"/>
</signaturesFileSet>
<fileset dir="${build.dir}/classes/java" excludes="${forbidden-base-excludes}"/>
<fileset dir="${build.dir}/classes/test" excludes="${forbidden-tests-excludes}" erroronmissingdir="false"/>
</forbidden-apis>