You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/12/04 05:13:23 UTC

svn commit: r1416769 - in /openejb/trunk/openejb: checkstyle.xml pom.xml

Author: dblevins
Date: Tue Dec  4 04:13:22 2012
New Revision: 1416769

URL: http://svn.apache.org/viewvc?rev=1416769&view=rev
Log:
Add the ability to some basic checkstyle in the build (for CI only)

Added:
    openejb/trunk/openejb/checkstyle.xml   (with props)
Modified:
    openejb/trunk/openejb/pom.xml

Added: openejb/trunk/openejb/checkstyle.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/checkstyle.xml?rev=1416769&view=auto
==============================================================================
--- openejb/trunk/openejb/checkstyle.xml (added)
+++ openejb/trunk/openejb/checkstyle.xml Tue Dec  4 04:13:22 2012
@@ -0,0 +1,34 @@
+<!DOCTYPE module SYSTEM "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<!--
+  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.
+  -->
+<module name="Checker">
+  <module name="TreeWalker">
+
+    <!-- @MyAnnotation public void ....-->
+    <module name="RegexpSinglelineJava">
+      <property name="format" value="^ +@[^ ]+ [a-zA-Z]"/>
+      <property name="ignoreComments" value="true"/>
+    </module>
+
+    <!-- @MyAnnotation(foo = "bar") public void ....-->
+    <module name="RegexpSinglelineJava">
+      <property name="format" value="^ +@[^ (]+ *\([^)]+ *\) +[a-zA-Z]"/>
+      <property name="ignoreComments" value="true"/>
+    </module>
+
+  </module>
+</module>
\ No newline at end of file

Propchange: openejb/trunk/openejb/checkstyle.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openejb/trunk/openejb/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/pom.xml?rev=1416769&r1=1416768&r2=1416769&view=diff
==============================================================================
--- openejb/trunk/openejb/pom.xml (original)
+++ openejb/trunk/openejb/pom.xml Tue Dec  4 04:13:22 2012
@@ -353,6 +353,45 @@
       </modules>
     </profile>
     <profile>
+      <id>style</id>
+      <modules>
+      </modules>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-checkstyle-plugin</artifactId>
+            <version>2.9.1</version>
+            <configuration>
+              <sourceDirectory>${project.build.directory}/../container/openejb-core/src/main/java/org/apache/openejb/config</sourceDirectory>
+              <configLocation>checkstyle.xml</configLocation>
+              <consoleOutput>true</consoleOutput>
+              <enableRulesSummary>false</enableRulesSummary>
+              <failsOnError>true</failsOnError>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+      <repositories>
+        <repository>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <id>Codehaus Snapshots</id>
+          <url>http://snapshots.repository.codehaus.org/</url>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <id>Codehaus Snapshots</id>
+          <url>http://snapshots.repository.codehaus.org/</url>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+    <profile>
       <id>rat</id>
       <modules>
         <module>deps</module>