Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Let discuss it in details

Manual

...

Setup

CXF contains all actual configuration files for checkstyle and PMD in buildtools project . You can install appropriate configurations manually using Eclipse Prefereneces/Checkstyle and Preferences/PMD dialogs.

Automated Maven

...

Setup

If you've done much Eclipse configuration, you know that pathnames are a pain. Relative pathnames
can't cross Eclipse projects. Anything you can wire up via classpath is easier than anything
wired by pathname.
Luckily for you, Dan Kulp did a ton of work to make this work. You can see it in CXF, and adapt it
to your own purposes.

Thus the following scheme.

1. A project to contain the common files.
CXF has a 'cxf-buildtools' project. It contains files for the tools. For each tool, there
are two files: the XML file that configures the tool (name ends with .xml), and the more-or-less
XML file that Eclipse knows how to read to configure the Eclipse plugin. These files all live
in src/main/resources. When the builttools project builds, it just copies them to target
and bundles them into a JAR file.

2. Maven plugins use the files.
The Maven plugins, of course, feed the same core XML files to the tools. By making the buildtools artifact
a dependency of the Maven checkstyle and PMD plugins, the files become available by classpath.
This happens in the parent POM (parent/pom.xml) so that it is set up for all of the projects.

3. Eclipse
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.

How to setup it step by step:
Step 1: Check out CXF projects on the root level
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:

...