You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2016/07/22 00:07:46 UTC

[02/14] accumulo git commit: ACCUMULO-4383 Use animal-sniffer-enforcer-rule

ACCUMULO-4383 Use animal-sniffer-enforcer-rule

Use animal-sniffer to detect and fail on use of newer Java APIs than the
target version.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a3746164
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a3746164
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a3746164

Branch: refs/heads/master
Commit: a3746164806674acf939a9ef8d3fcecb2c14275c
Parents: 0fdd52a
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 19:54:05 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 19:54:05 2016 -0400

----------------------------------------------------------------------
 pom.xml | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3746164/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3027270..5e66db2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -717,6 +717,13 @@
               </requireProperty>
             </rules>
           </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>org.codehaus.mojo</groupId>
+              <artifactId>animal-sniffer-enforcer-rule</artifactId>
+              <version>1.15</version>
+            </dependency>
+          </dependencies>
         </plugin>
         <plugin>
           <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
@@ -783,10 +790,29 @@
         <artifactId>maven-enforcer-plugin</artifactId>
         <executions>
           <execution>
-            <id>enforce-mvn</id>
+            <id>enforce-basic-rules</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>enforce-java-signatures</id>
             <goals>
               <goal>enforce</goal>
             </goals>
+            <phase>process-test-classes</phase>
+            <configuration>
+              <rules>
+                <checkSignatureRule implementation="org.codehaus.mojo.animal_sniffer.enforcer.CheckSignatureRule">
+                  <signature>
+                    <groupId>org.codehaus.mojo.signature</groupId>
+                    <artifactId>java16</artifactId>
+                    <version>1.1</version>
+                  </signature>
+                </checkSignatureRule>
+              </rules>
+            </configuration>
           </execution>
         </executions>
       </plugin>