You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by ko...@apache.org on 2015/04/24 00:12:53 UTC

[08/17] cayenne git commit: add maven reporting plugins

add maven reporting plugins

checkstyle, pmd, findbugs
clirr - report about broken backward compatibility api


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/31d59e0c
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/31d59e0c
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/31d59e0c

Branch: refs/heads/master
Commit: 31d59e0c4aa8af61935413984a452f1788105187
Parents: 5eff639
Author: alexkolonitsky <Al...@gmail.com>
Authored: Thu Oct 9 20:04:47 2014 +0300
Committer: alexkolonitsky <Al...@gmail.com>
Committed: Thu Oct 9 20:04:47 2014 +0300

----------------------------------------------------------------------
 build-tools/cayenne-checkers/pom.xml            |  52 ++
 .../src/main/resources/cayenne-checkstyle.xml   |  96 +++
 .../src/main/resources/cayenne-pmd.xml          | 363 ++++++++++
 .../main/resources/cayenne-tests-checkstyle.xml |  99 +++
 .../src/main/resources/cayenne-tests-pmd.xml    | 662 +++++++++++++++++++
 build-tools/pom.xml                             |   1 +
 cayenne-client/pom.xml                          |  11 +-
 cayenne-crypto/pom.xml                          |  11 +-
 cayenne-di/pom.xml                              |  11 +-
 cayenne-lifecycle/pom.xml                       |  11 +-
 cayenne-project/pom.xml                         |  11 +-
 .../cayenne-checkstyle-suppression.xml          |  45 ++
 cayenne-server/pom.xml                          |  32 +-
 cayenne-tools/pom.xml                           |  11 +-
 modeler/cayenne-modeler-generic-ext/pom.xml     |  14 +
 modeler/cayenne-modeler-generic/pom.xml         |  14 +
 modeler/cayenne-modeler-mac-ext/pom.xml         |  14 +
 modeler/cayenne-modeler-mac-legacy/pom.xml      |  14 +
 modeler/cayenne-modeler-mac/pom.xml             |  14 +
 modeler/cayenne-modeler-win/pom.xml             |   9 +
 modeler/cayenne-modeler/pom.xml                 |  14 +
 modeler/cayenne-wocompat/pom.xml                |  14 +
 plugins/maven-cayenne-modeler-plugin/pom.xml    |  14 +
 plugins/maven-cayenne-plugin/pom.xml            |  14 +
 pom.xml                                         | 160 ++++-
 25 files changed, 1702 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/build-tools/cayenne-checkers/pom.xml
----------------------------------------------------------------------
diff --git a/build-tools/cayenne-checkers/pom.xml b/build-tools/cayenne-checkers/pom.xml
new file mode 100644
index 0000000..9f19b09
--- /dev/null
+++ b/build-tools/cayenne-checkers/pom.xml
@@ -0,0 +1,52 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.cayenne.build-tools</groupId>
+        <artifactId>build-tools-parent</artifactId>
+        <version>3.2.M2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>cayenne-checkers</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Cayenne Code Checkers</name>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/build-tools/cayenne-checkers/src/main/resources/cayenne-checkstyle.xml
----------------------------------------------------------------------
diff --git a/build-tools/cayenne-checkers/src/main/resources/cayenne-checkstyle.xml b/build-tools/cayenne-checkers/src/main/resources/cayenne-checkstyle.xml
new file mode 100644
index 0000000..269ff41
--- /dev/null
+++ b/build-tools/cayenne-checkers/src/main/resources/cayenne-checkstyle.xml
@@ -0,0 +1,96 @@
+<?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.
+  -->
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+        "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"><!-- Generated by Sonar -->
+<module name="Checker">
+    <module name="SuppressionCommentFilter"/>
+    <module name="TreeWalker">
+        <module name="FileContentsHolder"/>
+        <module name="CyclomaticComplexity">
+            <property name="severity" value="error"/>
+            <property name="max" value="15"/>
+        </module>
+        <module name="MethodLength">
+            <property name="severity" value="warning"/>
+            <property name="max" value="200"/>
+        </module>
+        <module name="IllegalCatch">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="DoubleCheckedLocking">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="FallThrough">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="EqualsHashCode">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="MissingSwitchDefault">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="ExecutableStatementCount">
+            <property name="severity" value="error"/>
+        </module>
+        <module name="CovariantEquals">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="VisibilityModifier">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="ConstantName">
+            <property name="severity" value="info"/>
+            <property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|logger|log)$"/>
+        </module>
+        <module name="IllegalThrows">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="ArrayTypeStyle">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="LeftCurly">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="AnonInnerLength">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="EqualsAvoidNull">
+            <property name="severity" value="warning"/>
+            <property name="ignoreEqualsIgnoreCase" value="false"/>
+        </module>
+        <module name="DeclarationOrder">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="AvoidNestedBlocks">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="MissingDeprecated">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="DefaultComesLast">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="BooleanExpressionComplexity">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="EmptyBlock">
+            <property name="severity" value="warning"/>
+        </module>
+    </module>
+</module>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/build-tools/cayenne-checkers/src/main/resources/cayenne-pmd.xml
----------------------------------------------------------------------
diff --git a/build-tools/cayenne-checkers/src/main/resources/cayenne-pmd.xml b/build-tools/cayenne-checkers/src/main/resources/cayenne-pmd.xml
new file mode 100644
index 0000000..04c88c2
--- /dev/null
+++ b/build-tools/cayenne-checkers/src/main/resources/cayenne-pmd.xml
@@ -0,0 +1,363 @@
+<?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.
+  -->
+<ruleset>
+<!--
+  <rule ref="rulesets/java/optimizations.xml/AvoidArrayLoops">
+    <priority>3</priority>
+  </rule>
+-->
+  <rule ref="rulesets/java/basic.xml/BooleanInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/logging-java.xml/LoggerIsNotStaticFinal">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AbstractClassWithoutAbstractMethod">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AbstractClassWithoutAnyMethod">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AvoidProtectedFieldInFinalClass">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidThrowingRawExceptionTypes">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
+    <priority>2</priority>
+    <properties>
+      <property name="reportLevel" value="15" />
+    </properties>
+  </rule>
+  <rule ref="rulesets/java/controversial.xml/DoNotCallGarbageCollectionExplicitly">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyCatchBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyFinallyBlock">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyIfStmt">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/codesize.xml/ExcessiveClassLength">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/codesize.xml/ExcessiveParameterList">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/codesize.xml/ExcessivePublicCount">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/migrating.xml/AvoidEnumAsIdentifier">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidCatchingNPE">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidCatchingThrowable">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/AvoidUsingHardCodedIP">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/BrokenNullCheck">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/ClassCastExceptionWithToArray">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/j2ee.xml/DoNotCallSystemExit">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/DoNotExtendJavaLangError">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/DoNotThrowExceptionInFinally">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/finalizers.xml/AvoidCallingFinalize">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AvoidDeeplyNestedIfStmts">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/controversial.xml/AvoidFinalLocalVariable">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNullPointerException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/naming.xml/BooleanGetMethodName">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/controversial.xml/DefaultPackage">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/java/naming.xml/ClassNamingConventions">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/naming.xml/MethodNamingConventions">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/naming.xml/MethodWithSameNameAsEnclosingClass">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/naming.xml/ShortMethodName">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/naming.xml/PackageCase">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/braces.xml/WhileLoopsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AvoidInstanceofChecksInCatchClause">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/AvoidMultipleUnaryOperators">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/braces.xml/ForLoopsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/braces.xml/IfElseStmtsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/braces.xml/IfStmtsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/codesize.xml/TooManyMethods">
+    <priority>3</priority>
+    <properties>
+      <property name="maxmethods" value="30" />
+    </properties>
+  </rule>
+  <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/migrating.xml/ByteInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/migrating.xml/LongInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/migrating.xml/ShortInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptySynchronizedBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyWhileStmt">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/EqualsNull">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/MisplacedNullCheck">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/MissingBreakInSwitch">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/UnconditionalIfStatement">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/j2ee.xml/UseProperClassLoader">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/UselessOperationOnImmutable">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/logging-jakarta-commons.xml/GuardDebugLogging">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/logging-java.xml/MoreThanOneLogger">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AssignmentToNonFinalStatic">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AvoidConstantsInterface">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidRethrowingException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/PreserveStackTrace">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/logging-java.xml/SystemPrintln">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/controversial.xml/AssignmentInOperand">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/optimizations.xml/AddEmptyString">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/OverrideBothEqualsAndHashcode">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/naming.xml/SuspiciousEqualsMethodName">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strings.xml/AvoidStringBufferField">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/java/controversial.xml/AvoidUsingShortType">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/java/javabeans.xml/MissingSerialVersionUID">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/controversial.xml/NullAssignment">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/ReturnEmptyArrayRatherThanNull">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/java/sunsecure.xml/MethodReturnsInternalArray">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/clone.xml/ProperCloneImplementation">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/AvoidThreadGroup">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidCatchingGenericException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidLosingExceptionInformation">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/BadComparison">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyInitializer">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/CompareObjectsWithEquals">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyStatementNotInLoop">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/EmptyMethodInAbstractClassShouldBeAbstract">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyTryBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strings.xml/StringToString">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/optimizations.xml/UseArrayListInsteadOfVector">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/optimizations.xml/UseStringBufferForStringAppends">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/UnnecessaryLocalBeforeReturn">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/optimizations.xml/AvoidInstantiatingObjectsInLoops">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/imports.xml/DontImportJavaLang">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/controversial.xml/DontImportSun">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/UseCollectionIsEmpty">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/strings.xml/UselessStringValueOf">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/java/clone.xml/CloneThrowsCloneNotSupportedException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/CloseResource">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/j2ee.xml/DoNotUseThreads">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/DoubleCheckedLocking">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/AvoidSynchronizedAtMethodLevel">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/AvoidUsingOctalValues">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/design.xml/DefaultLabelNotLastInSwitchStmt">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptySwitchStatements">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/EmptyStaticInitializer">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/finalizers.xml/EmptyFinalizer">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/ExceptionAsFlowControl">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/finalizers.xml/FinalizeOnlyCallsSuperFinalize">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/finalizers.xml/FinalizeDoesNotCallSuperFinalize">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/finalizers.xml/FinalizeOverloaded">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/finalizers.xml/FinalizeShouldBeProtected">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strings.xml/InefficientEmptyStringCheck">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/basic.xml/ReturnFromFinallyBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNewInstanceOfSameException">
+    <priority>3</priority>
+  </rule>
+</ruleset>
+

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-checkstyle.xml
----------------------------------------------------------------------
diff --git a/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-checkstyle.xml b/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-checkstyle.xml
new file mode 100644
index 0000000..249fd4b
--- /dev/null
+++ b/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-checkstyle.xml
@@ -0,0 +1,99 @@
+<?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.
+  -->
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+        "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"><!-- Generated by Sonar -->
+<module name="Checker">
+    <module name="SuppressionCommentFilter"/>
+    <module name="TreeWalker">
+        <module name="FileContentsHolder"/>
+        <module name="CyclomaticComplexity">
+            <property name="severity" value="error"/>
+            <property name="max" value="15"/>
+        </module>
+        <module name="MethodLength">
+            <property name="severity" value="warning"/>
+            <property name="max" value="200"/>
+        </module>
+        <module name="DoubleCheckedLocking">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="FallThrough">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="EqualsHashCode">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="CovariantEquals">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="VisibilityModifier">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="ConstantName">
+            <property name="severity" value="info"/>
+            <property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|logger|log)$"/>
+        </module>
+        <module name="IllegalThrows">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="ArrayTypeStyle">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="LeftCurly">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="AnonInnerLength">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="com.exigen.ipb.rules.checkstyle.javadoc.PublicApiJavadocMethodCheck">
+            <property name="severity" value="warning"/>
+            <property name="allowMissingPropertyJavadoc" value="true"/>
+            <property name="suppressLoadErrors" value="true"/>
+            <property name="checkOnlyInterfaces" value="true"/>
+        </module>
+        <module name="EqualsAvoidNull">
+            <property name="severity" value="warning"/>
+            <property name="ignoreEqualsIgnoreCase" value="false"/>
+        </module>
+        <module name="DeclarationOrder">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="AvoidNestedBlocks">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="com.exigen.ipb.rules.checkstyle.javadoc.PublicApiJavadocStyleCheck">
+            <property name="severity" value="warning"/>
+            <property name="checkFirstSentence" value="false"/>
+            <property name="checkEmptyJavadoc" value="true"/>
+            <property name="checkOnlyInterfaces" value="true"/>
+        </module>
+        <module name="MissingDeprecated">
+            <property name="severity" value="info"/>
+        </module>
+        <module name="DefaultComesLast">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="BooleanExpressionComplexity">
+            <property name="severity" value="warning"/>
+        </module>
+        <module name="EmptyBlock">
+            <property name="severity" value="warning"/>
+        </module>
+    </module>
+</module>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-pmd.xml
----------------------------------------------------------------------
diff --git a/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-pmd.xml b/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-pmd.xml
new file mode 100644
index 0000000..4e0f8f4
--- /dev/null
+++ b/build-tools/cayenne-checkers/src/main/resources/cayenne-tests-pmd.xml
@@ -0,0 +1,662 @@
+<?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.
+  -->
+<ruleset>
+  <rule ref="rulesets/optimizations.xml/AvoidArrayLoops">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/BooleanInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AbstractClassWithoutAnyMethod">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/codesize.xml/CyclomaticComplexity">
+    <priority>2</priority>
+    <properties>
+      <property name="reportLevel" value="15" />
+    </properties>
+  </rule>
+  <rule ref="rulesets/controversial.xml/DoNotCallGarbageCollectionExplicitly">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyCatchBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyFinallyBlock">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyIfStmt">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/codesize.xml/ExcessiveClassLength">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/codesize.xml/ExcessiveParameterList">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/codesize.xml/ExcessivePublicCount">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/migrating.xml/AvoidEnumAsIdentifier">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidCatchingNPE">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/AvoidUsingHardCodedIP">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/BrokenNullCheck">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/ClassCastExceptionWithToArray">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/j2ee.xml/DoNotCallSystemExit">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/DoNotExtendJavaLangError">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/DoNotThrowExceptionInFinally">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/finalizers.xml/AvoidCallingFinalize">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/controversial.xml/AvoidFinalLocalVariable">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/naming.xml/BooleanGetMethodName">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/controversial.xml/DefaultPackage">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/naming.xml/ClassNamingConventions">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/naming.xml/MethodNamingConventions">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/naming.xml/ShortMethodName">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/naming.xml/PackageCase">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/AvoidMultipleUnaryOperators">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/braces.xml/ForLoopsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/braces.xml/IfStmtsMustUseBraces">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/codesize.xml/TooManyMethods">
+    <priority>3</priority>
+    <properties>
+      <property name="maxmethods" value="30" />
+    </properties>
+  </rule>
+  <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/unusedcode.xml/UnusedPrivateField">
+    <priority>4</priority>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Avoid Calendar.getInstance use DateUtils" name="XPathRule_1303219869">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//Expression[PrimaryExpression/PrimaryPrefix/Name[@Image = 'Calendar.getInstance']]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule ref="rulesets/migrating.xml/ByteInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/migrating.xml/LongInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/migrating.xml/ShortInstantiation">
+    <priority>1</priority>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Deleting root entity should cause deletion of related child entities." name="EIS coding rules-CascadeDelete">
+    <priority>5</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[
+                  Annotation/*/
+                       MemberValuePairs/MemberValuePair['cascade']/*/*/*/Name/@Image='CascadeType.ALL'
+                  and not(
+                        Annotation/*[
+                               Name/@Image='Cascade'
+                         and
+                               ends-with(MemberValue/*/*/Name/@Image,'DELETE_ORPHAN')
+                        ]
+                  )
+            ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Force to specify Association Table for ManyToMany" name="EIS coding rules-AssociationTableShouldExistsForManyToMany">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[
+                (  
+                    ../../../../TypeDeclaration/*/*/Name/@Image='Entity'
+                or
+                    ../../../../TypeDeclaration/*/*/Name/@Image='MappedSuperclass'
+                or
+                    ../../../../TypeDeclaration/*/*/Name/@Image='Embeddable'
+                )
+                and Annotation/*/Name/@Image='ManyToMany'
+                and not(Annotation/*/Name/@Image='JoinTable')
+            ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Force to specify FetchType for Object Graph Loading" name="EIS coding rules-ObjectGraphLoading">
+    <priority>5</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[
+                (  
+                    ../../../../TypeDeclaration/*/*/Name/@Image='Entity'
+                or
+                    ../../../../TypeDeclaration/*/*/Name/@Image='MappedSuperclass'
+                or
+                    ../../../../TypeDeclaration/*/*/Name/@Image='Embeddable'
+                )
+                 and (Annotation/*/Name[ends-with(@Image,'ToMany') or starts-with(@Image,'ManyTo')]
+                )
+                and not(Annotation/*/MemberValuePairs/MemberValuePair['fetch']/*/*/*/Name/@Image='FetchType.EAGER')
+            ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Force to create foreign key for associations." name="EIS coding rules-FKConstraintShouldBeSpecified">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[Annotation/*/Name
+                  [@Image='OneToOne' or ends-with(@Image,'ToMany') or starts-with(@Image,'ManyTo')]
+                  and                 
+                   not(Annotation/*[(Name/@Image='ForeignKey'
+                    and 
+                    MemberValuePairs/MemberValuePair['name']/*/*/*/Literal[starts-with(@Image,'"FK_') and (string-length(@Image))<=32])
+                    ])
+            ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Prevent of mixed JPA annotations declaration (both on fields and methods)." name="EIS coding rules-JPAAnnotationsShouldBeDefinedOnFields">
+    <priority>5</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[
+                (  
+                    ../../../../TypeDeclaration/*/*/Name/@Image='Entity'
+                or
+                    ../../../../TypeDeclaration/*/*/Name/@Image='MappedSuperclass'
+                or
+                    ../../../../TypeDeclaration/*/*/Name/@Image='Embeddable'
+                )
+                and
+                (starts-with(MethodDeclaration/MethodDeclarator/@Image,'get')
+                or
+                starts-with(MethodDeclaration/MethodDeclarator/@Image,'set'))
+                and 
+                Annotation/*/Name[
+                    @Image = 'Id' or
+                    @Image = 'Colum' or
+                    @Image = 'Version' or
+                    @Image = 'Transient' or
+                    @Image = 'Enumerated' or
+                    @Image = 'Basic' or
+                    @Image = 'AttributeOverrides' or
+                    @Image = 'AttributeOverride' or
+                    @Image = 'EmbeddedId' or
+                    @Image = 'Embedded' or
+                    @Image = 'Id' or
+                    @Image = 'GeneratedValue' or
+                    @Image = 'JoinTable' or
+                    @Image = 'JoinColumn' or
+                    @Image = 'JoinColumns' or
+                    @Image = 'AssociationOverrides' or
+                    @Image = 'AssociationOverride' or
+                    @Image = 'OneToOne' or
+                    @Image = 'OneToMany' or
+                    @Image = 'ManyToOne' or
+                    @Image = 'ManyToMany' or
+                    @Image = 'MapKay' or
+                    @Image = 'OrderBy' or
+                    @Image = 'SequenceGenerator' or
+                    @Image = 'TableGenerator' or
+                    @Image = 'TableGenerator' or
+                    @Image = 'PrimaryKeyJoinColumns' or
+                    @Image = 'PrimaryKeyJoinColumn' or
+                    @Image = 'PersistenceUnits' or
+                    @Image = 'PersistenceUnit'
+                ]
+            ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Do NOT use System.currentTimeMillis, instead use DateUtils" name="XPathRule_1303290639">
+    <priority>5</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//PrimaryExpression[PrimaryPrefix/Name[@Image = 'System.currentTimeMillis']]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Prevent use of use Locale.getDefault()" name="EIS coding rules-DoNotUseLocaleGetDefault">
+    <priority>1</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//PrimaryExpression//Name[@Image='Locale.getDefault']]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Prevent use of EnumType.ORDINAL" name="EIS coding rules-EnumShoulBePersistedAsStrings">
+    <priority>1</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[
+                    Annotation[
+                         */Name/@Image='Enumerated'  
+                    and
+                    not((
+                    NormalAnnotation[
+                             MemberValuePairs/MemberValuePair['value']/MemberValue/PrimaryExpression/PrimaryPrefix/Name/@Image='EnumType.STRING']
+                    or 
+                    SingleMemberAnnotation[
+                             MemberValue/PrimaryExpression/PrimaryPrefix/Name/@Image='EnumType.STRING'])
+                    )]
+                ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Force to specify length for string columns." name="EIS coding rules-DefineLengthForString">
+    <priority>5</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[
+            (  
+                ../../../../TypeDeclaration/*/*/Name/@Image='Entity'
+            or
+                ../../../../TypeDeclaration/*/*/Name/@Image='MappedSuperclass'
+            or
+                ../../../../TypeDeclaration/*/*/Name/@Image='Embeddable'
+            )
+            and
+            FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType/@Image='String'
+            and 
+            (not (Annotation/*/Name/@Image='Column') 
+                or                
+                (Annotation/*/Name/@Image='Column' 
+                 and
+                 not (Annotation/*/MemberValuePairs/MemberValuePair['length']))
+            )
+            ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Force Entities to inherit BaseEntity." name="EIS coding rules-DomainShouldInheritBaseEntity">
+    <priority>5</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//TypeDeclaration[
+                    (Annotation/*/Name/@Image='Entity')    
+                and 	
+                count(ClassOrInterfaceDeclaration/ExtendsList) = 0
+                ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Force to specify @IndexColum annotation for List type collections." name="EIS coding rules-IndexColumnForListShouldPresent">
+    <priority>5</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//ClassOrInterfaceBodyDeclaration[
+                        FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType/@Image='List'
+                        and not(
+                            Annotation/*/Name/@Image='IndexColumn'
+                        )                        
+                        and not(
+                            Annotation/*/Name/@Image='Transient'
+                        )
+                        and(  
+                            ../../../../TypeDeclaration/Annotation/*/Name/@Image='Entity'
+                        or
+                            ../../../../TypeDeclaration/Annotation/*/Name/@Image='MappedSuperclass'
+                        or
+                            ../../../../TypeDeclaration/Annotation/*/Name/@Image='Embeddable'
+                        )
+                    ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Prevent use of use primitives in domain." name="EIS coding rules-DoNotUsePrimitivesForDomainModel">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//FieldDeclaration[
+                    (@Static='false')
+                    and Type/PrimitiveType
+                    and(  
+                        ../../../../../TypeDeclaration/*/*/Name/@Image='Entity'
+                    or
+                        ../../../../../TypeDeclaration/*/*/Name/@Image='MappedSuperclass'
+                    or
+                        ../../../../../TypeDeclaration/*/*/Name/@Image='Embeddable'
+                    )
+                ]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptySynchronizedBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyWhileStmt">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/EqualsNull">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/MisplacedNullCheck">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/MissingBreakInSwitch">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/UnconditionalIfStatement">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/j2ee.xml/UseProperClassLoader">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/UselessOperationOnImmutable">
+    <priority>1</priority>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Prevent of declaration @Transactional annotation on java intefaces and classes." name="EIS coding rules-TransactionalAllowedOnlyOnMethod">
+    <priority>1</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//TypeDeclaration/Annotation[*/Name[@Image='Transactional']  and ../ClassOrInterfaceDeclaration[@Public='true' and @Interface='true' and @Static='false']]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule ref="rulesets/logging-jakarta-commons.xml/GuardDebugLogging">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/logging-java.xml/MoreThanOneLogger">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AssignmentToNonFinalStatic">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AvoidConstantsInterface">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidRethrowingException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/logging-java.xml/SystemPrintln">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/controversial.xml/AssignmentInOperand">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/optimizations.xml/AddEmptyString">
+    <priority>1</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/naming.xml/SuspiciousEqualsMethodName">
+    <priority>3</priority>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Force to change toDateMidnight() to toDateTimeAtStartOfDay()" name="EIS coding rules-PreventUsingToDateMidnightMethod">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[(
+				//PrimaryPrefix[ends-with(Name/@Image, "toDateMidnight")]
+				|
+				//PrimarySuffix[ends-with(@Image, "toDateMidnight")]
+			)[//ImportDeclaration/Name[@Image='org.joda.time.LocalDate'] or //ImportDeclaration/Name[@Image='org.joda.time']]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Do not use org.joda.time.LocalDate.toDateMidnight() use instead org.joda.time.LocalDate.toDateTimeAtStartOfDay()" name="EIS coding rules-AvoidUsingLocalDateToMidnight">
+    <priority>2</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//TypeDeclaration/ClassOrInterfaceDeclaration//*[contains(@Image, 'toDateMidnight')]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Avoid new Date() instead use DateUtils" name="EIS coding rules-AvoidUseNewDate">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//Expression[PrimaryExpression/PrimaryPrefix/AllocationExpression/ClassOrInterfaceType[@Image = 'Date']]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Don't use org.apache.log4j.Logger import, use slf4j+logback." name="EIS coding rules - log4j is replaced by logback slf4j+logback">
+    <priority>1</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[ImportDeclaration/Name[@Image='org.apache.log4j.Logger']]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule ref="rulesets/strings.xml/AvoidStringBufferField">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/controversial.xml/AvoidUsingShortType">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/javabeans.xml/MissingSerialVersionUID">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/controversial.xml/NullAssignment">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/ReturnEmptyArrayRatherThanNull">
+    <priority>5</priority>
+  </rule>
+  <rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/clone.xml/ProperCloneImplementation">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/AvoidThreadGroup">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidCatchingGenericException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidLosingExceptionInformation">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/BadComparison">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyInitializer">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/CompareObjectsWithEquals">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/EmptyMethodInAbstractClassShouldBeAbstract">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyTryBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strings.xml/StringToString">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/imports.xml/DontImportJavaLang">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/controversial.xml/DontImportSun">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/UseCollectionIsEmpty">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/strings.xml/UselessStringValueOf">
+    <priority>4</priority>
+  </rule>
+  <rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/CloseResource">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/j2ee.xml/DoNotUseThreads">
+    <priority>3</priority>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Prevent use of Calendar.getInstance()" name="EIS coding rules-AvoidUsingCalendarGetInstance">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//Expression[PrimaryExpression/PrimaryPrefix/Name[@Image = 'Calendar.getInstance']]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule class="net.sourceforge.pmd.rules.XPathRule" message="Do not use System.currentTimeMillis() use instead exigen com.exigen.ipb.base.datatypes.DateUtils class methods." name="EIS coding rules-AvoidSystemCurrebtTimeMillis">
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[//PrimaryExpression[PrimaryPrefix/Name[@Image = 'System.currentTimeMillis']]]]></value>
+      </property>
+    </properties>
+  </rule>
+  <rule ref="rulesets/basic.xml/DoubleCheckedLocking">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/AvoidUsingOctalValues">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptySwitchStatements">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/EmptyStaticInitializer">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/finalizers.xml/EmptyFinalizer">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/finalizers.xml/FinalizeOverloaded">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strings.xml/InefficientEmptyStringCheck">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock">
+    <priority>3</priority>
+  </rule>
+  <rule ref="rulesets/strictexception.xml/AvoidThrowingNewInstanceOfSameException">
+    <priority>3</priority>
+  </rule>
+</ruleset>
+

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/build-tools/pom.xml b/build-tools/pom.xml
index ec6c5ef..194b652 100644
--- a/build-tools/pom.xml
+++ b/build-tools/pom.xml
@@ -36,6 +36,7 @@
 	<modules>
 		<module>cayenne-legal</module>
 		<module>cayenne-test-utilities</module>
+        <module>cayenne-checkers</module>
 	</modules>
 
 	<build>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-client/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-client/pom.xml b/cayenne-client/pom.xml
index f4da6ea..103790a 100644
--- a/cayenne-client/pom.xml
+++ b/cayenne-client/pom.xml
@@ -88,6 +88,15 @@
 					</execution>
 				</executions>
 			</plugin>
-		</plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-crypto/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-crypto/pom.xml b/cayenne-crypto/pom.xml
index dfee666..d7b599d 100644
--- a/cayenne-crypto/pom.xml
+++ b/cayenne-crypto/pom.xml
@@ -83,6 +83,15 @@
 					</execution>
 				</executions>
 			</plugin>
-		</plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-di/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-di/pom.xml b/cayenne-di/pom.xml
index 440face..eb6e2cd 100644
--- a/cayenne-di/pom.xml
+++ b/cayenne-di/pom.xml
@@ -62,6 +62,15 @@
 					</execution>
 				</executions>
 			</plugin>
-		</plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-lifecycle/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/pom.xml b/cayenne-lifecycle/pom.xml
index 863c934..85aecee 100644
--- a/cayenne-lifecycle/pom.xml
+++ b/cayenne-lifecycle/pom.xml
@@ -71,6 +71,15 @@
 					</execution>
 				</executions>
 			</plugin>
-		</plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-project/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-project/pom.xml b/cayenne-project/pom.xml
index a3a1996..c04f02b 100644
--- a/cayenne-project/pom.xml
+++ b/cayenne-project/pom.xml
@@ -66,6 +66,15 @@
 					</execution>
 				</executions>
 			</plugin>
-		</plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-server/cayenne-checkstyle-suppression.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/cayenne-checkstyle-suppression.xml b/cayenne-server/cayenne-checkstyle-suppression.xml
new file mode 100644
index 0000000..2c8bb34
--- /dev/null
+++ b/cayenne-server/cayenne-checkstyle-suppression.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+  -->
+<!DOCTYPE suppressions PUBLIC
+        "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+        "suppressions_1_1.dtd">
+
+<suppressions>
+    <!-- Suppress all checkstyle for autogenerated javacc package -->
+    <suppress checks=".*" files="org.apache.cayenne.ejbql.parser.*"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.ExpressionParserTreeConstants.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.JavaCharStream.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.JJTExpressionParserState.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.ParseException.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.Token.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.TokenMgrError.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.ExpressionParser.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.ExpressionParserConstants.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.ExpressionParserTokenManager.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.exp.parser.SimpleNode.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.wocompat.parser.ParseException.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.wocompat.parser.Parser.java.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.wocompat.parser.ParserConstants.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.wocompat.parser.ParserTokenManager.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.wocompat.parser.SimpleCharStream.java"/>
+    <suppress checks=".*" files="org.apache.cayenne.wocompat.parser.TokenMgrError.java"/>
+
+</suppressions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-server/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/pom.xml b/cayenne-server/pom.xml
index dfc7fb2..80b83dd 100644
--- a/cayenne-server/pom.xml
+++ b/cayenne-server/pom.xml
@@ -242,6 +242,36 @@
 					</execution>
 				</executions>
 			</plugin>
-		</plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>**/ExpressionParserTreeConstants.java</exclude>
+                        <exclude>**/JavaCharStream.java</exclude>
+                        <exclude>**/JJTExpressionParserState.java</exclude>
+                        <exclude>**/ParseException.java</exclude>
+                        <exclude>**/Token.java</exclude>
+                        <exclude>**/TokenMgrError.java</exclude>
+                        <exclude>**/ExpressionParser.java</exclude>
+                        <exclude>**/ExpressionParserConstants.java</exclude>
+                        <exclude>**/ExpressionParserTokenManager.java</exclude>
+                        <exclude>**/SimpleNode.java</exclude>
+                        <exclude>**/ParseException.java</exclude>
+                        <exclude>**/Parser.java.java</exclude>
+                        <exclude>**/ParserConstants.java</exclude>
+                        <exclude>**/ParserTokenManager.java</exclude>
+                        <exclude>**/SimpleCharStream.java</exclude>
+                        <exclude>**/TokenMgrError.java</exclude>
+                        <exclude>org/apache/cayenne/ejbql/parser/*</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/cayenne-tools/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-tools/pom.xml b/cayenne-tools/pom.xml
index f0ada10..45485df 100644
--- a/cayenne-tools/pom.xml
+++ b/cayenne-tools/pom.xml
@@ -123,6 +123,15 @@
 					</execution>
 				</executions>
 			</plugin>
-		</plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
 	</build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-modeler-generic-ext/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-generic-ext/pom.xml b/modeler/cayenne-modeler-generic-ext/pom.xml
index 8c8d20f..f46fb5c 100644
--- a/modeler/cayenne-modeler-generic-ext/pom.xml
+++ b/modeler/cayenne-modeler-generic-ext/pom.xml
@@ -62,4 +62,18 @@
 			<artifactId>looks</artifactId>
 		</dependency>
 	</dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-modeler-generic/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-generic/pom.xml b/modeler/cayenne-modeler-generic/pom.xml
index 1c909e6..1294019 100644
--- a/modeler/cayenne-modeler-generic/pom.xml
+++ b/modeler/cayenne-modeler-generic/pom.xml
@@ -84,6 +84,20 @@
 		</profile>
 	</profiles>
 
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
 	<pluginRepositories>
 		<pluginRepository>
 			<id>objectstyle</id>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-modeler-mac-ext/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-mac-ext/pom.xml b/modeler/cayenne-modeler-mac-ext/pom.xml
index e751af2..aefba33 100644
--- a/modeler/cayenne-modeler-mac-ext/pom.xml
+++ b/modeler/cayenne-modeler-mac-ext/pom.xml
@@ -65,4 +65,18 @@
 			<version>${project.version}</version>
 		</dependency>
 	</dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-modeler-mac-legacy/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-mac-legacy/pom.xml b/modeler/cayenne-modeler-mac-legacy/pom.xml
index c8d5053..cff779f 100644
--- a/modeler/cayenne-modeler-mac-legacy/pom.xml
+++ b/modeler/cayenne-modeler-mac-legacy/pom.xml
@@ -66,6 +66,20 @@
 		</dependency>
 	</dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    
 	<profiles>
 		<profile>
 			<id>mac</id>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-modeler-mac/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-mac/pom.xml b/modeler/cayenne-modeler-mac/pom.xml
index ec1d2d4..217219a 100644
--- a/modeler/cayenne-modeler-mac/pom.xml
+++ b/modeler/cayenne-modeler-mac/pom.xml
@@ -66,6 +66,20 @@
 		</dependency>
 	</dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
 	<profiles>
 		<profile>
 			<id>mac</id>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-modeler-win/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-win/pom.xml b/modeler/cayenne-modeler-win/pom.xml
index 6d3eb27..114235d 100644
--- a/modeler/cayenne-modeler-win/pom.xml
+++ b/modeler/cayenne-modeler-win/pom.xml
@@ -102,6 +102,15 @@
 							</execution>
 						</executions>					
 					</plugin>
+                    <plugin>
+                        <artifactId>maven-checkstyle-plugin</artifactId>
+                        <!--<configuration>
+                            <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                        </configuration>-->
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-pmd-plugin</artifactId>
+                    </plugin>
 				</plugins>
 			</build>
 		</profile>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-modeler/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/pom.xml b/modeler/cayenne-modeler/pom.xml
index f640b91..1952a70 100644
--- a/modeler/cayenne-modeler/pom.xml
+++ b/modeler/cayenne-modeler/pom.xml
@@ -114,4 +114,18 @@
 			<artifactId>jgraph</artifactId>
 		</dependency>
 	</dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/modeler/cayenne-wocompat/pom.xml
----------------------------------------------------------------------
diff --git a/modeler/cayenne-wocompat/pom.xml b/modeler/cayenne-wocompat/pom.xml
index e56a835..f232c90 100644
--- a/modeler/cayenne-wocompat/pom.xml
+++ b/modeler/cayenne-wocompat/pom.xml
@@ -47,4 +47,18 @@
 			<version>${project.version}</version>
 		</dependency>
 	</dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/plugins/maven-cayenne-modeler-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-modeler-plugin/pom.xml b/plugins/maven-cayenne-modeler-plugin/pom.xml
index 6575ac9..f47f071 100644
--- a/plugins/maven-cayenne-modeler-plugin/pom.xml
+++ b/plugins/maven-cayenne-modeler-plugin/pom.xml
@@ -71,5 +71,19 @@
 		</dependency>
 
 	</dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/plugins/maven-cayenne-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/pom.xml b/plugins/maven-cayenne-plugin/pom.xml
index 47a2153..b2df095 100644
--- a/plugins/maven-cayenne-plugin/pom.xml
+++ b/plugins/maven-cayenne-plugin/pom.xml
@@ -100,5 +100,19 @@
         </dependency>
 
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!--<configuration>
+                    <suppressionsLocation>${project.basedir}/cayenne-checkstyle-suppression.xml</suppressionsLocation>
+                </configuration>-->
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/31d59e0c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ffaa93d..859b54a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,6 +39,10 @@
 		<maven.build.timestamp.format>MMM dd yyyy HH:mm:ss</maven.build.timestamp.format>
 		<project.build.datetime>${maven.build.timestamp}</project.build.datetime>
         <jacoco.version>0.7.1.201405082137</jacoco.version>
+
+        <pmd.skip>false</pmd.skip>
+        <checkstyle.skip>false</checkstyle.skip>
+        <findbugs.skip>false</findbugs.skip>
     </properties>
 
 	<url>http://cayenne.apache.org/</url>
@@ -516,7 +520,19 @@
 				<enabled>true</enabled>
 			</releases>
 		</pluginRepository>
-	</pluginRepositories>
+        <pluginRepository>
+            <id>central</id>
+            <name>Maven Central</name>
+            <url>http://repo1.maven.org/maven2/</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </pluginRepository>
+    </pluginRepositories>
 	<build>
 		<defaultGoal>install</defaultGoal>
 
@@ -763,7 +779,104 @@
 					<version>3.0</version>
 				</plugin>
 
-			</plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <version>2.9.1</version>
+                    <configuration>
+                        <skip>${checkstyle.skip}</skip>
+                        <consoleOutput>true</consoleOutput>
+                        <enableRulesSummary>false</enableRulesSummary>
+                        <failOnViolation>false</failOnViolation>
+                        <!-- TODO make it 'true' when we will be ready -->
+                        <violationSeverity>warning</violationSeverity>
+                        <configLocation>/cayenne-checkstyle.xml</configLocation>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <phase>process-sources</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.apache.cayenne.build-tools</groupId>
+                            <artifactId>cayenne-checkers</artifactId>
+                            <version>${project.version}</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-pmd-plugin</artifactId>
+                    <version>3.2</version>
+                    <configuration>
+                        <skip>${pmd.skip}</skip>
+                        <sourceEncoding>utf-8</sourceEncoding>
+                        <targetJdk>1.6</targetJdk>
+                        <verbose>true</verbose>
+                        <failOnViolation>false</failOnViolation>
+                        <!-- TODO make it 'true' when we will be ready -->
+                        <failurePriority>2</failurePriority>
+                        <rulesets>
+                            <!-- go back on one dir to parent project -->
+                            <ruleset>/cayenne-pmd.xml</ruleset>
+                        </rulesets>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <phase>process-sources</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.apache.cayenne.build-tools</groupId>
+                            <artifactId>cayenne-checkers</artifactId>
+                            <version>${project.version}</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>findbugs-maven-plugin</artifactId>
+                    <version>2.5</version>
+                    <configuration>
+                        <effort>Max</effort>
+                        <!-- do max effort at CI Server -->
+                        <threshold>Low</threshold>
+                        <!-- make it 'low' at CI Server -->
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <phase>process-classes</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>clirr-maven-plugin</artifactId>
+                    <version>2.6.1</version>
+                    <configuration>
+                        <comparisonVersion>3.1RC1</comparisonVersion>
+                        <minSeverity>info</minSeverity>
+                        <logResults>true</logResults>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>jdepend-maven-plugin</artifactId>
+                    <version>2.0</version>
+                </plugin>
+
+            </plugins>
 		</pluginManagement>
 
 		<plugins>
@@ -844,6 +957,16 @@
 
 	<profiles>
         <profile>
+            <id>fast-and-dirty</id>
+
+            <properties>
+                <pmd.skip>true</pmd.skip>
+                <maven.test.skip>true</maven.test.skip>
+                <checkstyle.skip>true</checkstyle.skip>
+                <findbugs.skip>true</findbugs.skip>
+            </properties>
+        </profile>
+        <profile>
             <id>tests-development</id>
             <activation>
                 <property>
@@ -1203,9 +1326,42 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jxr-plugin</artifactId>
+                <version>2.3</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-report-plugin</artifactId>
                 <version>2.8</version>
             </plugin>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <inherited>true</inherited>
+            </plugin>
+            <plugin>
+                <artifactId>maven-pmd-plugin</artifactId>
+                <inherited>true</inherited>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <configuration>
+                    <effort>Max</effort>
+                    <threshold>Low</threshold>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jdepend-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>clirr-maven-plugin</artifactId>
+            </plugin>
         </plugins>
     </reporting>
 </project>