浏览代码

[BUILD] Fail release if test have AwaitsFix annotations

Note this commit upgrades Forbidden APIs to version 1.5

Closes #5807
Simon Willnauer 11 年之前
父节点
当前提交
eaf04fc828
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 2 1
      dev-tools/build_release.py
  2. 4 1
      pom.xml

+ 2 - 1
dev-tools/build_release.py

@@ -242,7 +242,8 @@ def build_release(run_tests=False, dry_run=True, cpus=1):
     run_mvn('clean',
             'test -Dtests.jvms=%s -Des.node.mode=local' % (cpus),
             'test -Dtests.jvms=%s -Des.node.mode=network' % (cpus))
-  run_mvn('clean %s -DskipTests' %(target))
+  run_mvn('clean test-compile -Dforbidden.test.signatures="org.apache.lucene.util.LuceneTestCase\$AwaitsFix @ Please fix all bugs before release"')
+  run_mvn('clean %s -DskipTests' % (target))
   success = False
   try:
     run_mvn('-DskipTests rpm:rpm')

+ 4 - 1
pom.xml

@@ -1032,13 +1032,14 @@
             <plugin>
                 <groupId>de.thetaphi</groupId>
                 <artifactId>forbiddenapis</artifactId>
-                <version>1.4.1</version>
+                <version>1.5</version>
 
                 <executions>
                     <execution>
                         <id>check-forbidden-apis</id>
                         <configuration>
                             <targetVersion>1.7</targetVersion>
+                            <failOnMissingClasses>false</failOnMissingClasses> <!-- this is a bug in forbidden APIs since 1.5 looks also at annotations -->
                             <!-- disallow undocumented classes like sun.misc.Unsafe: -->
                             <internalRuntimeForbidden>true</internalRuntimeForbidden>
                             <!-- if the used Java version is too new, don't fail, just do nothing: -->
@@ -1070,6 +1071,7 @@
                             <signaturesFiles>
                                 <signaturesFile>core-signatures.txt</signaturesFile>
                             </signaturesFiles>
+                            <signatures>${forbidden.signatures}</signatures>
                         </configuration>
                         <phase>compile</phase>
                         <goals>
@@ -1089,6 +1091,7 @@
                                 <bundledSignature>jdk-unsafe</bundledSignature>
                                 <bundledSignature>jdk-deprecated</bundledSignature>
                             </bundledSignatures>
+                            <signatures>${forbidden.test.signatures}</signatures>
                         </configuration>
                         <phase>test-compile</phase>
                         <goals>