Author: ningjiang
Date: Sun Jun 28 16:34:52 2009
New Revision: 789121

URL: http://svn.apache.org/viewvc?rev=789121&view=rev
Log:
CAMEL-1768 get eclipse pulgin configuration better for checkstyle working

Added:
    camel/trunk/etc/eclipse/Camel.importorder   (props changed)
      - copied unchanged from r788961, 
camel/trunk/etc/eclipse/ActiveMQ.importorder
    camel/trunk/etc/eclipse/CamelCodeFormatter.xml   (contents, props changed)
      - copied, changed from r788961, 
camel/trunk/etc/eclipse/ActiveMQCodeFormatter.xml
Removed:
    camel/trunk/etc/eclipse/ActiveMQ.importorder
    camel/trunk/etc/eclipse/ActiveMQCodeFormatter.xml
Modified:
    camel/trunk/buildingtools/src/main/resources/camel-eclipse-checkstyle
    camel/trunk/etc/eclipse/addcheckstyle.xsl
    camel/trunk/etc/eclipse/template.checkstyle-config.xml
    camel/trunk/parent/pom.xml
    camel/trunk/pom.xml

Modified: camel/trunk/buildingtools/src/main/resources/camel-eclipse-checkstyle
URL: 
http://svn.apache.org/viewvc/camel/trunk/buildingtools/src/main/resources/camel-eclipse-checkstyle?rev=789121&r1=789120&r2=789121&view=diff
==============================================================================
--- camel/trunk/buildingtools/src/main/resources/camel-eclipse-checkstyle 
(original)
+++ camel/trunk/buildingtools/src/main/resources/camel-eclipse-checkstyle Sun 
Jun 28 16:34:52 2009
@@ -18,10 +18,10 @@
   under the License.
 -->
 <fileset-config file-format-version="1.1.0" simple-config="false">
-    <fileset name="all" enabled="true" check-config-name="CXF Checks" 
type="external" description="">
+    <fileset name="all" enabled="true" check-config-name="Camel Checks" 
type="external" description="">
         <file-match-pattern match-pattern="^src[/\\]." include-pattern="true"/>
         <file-match-pattern match-pattern="^src[/\\]main[/\\]generated[/\\]." 
include-pattern="false"/>
         <file-match-pattern match-pattern="^src[/\\]test[/\\]generated[/\\]." 
include-pattern="false"/>
-        <file-match-pattern 
match-pattern="^src[/\\]main[/\\]release[/\\]samples[/\\]jax_rs[/\\]basic_https[/\\]contrib[/\\]."
 include-pattern="false"/>
+        <file-match-pattern 
match-pattern="^src[/\\]main[/\\]resources[/\\]archetype-resources[/\\]." 
include-pattern="false"/>
     </fileset>
-</fileset-config>
\ No newline at end of file
+</fileset-config>

Propchange: camel/trunk/etc/eclipse/Camel.importorder
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: camel/trunk/etc/eclipse/CamelCodeFormatter.xml (from r788961, 
camel/trunk/etc/eclipse/ActiveMQCodeFormatter.xml)
URL: 
http://svn.apache.org/viewvc/camel/trunk/etc/eclipse/CamelCodeFormatter.xml?p2=camel/trunk/etc/eclipse/CamelCodeFormatter.xml&p1=camel/trunk/etc/eclipse/ActiveMQCodeFormatter.xml&r1=788961&r2=789121&rev=789121&view=diff
==============================================================================
--- camel/trunk/etc/eclipse/ActiveMQCodeFormatter.xml (original)
+++ camel/trunk/etc/eclipse/CamelCodeFormatter.xml Sun Jun 28 16:34:52 2009
@@ -18,7 +18,7 @@
   under the License.
 -->
 <profiles version="8">
-<profile name="ActiveMQ Java Conventions" version="8">
+<profile name="Camel Java Conventions" version="8">
 <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" 
value="false"/>
 <setting 
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression"
 value="18"/>
 <setting 
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" 
value="16"/>

Propchange: camel/trunk/etc/eclipse/CamelCodeFormatter.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/etc/eclipse/CamelCodeFormatter.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/etc/eclipse/CamelCodeFormatter.xml
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: camel/trunk/etc/eclipse/CamelCodeFormatter.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: camel/trunk/etc/eclipse/addcheckstyle.xsl
URL: 
http://svn.apache.org/viewvc/camel/trunk/etc/eclipse/addcheckstyle.xsl?rev=789121&r1=789120&r2=789121&view=diff
==============================================================================
--- camel/trunk/etc/eclipse/addcheckstyle.xsl (original)
+++ camel/trunk/etc/eclipse/addcheckstyle.xsl Sun Jun 28 16:34:52 2009
@@ -38,8 +38,8 @@
 
 
             <xsl:choose>
-                <xsl:when test="not(check-configuration/@name='ActiveMQ 
Checks')">
-                    <check-configuration name="ActiveMQ Checks" 
type="external" description="">
+                <xsl:when test="not(check-configuration/@name='Camel Checks')">
+                    <check-configuration name="Camel Checks" type="external" 
description="">
                         <xsl:attribute name="location"><xsl:value-of 
select="$checkstyleconfig"/></xsl:attribute>
                     </check-configuration>
                 </xsl:when>

Modified: camel/trunk/etc/eclipse/template.checkstyle-config.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/etc/eclipse/template.checkstyle-config.xml?rev=789121&r1=789120&r2=789121&view=diff
==============================================================================
--- camel/trunk/etc/eclipse/template.checkstyle-config.xml (original)
+++ camel/trunk/etc/eclipse/template.checkstyle-config.xml Sun Jun 28 16:34:52 
2009
@@ -18,7 +18,7 @@
   under the License.
 -->
 <checkstyle-configurations file-format-version="5.0.0">
-    <check-configuration name="ActiveMQ Checks" 
location="@CHECKSTYLE_CONFIG_FILE@" type="external" description="">
+    <check-configuration name="Camel Checks" 
location="@CHECKSTYLE_CONFIG_FILE@" type="external" description="">
         <property name="apache.header.file" value="@APACHE_HEADER_FILE@"/>
     </check-configuration>
 </checkstyle-configurations>

Modified: camel/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=789121&r1=789120&r2=789121&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Sun Jun 28 16:34:52 2009
@@ -871,55 +871,74 @@
     </dependencies>
   </dependencyManagement>
 
-  <profiles>
-    <profile>
-         <id>nochecks</id>
-          <activation>
-               <activeByDefault>true</activeByDefault>
-         </activation>
-         <properties>
-               <!--  pmd.skip>true</pmd.skip-->
-               <checkstyle.skip>true</checkstyle.skip>
-         </properties>
-    </profile>
-
-   <profile>
-       <!-- default profile enables checkstyle and Xlint stuff -->
-       <id>sourcecheck</id>    
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-checkstyle-plugin</artifactId>
-                               <dependencies>
-                                       <dependency>
-                                               
<groupId>org.apache.camel</groupId>
-                                               
<artifactId>camel-buildtools</artifactId>
-                                               
<version>${project.version}</version>                                           
-                                       </dependency>
-                               </dependencies>
-                               <executions>
-                                       <execution>
-                                               <id>validate</id>
-                                               <phase>validate</phase>
-                                               <configuration>
-                                                       
<configLocation>camel-checkstyle.xml</configLocation>
-                                                       
<consoleOutput>true</consoleOutput>
-                                                       
<failsOnError>true</failsOnError>
-                                                       
<linkXRef>false</linkXRef>
-                                                       
<suppressionsLocation>camel-checkstyle-suppressions.xml</suppressionsLocation>
-                                                       
<sourceDirectory>${basedir}/src</sourceDirectory>
-                                                       
<excludes>**/archetype-resources/**/*.java</excludes>
-                                               </configuration>
-                                               <goals>
-                                                       <goal>checkstyle</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
-        <reporting>
+  <build>
+    <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-eclipse-plugin</artifactId>
+                    <configuration>
+                        <buildcommands>
+                            
<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
+                            
<java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
+                            
<!--java.lang.String>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</java.lang.String-->
+                        </buildcommands>
+                        <projectnatures>
+                            <nature>org.eclipse.jdt.core.javanature</nature>
+                            
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+                            
<!--nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature-->
+                        </projectnatures>
+                        <additionalConfig>
+                            <file>
+                                <name>.checkstyle</name>
+                                <location>/camel-eclipse-checkstyle</location>
+                            </file>
+                            <!--file>
+                                <name>.pmd</name>
+                                <location>/cxf-eclipse-pmd</location>
+                            </file>
+                            <file>
+                                <name>.ruleset</name>
+                                <location>/cxf-pmd-ruleset.xml</location-->
+       
+                        </additionalConfig>
+                    </configuration>
+                </plugin>
+                
+               <plugin>
+                       <groupId>org.apache.maven.plugins</groupId>
+                       <artifactId>maven-checkstyle-plugin</artifactId>
+                       <dependencies>
+                               <dependency>
+                                       <groupId>org.apache.camel</groupId>
+                                       
<artifactId>camel-buildtools</artifactId>
+                                       <version>${project.version}</version>   
                                        
+                               </dependency>
+                       </dependencies>
+                       <executions>
+                               <execution>
+                                       <id>validate</id>
+                                       <phase>validate</phase>
+                                       <configuration>
+                                               
<configLocation>camel-checkstyle.xml</configLocation>
+                                               
<consoleOutput>true</consoleOutput>
+                                               
<failsOnError>true</failsOnError>
+                                               <linkXRef>false</linkXRef>
+                                               
<suppressionsLocation>camel-checkstyle-suppressions.xml</suppressionsLocation>
+                                               
<sourceDirectory>${basedir}/src</sourceDirectory>
+                                               
<excludes>**/archetype-resources/**/*.java</excludes>
+                                       </configuration>
+                                       <goals>
+                                               <goal>checkstyle</goal>
+                                       </goals>
+                               </execution>
+                       </executions>
+               </plugin>
+           </plugins>
+        </pluginManagement>
+      <defaultGoal>install</defaultGoal>
+  </build>
+  <reporting>
          <plugins>
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
@@ -936,7 +955,20 @@
             <artifactId>maven-checkstyle-plugin</artifactId>
           </plugin>
         </plugins>
-       </reporting>           
+    </reporting> 
+  <profiles>
+    <profile>
+         <id>nochecks</id>
+          <activation>
+               <activeByDefault>true</activeByDefault>
+         </activation>
+         <properties>
+               <!--  pmd.skip>true</pmd.skip-->
+               <checkstyle.skip>true</checkstyle.skip>
+         </properties>
+    </profile>
+    <profile>
+       <id>sourcecheck</id>       
     </profile>
   </profiles>
 

Modified: camel/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/pom.xml?rev=789121&r1=789120&r2=789121&view=diff
==============================================================================
--- camel/trunk/pom.xml (original)
+++ camel/trunk/pom.xml Sun Jun 28 16:34:52 2009
@@ -243,27 +243,13 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-eclipse-plugin</artifactId>
           <version>2.5.1</version>
-          <configuration>
-            <outputDirectory>${basedir}/eclipse-classes</outputDirectory>
-            <downloadSources>true</downloadSources>            
-
-            <!-- Eclipse update site for the Checkstyle plugin is 
http://eclipse-cs.sourceforge.net/update -->
-            <!-- Eclipse update site for the PMD plugin is 
http://pmd.sf.net/eclipse -->
-            <buildcommands>
-              
<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
-              
<java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
-              <!-- Lets not enable the PMD buidler just yet..
-              
<java.lang.String>net.sourceforge.pmd.runtime.pmdBuilder</java.lang.String>
-              -->
-            </buildcommands>
-            <projectnatures>
-              <nature>org.eclipse.jdt.core.javanature</nature>
-              
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
-              <!-- Lets not enable the PMD buidler just yet..
-              <nature>net.sourceforge.pmd.runtime.pmdNature</nature>
-              -->
-            </projectnatures>
-          </configuration>
+          <dependencies>
+             <dependency>
+                <groupId>org.apache.camel</groupId>
+                <artifactId>camel-buildtools</artifactId>
+                <version>${project.version}</version>
+             </dependency>
+          </dependencies>
         </plugin>
 
         <plugin>
@@ -411,9 +397,11 @@
                 <phase>process-test-sources</phase>
                 <goals>
                   <goal>add-maven-repo</goal>
+                  <goal>configure-workspace</goal>
                 </goals>
                 <configuration>
                   <workspace>${eclipse.workspace.dir}</workspace>
+                  
<workspaceCodeStylesURL>file:etc/eclipse/CamelCodeFormatter.xml</workspaceCodeStylesURL>
                 </configuration>
               </execution>
             </executions>
@@ -433,6 +421,11 @@
                 <artifactId>ant-trax</artifactId>
                 <version>1.6.5</version>
               </dependency>
+              <dependency>
+                <groupId>org.apache.camel</groupId>
+                <artifactId>camel-buildtools</artifactId>
+                <version>${project.version}</version>
+              </dependency>
             </dependencies>
             <executions>
               <execution>
@@ -444,35 +437,27 @@
                     <property name="full.eclipse.workspace" 
refid="ecp.ws.path" />
                     <path path="${basedir}/etc" id="etc.path" />
 
-                    <whichresource resource="/camel-eclipse-pmd" 
property="pmd.url">
-                      <classpath refid="etc.path" />
-                    </whichresource>
-                    <whichresource resource="/camel-pmd-ruleset.xml" 
property="pmdruleset.url">
-                      <classpath refid="etc.path" />
-                    </whichresource>
-                    <whichresource resource="/camel-eclipse-checkstyle" 
property="eclipse.checkstyle.url">
-                      <classpath refid="etc.path" />
-                    </whichresource>
-                    <whichresource resource="/camel-checkstyle.xml" 
property="checkstyle.url">
-                      <classpath refid="etc.path" />
-                    </whichresource>
+                    <whichresource resource="/camel-eclipse-pmd" 
property="pmd.url"/>
+                    <whichresource resource="/camel-pmd-ruleset.xml" 
property="pmdruleset.url"/>
+                    <whichresource resource="/camel-eclipse-checkstyle" 
property="eclipse.checkstyle.url"/>
+                    <whichresource resource="/camel-checkstyle.xml" 
property="checkstyle.url"/>
 
                     <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" />
+                    <get src="${checkstyle.url}" 
dest="${full.eclipse.workspace}/camel-checkstyle.xml" />
 
                     <!-- Add checkstyle config -->
                     <copy 
file="${basedir}/etc/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" />
+                        <filter token="CHECKSTYLE_CONFIG_FILE" 
value="${full.eclipse.workspace}/camel-checkstyle.xml" />
+                        <filter token="APACHE_HEADER_FILE" 
value="${full.eclipse.workspace}/apache-header.txt" />
                       </filterset>
                     </copy>
 
                     <xslt style="${basedir}/etc/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" />
+                      <param name="checkstyleconfig" 
expression="${full.eclipse.workspace}/camel-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" />
 
@@ -488,12 +473,12 @@
                     <concat 
destfile="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs"
 append="true" fixlastline="true">
                       <filelist dir="${basedir}/etc/eclipse" 
files="org.eclipse.jdt.core.prefs" />
                     </concat>
-                    <loadfile property="eclipse.code.format" 
srcFile="${basedir}/etc/eclipse/ActiveMQCodeFormatter.xml" />
+                    <loadfile property="eclipse.code.format" 
srcFile="${basedir}/etc/eclipse/CamelCodeFormatter.xml" />
                     <loadfile property="eclipse.code.templates" 
srcFile="${basedir}/etc/eclipse/codetemplates.xml" />
                     <loadfile property="eclipse.camel.java.code.templates" 
srcFile="${basedir}/etc/eclipse/camel_java_templates.xml" />
                     <loadfile property="eclipse.camel.xml.code.templates" 
srcFile="${basedir}/etc/eclipse/camel_xml_templates.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="formatter_profile" value="Camel 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}" />
                       


Reply via email to