cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject git commit: updated refs/heads/master to 7c8facf
Date Thu, 09 Jan 2014 16:01:02 GMT
Updated Branches:
  refs/heads/master 1b5f8e21a -> 7c8facf3c


Change checkstyle to run on every sub project, so it will also run when you build an individual
module


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

Branch: refs/heads/master
Commit: 7c8facf3c9b1fe1ac90d90359859820289614f5d
Parents: 1b5f8e2
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Thu Jan 9 17:00:11 2014 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Thu Jan 9 17:00:11 2014 +0100

----------------------------------------------------------------------
 awsapi/pom.xml                                  | 10 ++++
 deps/XenServerJava/pom.xml                      | 22 ++++++++
 plugins/network-elements/opendaylight/pom.xml   | 28 ----------
 pom.xml                                         | 28 ++++++----
 .../com/cloud/vpc/MockNetworkManagerImpl.java   |  2 +-
 tools/checkstyle/cloud-style.xml                | 55 --------------------
 tools/checkstyle/pom.xml                        | 43 +++++++++++++++
 .../src/main/resources/cloud-style.xml          | 55 ++++++++++++++++++++
 8 files changed, 149 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/awsapi/pom.xml
----------------------------------------------------------------------
diff --git a/awsapi/pom.xml b/awsapi/pom.xml
index 55a1632..3c2bbe1 100644
--- a/awsapi/pom.xml
+++ b/awsapi/pom.xml
@@ -319,6 +319,16 @@
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>${cs.checkstyle.version}</version>
+        <executions>
+          <execution>
+            <phase>none</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <excludes>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/deps/XenServerJava/pom.xml
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/pom.xml b/deps/XenServerJava/pom.xml
index cdc1e30..5c885b4 100644
--- a/deps/XenServerJava/pom.xml
+++ b/deps/XenServerJava/pom.xml
@@ -35,4 +35,26 @@
       <version>${cs.xmlrpc.version}</version>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>${cs.checkstyle.version}</version>
+        <executions>
+          <execution>
+            <phase>none</phase>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.cloudstack</groupId>
+            <artifactId>checkstyle</artifactId>
+            <!-- this project.version differs -->
+            <version>${project.parent.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
 </project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/plugins/network-elements/opendaylight/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/opendaylight/pom.xml b/plugins/network-elements/opendaylight/pom.xml
index 8c69b6e..47d66f6 100644
--- a/plugins/network-elements/opendaylight/pom.xml
+++ b/plugins/network-elements/opendaylight/pom.xml
@@ -48,34 +48,6 @@
     </testResources>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.cloudstack</groupId>
-            <artifactId>checkstyle</artifactId>
-            <version>${project.version}</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <phase>process-classes</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>
-      <plugin>
         <groupId>com.mycila.maven-license-plugin</groupId>
         <artifactId>maven-license-plugin</artifactId>
         <version>1.9.0</version>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4a4719e..3f65bdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -160,6 +160,7 @@
   </organization>
 
   <modules>
+    <module>tools/checkstyle</module>
     <module>api</module>
     <module>agent</module>
     <module>core</module>
@@ -447,7 +448,22 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <inherited>false</inherited>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <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>${project.version}</version>
+          </dependency>
+        </dependencies>
+
         <executions>
           <execution>
             <phase>validate</phase>
@@ -458,7 +474,7 @@
         </executions>
         <configuration>
           <failsOnError>true</failsOnError>
-          <configLocation>${project.basedir}/tools/checkstyle/cloud-style.xml</configLocation>
+          <configLocation>cloud-style.xml</configLocation>
           <consoleOutput>true</consoleOutput>
           <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <sourceDirectory>${project.basedir}</sourceDirectory>
@@ -466,14 +482,6 @@
           <excludes>**\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/awsapi\/,**\/XenServerJava\/,**\/apidoc\/</excludes>
         </configuration>
       </plugin>
-    </plugins>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-checkstyle-plugin</artifactId>
-          <version>${cs.checkstyle.version}</version>
-        </plugin>
         <plugin>
           <artifactId>maven-clean-plugin</artifactId>
           <configuration>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
index b62bf47..be305de 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -25,9 +25,9 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
+
 import org.apache.cloudstack.acl.ControlledEntity.ACLType;
 import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd;
 import org.apache.cloudstack.api.command.admin.network.ListDedicatedGuestVlanRangesCmd;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/tools/checkstyle/cloud-style.xml
----------------------------------------------------------------------
diff --git a/tools/checkstyle/cloud-style.xml b/tools/checkstyle/cloud-style.xml
deleted file mode 100644
index 47ea1fb..0000000
--- a/tools/checkstyle/cloud-style.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
-  license agreements. See the NOTICE file distributed with this work for additional 
-  information regarding copyright ownership. The ASF licenses this file to you under 
-  the Apache License, Version 2.0 (the "License"); you may not use this file except 
-  in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

-  Unless required by applicable law or agreed to in writing, software distributed under 
-  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
-  OF ANY KIND, either express or implied. See the License for the specific language 
-  governing permissions and limitations under the License. -->
-<!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="TreeWalker">
-    <module name="LineLength">
-      <property name="max" value="1024" />
-    </module>
-
-    <module name="RedundantImport" />
-    <module name="UnusedImports" />
-    <module name="MemberName">
-      <property name="format" value="^_?[a-zA-Z0-9]*$" />
-    </module>
-	<module name="LocalFinalVariableName">
-	  <property name="format" value="^[a-zA-Z][a-zA-Z0-9_]*$" />
-	</module>
-	<module name="StaticVariableName">
-	  <property name="format" value="^(s_)?[a-z][a-zA-Z0-9]*$"/>
-	</module>
-	<module name="ConstantName">
-	  <property name="format" value="^[a-zA-Z][a-zA-Z0-9_]*$"/>
-	</module>
-
-    <module name="PackageName" />
-    <module name="ParameterName" />
-    <module name="TypeName" />
-    <module name="AvoidStarImport" />
-  </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>
-
-  <!-- some modules that we should soon add <module name="MagicNumber"/> -->
-
-  <!-- some modules that we should soon add -->
-
-</module>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/tools/checkstyle/pom.xml
----------------------------------------------------------------------
diff --git a/tools/checkstyle/pom.xml b/tools/checkstyle/pom.xml
new file mode 100644
index 0000000..25eb528
--- /dev/null
+++ b/tools/checkstyle/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<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/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>Apache CloudStack Developer Tools - Checkstyle Configuration</name>
+    <groupId>org.apache.cloudstack</groupId>
+    <artifactId>checkstyle</artifactId>
+    <version>4.4.0-SNAPSHOT</version>
+    <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <version>2.11</version>
+          <executions>
+            <execution>
+              <phase>none</phase>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c8facf3/tools/checkstyle/src/main/resources/cloud-style.xml
----------------------------------------------------------------------
diff --git a/tools/checkstyle/src/main/resources/cloud-style.xml b/tools/checkstyle/src/main/resources/cloud-style.xml
new file mode 100644
index 0000000..47ea1fb
--- /dev/null
+++ b/tools/checkstyle/src/main/resources/cloud-style.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+  license agreements. See the NOTICE file distributed with this work for additional 
+  information regarding copyright ownership. The ASF licenses this file to you under 
+  the Apache License, Version 2.0 (the "License"); you may not use this file except 
+  in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

+  Unless required by applicable law or agreed to in writing, software distributed under 
+  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+  OF ANY KIND, either express or implied. See the License for the specific language 
+  governing permissions and limitations under the License. -->
+<!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="TreeWalker">
+    <module name="LineLength">
+      <property name="max" value="1024" />
+    </module>
+
+    <module name="RedundantImport" />
+    <module name="UnusedImports" />
+    <module name="MemberName">
+      <property name="format" value="^_?[a-zA-Z0-9]*$" />
+    </module>
+	<module name="LocalFinalVariableName">
+	  <property name="format" value="^[a-zA-Z][a-zA-Z0-9_]*$" />
+	</module>
+	<module name="StaticVariableName">
+	  <property name="format" value="^(s_)?[a-z][a-zA-Z0-9]*$"/>
+	</module>
+	<module name="ConstantName">
+	  <property name="format" value="^[a-zA-Z][a-zA-Z0-9_]*$"/>
+	</module>
+
+    <module name="PackageName" />
+    <module name="ParameterName" />
+    <module name="TypeName" />
+    <module name="AvoidStarImport" />
+  </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>
+
+  <!-- some modules that we should soon add <module name="MagicNumber"/> -->
+
+  <!-- some modules that we should soon add -->
+
+</module>


Mime
View raw message