]> source.dussan.org Git - jgit.git/commitdiff
Make running static checks configurable in maven build 47/3147/2
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 16 Apr 2011 00:08:24 +0000 (02:08 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 18 Apr 2011 15:38:58 +0000 (17:38 +0200)
In order to run the static checks run:

mvn -P static-checks clean install

Change-Id: I14077498a04be986ded123ddbfc97da8f9bc3130
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.console/pom.xml
org.eclipse.jgit.http.server/pom.xml
org.eclipse.jgit.ui/pom.xml
org.eclipse.jgit/pom.xml
pom.xml

index 1fbb024f9d456f2612cf61871266bd721df30c3a..83303c8969141d5a3e32ca0b5028da9456b946d6 100644 (file)
           <encoding>UTF-8</encoding>
         </configuration>
       </plugin>
-         <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>findbugs-maven-plugin</artifactId>
-            <configuration>
-               <findbugsXmlOutput>true</findbugsXmlOutput>
-               <failOnError>false</failOnError>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>check</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-pmd-plugin</artifactId>
-            <configuration>
-               <sourceEncoding>utf-8</sourceEncoding>
-               <minimumTokens>100</minimumTokens>
-               <targetJdk>1.5</targetJdk>
-               <format>xml</format>
-               <failOnViolation>false</failOnViolation>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>cpd-check</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
-      </plugins>
+    </plugins>
   </build>
 </project>
index 5117f0f7a9fe4e8ed6dc99995795d7c5bc656d01..dbbe1774b7e9f0495a68d743ef6204c412df5829 100644 (file)
           </archive>
         </configuration>
       </plugin>
-         <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>findbugs-maven-plugin</artifactId>
-            <configuration>
-               <findbugsXmlOutput>true</findbugsXmlOutput>
-               <failOnError>false</failOnError>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>check</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-pmd-plugin</artifactId>
-            <configuration>
-               <sourceEncoding>utf-8</sourceEncoding>
-               <minimumTokens>100</minimumTokens>
-               <targetJdk>1.5</targetJdk>
-               <format>xml</format>
-               <failOnViolation>false</failOnViolation>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>cpd-check</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
     </plugins>
   </build>
 </project>
index 7460b17f52b2d5c012e0857fedcc3f6d30222fcd..daed46d97a4e862a83388356d4467117a906270e 100644 (file)
           </archive>
         </configuration>
       </plugin>
-         <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>findbugs-maven-plugin</artifactId>
-            <configuration>
-               <findbugsXmlOutput>true</findbugsXmlOutput>
-               <failOnError>false</failOnError>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>check</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-pmd-plugin</artifactId>
-            <configuration>
-               <sourceEncoding>utf-8</sourceEncoding>
-               <minimumTokens>100</minimumTokens>
-               <targetJdk>1.5</targetJdk>
-               <format>xml</format>
-               <failOnViolation>false</failOnViolation>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>cpd-check</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
     </plugins>
   </build>
 </project>
index ea05ed0e23c77a9be54b6b1ac9e5de9ca9d06ee0..ae9e77a4ac84664c4d397ab6b162efea655909c6 100644 (file)
           </archive>
         </configuration>
       </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <configuration>
-          <findbugsXmlOutput>true</findbugsXmlOutput>
-          <failOnError>false</failOnError>
-          <excludeFilterFile>findBugs/FindBugsExcludeFilter.xml</excludeFilterFile>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-pmd-plugin</artifactId>
-        <configuration>
-          <sourceEncoding>utf-8</sourceEncoding>
-          <minimumTokens>100</minimumTokens>
-          <targetJdk>1.5</targetJdk>
-          <format>xml</format>
-          <failOnViolation>false</failOnViolation>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>cpd-check</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>findbugs-maven-plugin</artifactId>
+          <configuration>
+            <excludeFilterFile>findBugs/FindBugsExcludeFilter.xml</excludeFilterFile>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
   </build>
 </project>
diff --git a/pom.xml b/pom.xml
index d77cd9b21a0a71b511a91f96f8ced337b37ef4c2..2431fbfef1588ef960e4c35d372f32306612d6c1 100644 (file)
--- a/pom.xml
+++ b/pom.xml
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>findbugs-maven-plugin</artifactId>
           <version>2.3.2-SNAPSHOT</version>
+          <configuration>
+            <findbugsXmlOutput>true</findbugsXmlOutput>
+            <failOnError>false</failOnError>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>check</goal>
+              </goals>
+            </execution>
+          </executions>
         </plugin>
 
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-pmd-plugin</artifactId>
           <version>2.5</version>
+          <configuration>
+            <sourceEncoding>utf-8</sourceEncoding>
+            <minimumTokens>100</minimumTokens>
+            <targetJdk>1.5</targetJdk>
+            <format>xml</format>
+            <failOnViolation>false</failOnViolation>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>cpd-check</goal>
+              </goals>
+            </execution>
+          </executions>
         </plugin>
       </plugins>
     </pluginManagement>
         <module>org.eclipse.jgit.console</module>
       </modules>
     </profile>
+    <profile>
+      <id>static-checks</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>findbugs-maven-plugin</artifactId>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-pmd-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 
   <modules>