Apache Solr open-source search software
LUCENE-4570: Maven ForbiddenAPIs configuration cleanups: - Clean up overly long execution IDs - Make at least one test-check execution per module include internalRuntimeForbidden=true - Make at least one test-check execution per module include signatureFile executors.txt - Include bundledSignature commons-io-unsafe in solr test-framework forbiddenapis check - Note in the Solr shared test-check configuration to include bundledSignature commons-io-unsafe only in modules with commons-io on their classpath
Steven Rowe6449c08e37d8
diff --git a/dev-tools/maven/lucene/analysis/stempel/pom.xml.template b/dev-tools/maven/lucene/analysis/stempel/pom.xml.templateindex 51d34e9c53e..31c931d7664 100644--- a/dev-tools/maven/lucene/analysis/stempel/pom.xml.template+++ b/dev-tools/maven/lucene/analysis/stempel/pom.xml.template@@ -82,11 +82,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/lucene/benchmark/pom.xml.template b/dev-tools/maven/lucene/benchmark/pom.xml.templateindex 896286636ef..0527762ee18 100755--- a/dev-tools/maven/lucene/benchmark/pom.xml.template+++ b/dev-tools/maven/lucene/benchmark/pom.xml.template@@ -126,11 +126,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/lucene/codecs/src/java/pom.xml.template b/dev-tools/maven/lucene/codecs/src/java/pom.xml.templateindex 459c45d00e7..c4164d9d34a 100644--- a/dev-tools/maven/lucene/codecs/src/java/pom.xml.template+++ b/dev-tools/maven/lucene/codecs/src/java/pom.xml.template@@ -78,7 +78,7 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>lucene-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution></executions>diff --git a/dev-tools/maven/lucene/codecs/src/test/pom.xml.template b/dev-tools/maven/lucene/codecs/src/test/pom.xml.templateindex b6cf898df29..a7f5fdeb1fa 100644--- a/dev-tools/maven/lucene/codecs/src/test/pom.xml.template+++ b/dev-tools/maven/lucene/codecs/src/test/pom.xml.template@@ -74,7 +74,7 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution></executions>diff --git a/dev-tools/maven/lucene/core/src/java/pom.xml.template b/dev-tools/maven/lucene/core/src/java/pom.xml.templateindex db0fee67d6e..700257fee17 100644--- a/dev-tools/maven/lucene/core/src/java/pom.xml.template+++ b/dev-tools/maven/lucene/core/src/java/pom.xml.template@@ -69,15 +69,15 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>lucene-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>lucene-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/lucene/core/src/test/pom.xml.template b/dev-tools/maven/lucene/core/src/test/pom.xml.templateindex 6f59c36aa57..0659acfbec1 100644--- a/dev-tools/maven/lucene/core/src/test/pom.xml.template+++ b/dev-tools/maven/lucene/core/src/test/pom.xml.template@@ -93,7 +93,7 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution></executions>diff --git a/dev-tools/maven/lucene/demo/pom.xml.template b/dev-tools/maven/lucene/demo/pom.xml.templateindex 741cf535b25..a6aef59a1c9 100644--- a/dev-tools/maven/lucene/demo/pom.xml.template+++ b/dev-tools/maven/lucene/demo/pom.xml.template@@ -97,11 +97,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/lucene/facet/pom.xml.template b/dev-tools/maven/lucene/facet/pom.xml.templateindex 0b5693378c9..391ec96fa50 100755--- a/dev-tools/maven/lucene/facet/pom.xml.template+++ b/dev-tools/maven/lucene/facet/pom.xml.template@@ -84,11 +84,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/lucene/misc/pom.xml.template b/dev-tools/maven/lucene/misc/pom.xml.templateindex f8fcacd5a19..4125ea09fb4 100644--- a/dev-tools/maven/lucene/misc/pom.xml.template+++ b/dev-tools/maven/lucene/misc/pom.xml.template@@ -72,11 +72,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/lucene/pom.xml.template b/dev-tools/maven/lucene/pom.xml.templateindex 87bdbcdb8de..93f045d2933 100644--- a/dev-tools/maven/lucene/pom.xml.template+++ b/dev-tools/maven/lucene/pom.xml.template@@ -66,7 +66,7 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>@@ -84,14 +84,17 @@</goals></execution><execution>- <id>lucene-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>lucene-shared-test-check-forbidden-apis</id><configuration>+ <!-- disallow undocumented classes like sun.misc.Unsafe: -->+ <internalRuntimeForbidden>true</internalRuntimeForbidden><bundledSignatures><bundledSignature>jdk-unsafe</bundledSignature><bundledSignature>jdk-deprecated</bundledSignature></bundledSignatures><signaturesFiles><signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>+ <signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile></signaturesFiles></configuration><goals>diff --git a/dev-tools/maven/lucene/queryparser/pom.xml.template b/dev-tools/maven/lucene/queryparser/pom.xml.templateindex ba414aab260..d3953967d79 100644--- a/dev-tools/maven/lucene/queryparser/pom.xml.template+++ b/dev-tools/maven/lucene/queryparser/pom.xml.template@@ -87,11 +87,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/lucene/test-framework/pom.xml.template b/dev-tools/maven/lucene/test-framework/pom.xml.templateindex c3cd82f7129..881d1944e80 100644--- a/dev-tools/maven/lucene/test-framework/pom.xml.template+++ b/dev-tools/maven/lucene/test-framework/pom.xml.template@@ -87,22 +87,25 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>lucene-check-forbidden-executors-and-jdk-unsafe-deprecated-and-system-out</id>+ <id>lucene-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>lucene-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>lucene-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>test-check-forbidden-apis</id><configuration>+ <!-- disallow undocumented classes like sun.misc.Unsafe: -->+ <internalRuntimeForbidden>true</internalRuntimeForbidden><bundledSignatures><bundledSignature>jdk-unsafe</bundledSignature><bundledSignature>jdk-deprecated</bundledSignature></bundledSignatures><signaturesFiles><signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>+ <signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile></signaturesFiles></configuration><goals>diff --git a/dev-tools/maven/solr/core/src/java/pom.xml.template b/dev-tools/maven/solr/core/src/java/pom.xml.templateindex 91b4e3b3d6e..549f6c77187 100644--- a/dev-tools/maven/solr/core/src/java/pom.xml.template+++ b/dev-tools/maven/solr/core/src/java/pom.xml.template@@ -221,15 +221,15 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>solr-check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>solr-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-servlet-api-and-jdk-unsafe-and-deprecated-and-commons-io-unsafe</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/solr/core/src/test/pom.xml.template b/dev-tools/maven/solr/core/src/test/pom.xml.templateindex ad2f62307b2..a9647db8adf 100644--- a/dev-tools/maven/solr/core/src/test/pom.xml.template+++ b/dev-tools/maven/solr/core/src/test/pom.xml.template@@ -118,15 +118,15 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>solr-check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>solr-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>test-check-forbidden-servlet-api-and-jdk-unsafe-and-deprecated-and-commons-io-unsafe</id>+ <id>test-check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>@@ -137,6 +137,7 @@</bundledSignatures><signaturesFiles><signaturesFile>${top-level}/lucene/tools/forbiddenApis/servlet-api.txt</signaturesFile>+ <signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile></signaturesFiles></configuration><goals>@@ -144,7 +145,7 @@</goals></execution><execution>- <id>test-check-forbidden-test-apis</id>+ <id>test-check-forbidden-test-apis</id> <!-- Separate execution to specify excludes --><configuration><signaturesFiles><signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>diff --git a/dev-tools/maven/solr/pom.xml.template b/dev-tools/maven/solr/pom.xml.templateindex 9f9eeed59e5..00d0238bd9d 100644--- a/dev-tools/maven/solr/pom.xml.template+++ b/dev-tools/maven/solr/pom.xml.template@@ -116,7 +116,7 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>solr-check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>@@ -133,14 +133,19 @@</goals></execution><execution>- <id>solr-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-test-check-forbidden-apis</id><configuration>+ <!-- disallow undocumented classes like sun.misc.Unsafe: -->+ <internalRuntimeForbidden>true</internalRuntimeForbidden><bundledSignatures><bundledSignature>jdk-unsafe</bundledSignature><bundledSignature>jdk-deprecated</bundledSignature>+ <!-- Include commons-io-unsafe only in those modules with commons-io on their classpath -->+ <!-- <bundledSignature>commons-io-unsafe-${commons-io.version}</bundledSignature> --></bundledSignatures><signaturesFiles><signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>+ <signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile></signaturesFiles></configuration><goals>diff --git a/dev-tools/maven/solr/solrj/src/java/pom.xml.template b/dev-tools/maven/solr/solrj/src/java/pom.xml.templateindex f659cdf1521..21594003c11 100644--- a/dev-tools/maven/solr/solrj/src/java/pom.xml.template+++ b/dev-tools/maven/solr/solrj/src/java/pom.xml.template@@ -137,15 +137,15 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>solr-check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>solr-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-executors-and-jdk-unsafe-and-deprecated-and-commons-io-unsafe</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>diff --git a/dev-tools/maven/solr/solrj/src/test/pom.xml.template b/dev-tools/maven/solr/solrj/src/test/pom.xml.templateindex f981e582ee0..2b8d65266c2 100644--- a/dev-tools/maven/solr/solrj/src/test/pom.xml.template+++ b/dev-tools/maven/solr/solrj/src/test/pom.xml.template@@ -107,11 +107,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>solr-check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>solr-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>@@ -130,7 +130,7 @@</goals></execution><execution>- <id>test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated-and-commons-io-unsafe</id>+ <id>test-check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden>@@ -141,6 +141,7 @@</bundledSignatures><signaturesFiles><signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>+ <signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile></signaturesFiles></configuration><goals>diff --git a/dev-tools/maven/solr/test-framework/pom.xml.template b/dev-tools/maven/solr/test-framework/pom.xml.templateindex 82aa1d56c31..eb9bc006a6a 100644--- a/dev-tools/maven/solr/test-framework/pom.xml.template+++ b/dev-tools/maven/solr/test-framework/pom.xml.template@@ -109,25 +109,27 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>solr-check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>solr-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>check-forbidden-test-apis-and-servlet-api-and-jdk-unsafe-and-deprecated</id>+ <id>check-forbidden-apis</id><configuration><!-- disallow undocumented classes like sun.misc.Unsafe: --><internalRuntimeForbidden>true</internalRuntimeForbidden><bundledSignatures><bundledSignature>jdk-unsafe</bundledSignature><bundledSignature>jdk-deprecated</bundledSignature>+ <bundledSignature>commons-io-unsafe-${commons-io.version}</bundledSignature></bundledSignatures><signaturesFiles><signaturesFile>${top-level}/lucene/tools/forbiddenApis/servlet-api.txt</signaturesFile><signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>+ <signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile></signaturesFiles></configuration><goals>diff --git a/dev-tools/maven/solr/webapp/pom.xml.template b/dev-tools/maven/solr/webapp/pom.xml.templateindex 32aec1a5ddd..d047e537b30 100644--- a/dev-tools/maven/solr/webapp/pom.xml.template+++ b/dev-tools/maven/solr/webapp/pom.xml.template@@ -119,11 +119,11 @@<artifactId>forbiddenapis</artifactId><executions><execution>- <id>solr-check-forbidden-executors-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution><execution>- <id>solr-test-check-forbidden-test-apis-and-jdk-unsafe-and-deprecated</id>+ <id>solr-shared-test-check-forbidden-apis</id><phase>none</phase> <!-- Block inherited execution --></execution></executions>