cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r808109 - in /websites/production/cxf/content: cache/main.pageCache connecting-maven-eclipse-checkstyle-and-pmd.html
Date Sat, 10 Mar 2012 14:47:55 GMT
Author: buildbot
Date: Sat Mar 10 14:47:55 2012
New Revision: 808109

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/main.pageCache
    websites/production/cxf/content/connecting-maven-eclipse-checkstyle-and-pmd.html

Modified: websites/production/cxf/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/connecting-maven-eclipse-checkstyle-and-pmd.html
==============================================================================
--- websites/production/cxf/content/connecting-maven-eclipse-checkstyle-and-pmd.html (original)
+++ websites/production/cxf/content/connecting-maven-eclipse-checkstyle-and-pmd.html Sat Mar
10 14:47:55 2012
@@ -154,40 +154,64 @@ your rules.</p>
 
 <p>If you start looking at this, you will get a headache.</p>
 
-<p>Luckily for you, Dan Kulp did a ton of work to make this work. You can see it in
CXF, and adapt it<br clear="none">
-to your own purposes.</p>
+<p>Basically there are two ways to achive it:</p>
+<ol><li>Manual setup: manually configure Eclipse checkstyle and pmd in your workspace</li><li>Automated
maven setup: update Eclipse workspace automatically using maven profile</li></ol>
+
+
+<p>Let discuss it in details</p>
+
+<h5><a shape="rect" name="ConnectingMaven%2CEclipse%2CCheckstyle%2CandPMD-ManualSetup"></a>Manual
Setup</h5>
+<p>CXF contains all actual configuration files for checkstyle and PMD in <a shape="rect"
class="external-link" href="http://svn.apache.org/repos/asf/cxf/build-utils/trunk/buildtools">buildtools
project </a>. You can install appropriate configurations manually using Eclipse Prefereneces/Checkstyle
and Preferences/PMD dialogs.</p>
 
+<h5><a shape="rect" name="ConnectingMaven%2CEclipse%2CCheckstyle%2CandPMD-AutomatedMavenSetup"></a>Automated
Maven Setup</h5>
 <p>If you've done much Eclipse configuration, you know that pathnames are a pain. Relative
pathnames<br clear="none">
 can't cross Eclipse projects. Anything you can wire up via classpath is easier than anything
<br clear="none">
-wired by pathname. Thus the following scheme.</p>
+wired by pathname. <br clear="none">
+Luckily for you, Dan Kulp did a ton of work to make this work. You can see it in CXF, and
adapt it<br clear="none">
+to your own purposes.</p>
 
-<p>Step 1: A project to contain the common files.</p>
+<p>Thus the following scheme.</p>
 
-<p>CXF has a 'cxf-buildtools' project. It contains files for the tools. For each tool,
there<br clear="none">
+<p>1. A project to contain the common files.<br clear="none">
+CXF has a 'cxf-buildtools' project. It contains files for the tools. For each tool, there<br
clear="none">
 are two files: the XML file that configures the tool (name ends with .xml), and the more-or-less<br
clear="none">
 XML file that Eclipse knows how to read to configure the Eclipse plugin. These files all
live<br clear="none">
 in src/main/resources. When the builttools project builds, it just copies them to target<br
clear="none">
 and bundles them into a JAR file.</p>
 
-<p>Step 2: Maven plugins use the files.</p>
-
-<p>The Maven plugins, of course, feed the same core XML files to the tools. By making
the buildtools artifact<br clear="none">
+<p>2. Maven plugins use the files.<br clear="none">
+The Maven plugins, of course, feed the same core XML files to the tools. By making the buildtools
artifact<br clear="none">
 a dependency of the Maven checkstyle and PMD plugins, the files become available by classpath.<br
clear="none">
 This happens in the parent POM (parent/pom.xml) so that it is set up for all of the projects.</p>
 
-<p>Step 3: Eclipse</p>
-
-<p>Eclipse is configured via a collection of files that live in the<br clear="none">
-.settings directories of the workspace and the individual<br clear="none">
-projects. Each plugin defines the format of its settings. None of them<br clear="none">
-are documented: it's all reverse engineering.</p>
-
-<p>In the top level POM, there is a profile called 'setup.eclipse'. It<br clear="none">
-uses a combination of ant, xslt, and the 'copy' task to create all of the desired settings
files.<br clear="none">
-Some of them are created by copying or modifying templates in etc/eclipse.</p>
+<p>3. Eclipse.<br clear="none">
+Eclipse is configured via a collection of files that live in the .settings directories of
the workspace and the individual projects. Each plugin defines the format of its settings.
None of them are documented: it's all reverse engineering.</p>
 
-<p>Eventually, setup.eclipse runs the Maven eclipse:eclipse goal to do the vanilla
work<br clear="none">
-of creating .classpath and .project files for each of the projects.</p></div>
+<p>How to setup it step by step:<br clear="none">
+Step 1: Check out CXF projects on the root level.<br clear="none">
+Step 2: Create your Eclipse workspace. By default maven plugin assumes that workspace is
located in ../workspace relative to root CXF source directory. To customize it, just add following
xml fragment into your maven settings.xml:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+  <span class="code-tag">&lt;profiles&gt;</span>
+    <span class="code-tag">&lt;profile&gt;</span>
+      <span class="code-tag">&lt;id&gt;</span>extra<span class="code-tag">&lt;/id&gt;</span>
+        <span class="code-tag">&lt;properties&gt;</span>
+          <span class="code-tag">&lt;gpg.useagent&gt;</span>true<span
class="code-tag">&lt;/gpg.useagent&gt;</span>
+	  <span class="code-tag">&lt;eclipse.workspace&gt;</span>ECLIPSE_WORKSPACE_NAME<span
class="code-tag">&lt;/eclipse.workspace&gt;</span>
+	  <span class="code-tag">&lt;downloadSources&gt;</span>true<span
class="code-tag">&lt;/downloadSources&gt;</span>
+	  <span class="code-tag">&lt;eclipse.workspace.dir&gt;</span>ECLIPSE_WORKSPACE_PATH<span
class="code-tag">&lt;/eclipse.workspace.dir&gt;</span>
+	  <span class="code-tag">&lt;eclipse.output.directory&gt;</span>${project.build.outputDirectory}<span
class="code-tag">&lt;/eclipse.output.directory&gt;</span>
+	<span class="code-tag">&lt;/properties&gt;</span>
+    <span class="code-tag">&lt;/profile&gt;</span>
+...
+  <span class="code-tag">&lt;/profiles&gt;</span>
+</pre>
+</div></div>
+
+<p>Step 3: Run 'setup.eclipse' maven profile from CXF root source folder.<br clear="none">
+The 'setup.eclipse' profile uses a combination of ant, xslt, and the 'copy' task to create
all of the desired settings files. Some of them are created by copying or modifying templates
in etc/eclipse.<br clear="none">
+Running this profile from root CXF level will update your Eclipse workspace with necessary
settings. If workspace was updated, you will be able to see cxf-checkstyle.xml and cxf-checkstyle-corba.xml
files in root workspace directory.<br clear="none">
+Once it happens, it will be enough to import CXF projects generated using eclipse:eclipse
or m2e plugin into workspace. Checkstyle and PMD will be automatically activated.</p></div>
            </div>
            <!-- Content -->
          </td>



Mime
View raw message