svn commit: r564736 - in /activemq/camel/trunk/etc: activemq-checkstyle.xml pom.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r564736 - in /activemq/camel/trunk/etc: activemq-checkstyle.xml pom.xml

chirino
Author: chirino
Date: Fri Aug 10 13:02:50 2007
New Revision: 564736

URL: http://svn.apache.org/viewvc?view=rev&rev=564736
Log:
Added pom into etc dir so that you can setup your workspace quicker.. just run mvn -Dworkspace=/Users/chirino/Documents/workspace/activemq-trunk in the etc dir

Added:
    activemq/camel/trunk/etc/pom.xml   (with props)
Modified:
    activemq/camel/trunk/etc/activemq-checkstyle.xml

Modified: activemq/camel/trunk/etc/activemq-checkstyle.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/etc/activemq-checkstyle.xml?view=diff&rev=564736&r1=564735&r2=564736
==============================================================================
--- activemq/camel/trunk/etc/activemq-checkstyle.xml (original)
+++ activemq/camel/trunk/etc/activemq-checkstyle.xml Fri Aug 10 13:02:50 2007
@@ -81,7 +81,9 @@
         </module>
         <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
         <module name="RedundantImport"/>
+        <!-- When you javadoc {@link } an import is added that checkstyle thinks is unused import.
         <module name="UnusedImports"/>
+        -->
         <module name="ImportOrder">
             <property name="groups" value="java,javax,org.w3c,org.xml,junit"/>
             <property name="ordered" value="true"/>
@@ -103,7 +105,7 @@
         </module>
         <module name="FileLength">
             <property name="max" value="3000"/>
- </module>
+    </module>
         <module name="LineLength">
             <property name="max" value="200"/>
         </module>
@@ -111,9 +113,11 @@
             <property name="max" value="150"/>
             <property name="countEmpty" value="false"/>
         </module>
+        <!-- We should try to get this enabled soon..
         <module name="ParameterNumber">
             <property name="max" value="7"/>
         </module>
+        -->
 
         <!-- Checks for whitespace                               -->
         <!-- See http://checkstyle.sf.net/config_whitespace.html -->
@@ -147,9 +151,11 @@
         <module name="AvoidNestedBlocks">
             <property name="allowInSwitchCase" value="true"/>
         </module>
+        <!-- We use alot of emply blocks..  they can be good too.
         <module name="EmptyBlock">
             <property name="option" value="text"/>
         </module>
+        -->
         <module name="LeftCurly"/>
         <module name="NeedBraces"/>
         <module name="RightCurly"/>
@@ -181,28 +187,30 @@
         <module name="SimplifyBooleanReturn"/>
         <module name="StringLiteralEquality"/>
         <module name="NestedIfDepth">
-            <property name="max" value="3"/>
+            <property name="max" value="8"/>
         </module>
         <module name="NestedTryDepth">
-            <property name="max" value="3"/>
+            <property name="max" value="8"/>
         </module>
         <module name="SuperClone"/>
         <module name="SuperFinalize"/>
         <!--<module name="IllegalCatch"/>-->
- <module name="IllegalThrows">
-  <property name="illegalClassNames" value="java.lang.Error,java.lang.RuntimeException"/>
- </module>
+    <module name="IllegalThrows">
+      <property name="illegalClassNames" value="java.lang.Error,java.lang.RuntimeException"/>
+    </module>
         <!--<module name="RedundantThrows"/>-->
         <module name="PackageDeclaration"/>
         <module name="JUnitTestCase"/>
         <module name="ReturnCount">
-            <property name="max" value="6"/>
+            <property name="max" value="20"/>
         </module>
-        
+
+        <!-- Um.. we tend to use these alot.. perhaps enable this check later.
         <module name="IllegalType">
             <property name="format" value="^xxx$"/>
-            <property name="illegalClassNames" value="java.util.GregorianCalendar, java.util.Hashtable, java.util.HashSet, java.util.HashMap, java.util.ArrayList, java.util.LinkedList, java.util.LinkedHashMap, java.util.LinkedHashSet, java.util.TreeSet, java.util.TreeMap"/>
+            <property name="illegalClassNames" value="java.util.GregorianCalendar, java.util.Hashtable, java.util.HashSet, java.util.HashMap, java.util.ArrayList, java.util.LinkedList, java.util.LinkedHashMap, java.util.LinkedHashSet, java.util.TreeSet, java.util.TreeMap"/> We use alot of emply blocks..  they can be good too.
         </module>
+        -->
         <module name="DeclarationOrder"/>
         <!--<module name="ParameterAssignment"/>-->
         <module name="ExplicitInitialization"/>
@@ -224,15 +232,15 @@
         <module name="InterfaceIsType"/>
         <module name="MutableException"/>
         <module name="ThrowsCount">
-         <property name="max" value="5"/>
+            <property name="max" value="5"/>
         </module>
         <module name="VisibilityModifier">
             <property name="protectedAllowed" value="true"/>
             <property name="packageAllowed" value="true"/>
- <!-- this is needed for the resource injection unit tests.  It will removed
-     when private member inject is supported.
- -->
-     <property name="publicMemberPattern" value="resource[12].*"/>
+            <!-- this is needed for the resource injection unit tests.  It will removed
+                 when private member inject is supported.
+            -->
+            <property name="publicMemberPattern" value="resource[12].*"/>
         </module>
 
 
@@ -240,17 +248,19 @@
         <!-- Metrics checks.                   -->
         <!-- See http://checkstyle.sf.net/config_metrics.html -->
         <module name="BooleanExpressionComplexity">
-         <property name="max" value="6"/>
+            <property name="max" value="6"/>
         </module>
         <!--<module name="ClassDataAbstractionCoupling"/>-->
         <!--<module name="ClassFanOutComplexity"/>-->
         <!--<module name="CyclomaticComplexity"/>-->
         <!--<module name="NPathComplexity"/>-->
+        <!-- Ah big methods aint so bad! :)
         <module name="JavaNCSS">
-       <property name="methodMaximum" value="75"/>
+            <property name="methodMaximum" value="75"/>
         </module>
+        -->
 
-
+        
         <!-- Miscellaneous other checks.                   -->
         <!-- See http://checkstyle.sf.net/config_misc.html -->
         <!--
@@ -264,17 +274,17 @@
         </module>
         -->
         <module name="TodoComment">
- <property name="format" value="WARNING"/>
- </module>
+            <property name="format" value="WARNING"/>
+        </module>
 
         <module name="UpperEll"/>
         
         <!--Assert statement may have side effects:-->
- <module name="DescendantToken">
-     <property name="tokens" value="LITERAL_ASSERT"/>
-    <property name="limitedTokens" value="ASSIGN,DEC,INC,POST_DEC,POST_INC,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,DIV_ASSIGN,MOD_ASSIGN,BSR_ASSIGN,SR_ASSIGN,SL_ASSIGN,BAND_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN"/>
-    <property name="maximumNumber" value="0"/>
- </module>
+        <module name="DescendantToken">
+            <property name="tokens" value="LITERAL_ASSERT"/>
+            <property name="limitedTokens" value="ASSIGN,DEC,INC,POST_DEC,POST_INC,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,DIV_ASSIGN,MOD_ASSIGN,BSR_ASSIGN,SR_ASSIGN,SL_ASSIGN,BAND_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN"/>
+            <property name="maximumNumber" value="0"/>
+        </module>
 
         <!--<module name="UncommentedMain"/>-->
         <!--module name="TrailingComment"/-->

Added: activemq/camel/trunk/etc/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/etc/pom.xml?view=auto&rev=564736
==============================================================================
--- activemq/camel/trunk/etc/pom.xml (added)
+++ activemq/camel/trunk/etc/pom.xml Fri Aug 10 13:02:50 2007
@@ -0,0 +1,147 @@
+<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-parent</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-etc</artifactId>
+  <packaging>pom</packaging>
+  <name>Camel Etc</name>
+  <description>Misc stuff</description>
+
+  <properties>
+    <workspace>${basedir}../../workspace</workspace>
+  </properties>
+  <build>
+      <defaultGoal>process-test-sources</defaultGoal>
+      <plugins>
+          <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-eclipse-plugin</artifactId>
+              <inherited>false</inherited>
+              <executions>
+                  <execution>
+                      <id>setup.eclipse.workspace</id>
+                      <phase>process-test-sources</phase>
+                      <goals>
+                          <goal>add-maven-repo</goal>
+                      </goals>
+                      <configuration>
+                          <workspace>${workspace}</workspace>
+                      </configuration>
+                  </execution>
+              </executions>
+          </plugin>
+          <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-antrun-plugin</artifactId>
+              <inherited>false</inherited>
+              <dependencies>
+                  <dependency>
+                      <groupId>ant</groupId>
+                      <artifactId>ant-nodeps</artifactId>
+                      <version>1.6.5</version>
+                  </dependency>
+                  <dependency>
+                      <groupId>ant</groupId>
+                      <artifactId>ant-trax</artifactId>
+                      <version>1.6.5</version>
+                  </dependency>
+              </dependencies>
+              <executions>
+                  <execution>
+                      <id>setup.workspace</id>
+                      <phase>validate</phase>
+                      <configuration>
+                          <tasks>
+                              <path id="ecp.ws.path" location="${workspace}" />
+                              <property name="full.eclipse.workspace" refid="ecp.ws.path" />
+                              <path path="${basedir}" id="etc.path"/>
+
+                              <whichresource resource="/activemq-eclipse-pmd" property="pmd.url"><classpath refid="etc.path"/></whichresource>
+                              <whichresource resource="/activemq-pmd-ruleset.xml" property="pmdruleset.url"><classpath refid="etc.path"/></whichresource>
+                              <whichresource resource="/activemq-eclipse-checkstyle" property="eclipse.checkstyle.url"><classpath refid="etc.path"/></whichresource>
+                              <whichresource resource="/activemq-checkstyle.xml" property="checkstyle.url"><classpath refid="etc.path"/></whichresource>>
+
+                              <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings" />
+                              <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle" />
+                              <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/net.sourceforge.pmd.eclipse" />
+
+                              <get src="${checkstyle.url}" dest="${full.eclipse.workspace}/activemq-checkstyle.xml" />
+
+                              <!-- Add checkstyle config -->
+                              <copy file="${basedir}/eclipse/template.checkstyle-config.xml" tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" overwrite="no">
+                                  <filterset>
+                                      <filter token="CHECKSTYLE_CONFIG_FILE" value="${full.eclipse.workspace}/activemq-checkstyle.xml" />
+                                      <filter token="APACHE_HEADER_FILE" value="${full.eclipse.workspace}/activemq-header.txt" />
+                                  </filterset>
+                              </copy>
+
+                              <xslt style="${basedir}/eclipse/addcheckstyle.xsl" in="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" out="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new">
+                                  <param name="checkstyleconfig" expression="${full.eclipse.workspace}/activemq-checkstyle.xml" />
+                              </xslt>
+                              <copy file="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new" tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" overwrite="yes" />
+
+
+                              <!-- Add warning flags that we want -->
+                              <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
+                                  <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion" value="ignore" />
+                                  <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore" />
+                                  <entry key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface" value="ignore" />
+                                  <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore" />
+                              </propertyfile>
+
+
+                              <!-- Add code format rules -->
+                              <concat destfile="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true" fixlastline="true">
+                                  <filelist dir="${basedir}/eclipse" files="org.eclipse.jdt.core.prefs" />
+                              </concat>
+                              <loadfile property="eclipse.code.format" srcFile="${basedir}/eclipse/ActiveMQCodeFormatter.xml" />
+                              <loadfile property="eclipse.code.templates" srcFile="${basedir}/eclipse/codetemplates.xml" />
+                              <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
+                                  <entry key="formatter_profile" value="_ActiveMQ Java Conventions" />
+                                  <entry key="org.eclipse.jdt.ui.formatterprofiles" value="${eclipse.code.format}" />
+                                  <entry key="org.eclipse.jdt.ui.text.custom_code_templates" value="${eclipse.code.templates}" />
+
+                                  <!-- Add import order -->
+                                  <entry key="org.eclipse.jdt.ui.importorder" value="java;javax;org.w3c;org.xml;w3c;" />
+                                  <!-- Sort order -->
+                                  <entry key="org.eclipse.jdt.ui.visibility.order" value="B,R,D,V," />
+                                  <entry key="outlinesortoption" value="T,SF,F,SI,I,C,SM,M," />
+                                        <entry key="org.eclipse.jdt.ui.enable.visibility.order" value="true" />
+                              </propertyfile>
+                          </tasks>
+                      </configuration>
+                      <goals>
+                          <goal>run</goal>
+                      </goals>
+                  </execution>
+              </executions>
+          </plugin>
+      </plugins>
+  </build>
+</project>

Propchange: activemq/camel/trunk/etc/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/etc/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: activemq/camel/trunk/etc/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: activemq/camel/trunk/etc/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml