You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/11/04 23:32:35 UTC

[53/56] [abbrv] git commit: updated refs/heads/ui-restyle to b7259a4

Add checkstyle to the build process and enable it for the Nicira NVP plugin


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

Branch: refs/heads/ui-restyle
Commit: f39b6b2c56596f5bd2328c89e402893aa279ce10
Parents: a196fbc
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Mon Nov 4 15:22:12 2013 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Mon Nov 4 15:24:54 2013 +0100

----------------------------------------------------------------------
 parents/checkstyle/pom.xml                      |  7 ++++
 .../src/main/resources/tooling/checkstyle.xml   | 21 ++++++++++++
 plugins/network-elements/nicira-nvp/pom.xml     | 35 ++++++++++++++++++++
 pom.xml                                         |  2 ++
 4 files changed, 65 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f39b6b2c/parents/checkstyle/pom.xml
----------------------------------------------------------------------
diff --git a/parents/checkstyle/pom.xml b/parents/checkstyle/pom.xml
new file mode 100644
index 0000000..245631b
--- /dev/null
+++ b/parents/checkstyle/pom.xml
@@ -0,0 +1,7 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <name>Apache CloudStack Checkstyle Configuration</name>
+  <groupId>org.apache.cloudstack</groupId>
+  <artifactId>checkstyle</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+</project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f39b6b2c/parents/checkstyle/src/main/resources/tooling/checkstyle.xml
----------------------------------------------------------------------
diff --git a/parents/checkstyle/src/main/resources/tooling/checkstyle.xml b/parents/checkstyle/src/main/resources/tooling/checkstyle.xml
new file mode 100644
index 0000000..8465383
--- /dev/null
+++ b/parents/checkstyle/src/main/resources/tooling/checkstyle.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+    <module name="FileTabCharacter">
+        <property name="eachLine" value="true"/>
+    </module>
+
+    <module name="RegexpSingleline">
+        <!-- \s matches whitespace character, $ matches end of line. -->
+        <property name="format" value="\s+$"/>
+        <property name="message" value="Line has trailing spaces."/>
+    </module>
+    <module name="TreeWalker">
+       <module name="RedundantImport"/>
+       <module name="UnusedImports"/>
+    </module>
+
+</module>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f39b6b2c/plugins/network-elements/nicira-nvp/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/pom.xml b/plugins/network-elements/nicira-nvp/pom.xml
index 5030ddf..5c65e6a 100644
--- a/plugins/network-elements/nicira-nvp/pom.xml
+++ b/plugins/network-elements/nicira-nvp/pom.xml
@@ -26,4 +26,39 @@
     <version>4.3.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>${cs.checkstyle.version}</version>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.cloudstack</groupId>
+            <artifactId>checkstyle</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <phase>process-sources</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <failsOnError>true</failsOnError>
+          <configLocation>tooling/checkstyle.xml</configLocation>
+          <consoleOutput>true</consoleOutput>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
+          <sourceDirectory>${project.basedir}</sourceDirectory>
+          <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</includes>
+          <excludes>**\/target\/,**\/bin\/</excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f39b6b2c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 82ee75d..b8b2a37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,6 +86,7 @@
     <cs.target.dir>target</cs.target.dir>
     <cs.daemon.version>1.0.10</cs.daemon.version>
     <cs.jna.version>4.0.0</cs.jna.version>
+    <cs.checkstyle.version>2.10</cs.checkstyle.version>
   </properties>
 
   <distributionManagement>
@@ -174,6 +175,7 @@
     <module>services</module>
     <module>maven-standard</module>
     <module>quickcloud</module>
+    <module>parents/checkstyle</module>
   </modules>
 
   <dependencyManagement>