Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2011-04-15 17:57:31 -0400
committerMatthias Sohn2011-04-15 18:08:30 -0400
commit5c0caecc19c6d4ac8763d6115180a236555e7cec (patch)
tree2c1d483dd55d2cc03199dddfe1e4c6de3ab47798 /pom.xml
parent9a64661d2a7bd33c9150d8e3d1be35c459580435 (diff)
downloadegit-github-5c0caecc19c6d4ac8763d6115180a236555e7cec.tar.gz
egit-github-5c0caecc19c6d4ac8763d6115180a236555e7cec.tar.xz
egit-github-5c0caecc19c6d4ac8763d6115180a236555e7cec.zip
Add static checks to maven build
In order to enable findbugs and CPD static checks enable the profile "static-checks": mvn -P static-checks clean install Change-Id: I06241207c4fc8f4ad7dd87c36de17fd896c77a6f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml65
1 files changed, 63 insertions, 2 deletions
diff --git a/pom.xml b/pom.xml
index 4be3bda0..e82ad4ac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Chris Aniszczyk <caniszczyk@gmail.com>
+ Copyright (C) 2011, Chris Aniszczyk <caniszczyk@gmail.com>
+ Copyright (C) 2011, Matthias Sohn <matthias.sohn@sap.com>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -66,6 +67,16 @@
</repository>
</repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <!-- need maven-findbugs-2.3.2-SNAPSHOT, see
+ http://jira.codehaus.org/browse/MFINDBUGS-122
+ remove this when this version is released -->
+ <id>codehaus.snapshots</id>
+ <url>http://snapshots.repository.codehaus.org/</url>
+ </pluginRepository>
+ </pluginRepositories>
+
<build>
<plugins>
<plugin>
@@ -110,12 +121,47 @@
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
+ <plugin>
+ <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>
<sourceDirectory>src/</sourceDirectory>
</build>
-<profiles>
+ <profiles>
<profile>
<id>platform-helios</id>
<activation>
@@ -142,5 +188,20 @@
<platform-version>[3.7,3.8)</platform-version>
</properties>
</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>
</project>

Back to the top