Adding a new build-tools module for PMD + Checkstyle configuration
diff --git a/build-tools/pom.xml b/build-tools/pom.xml
new file mode 100644
index 0000000..fa5c6b1
--- /dev/null
+++ b/build-tools/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed 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. See accompanying LICENSE file.
+-->
+<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>
+
+ <groupId>org.apache.kerby</groupId>
+ <artifactId>build-tools</artifactId>
+ <version>1.0.0-RC2-SNAPSHOT</version>
+ <name>Kerby Build Tools</name>
+ <packaging>jar</packaging>
+
+</project>
diff --git a/docs/kerby-checkstyle.xml b/build-tools/src/main/resources/kerby-checkstyle.xml
similarity index 100%
rename from docs/kerby-checkstyle.xml
rename to build-tools/src/main/resources/kerby-checkstyle.xml
diff --git a/docs/kerby-pmd-ruleset.xml b/build-tools/src/main/resources/kerby-pmd-ruleset.xml
similarity index 100%
rename from docs/kerby-pmd-ruleset.xml
rename to build-tools/src/main/resources/kerby-pmd-ruleset.xml
diff --git a/pom.xml b/pom.xml
index 3b4d302..21a6d04 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,6 @@
<slf4j.version>1.7.12</slf4j.version>
<assertj.version>2.2.0</assertj.version>
<findbugs.version>3.0.1</findbugs.version>
- <checkstyle.dir>${basedir}/docs</checkstyle.dir>
<skipTests>false</skipTests>
</properties>
@@ -65,6 +64,7 @@
</prerequisites>
<modules>
+ <module>build-tools</module>
<module>kerby-config</module>
<module>kerby-util</module>
<module>kerby-asn1</module>
@@ -197,7 +197,7 @@
<version>3.5</version>
<configuration>
<rulesets>
- <ruleset>${checkstyle.dir}/kerby-pmd-ruleset.xml</ruleset>
+ <ruleset>kerby-pmd-ruleset.xml</ruleset>
</rulesets>
<linkXRef>false</linkXRef>
<sourceEncoding>utf-8</sourceEncoding>
@@ -206,6 +206,13 @@
<includeTests>true</includeTests>
<targetJdk>1.7</targetJdk>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.kerby</groupId>
+ <artifactId>build-tools</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<id>validate</id>
@@ -222,11 +229,18 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.15</version>
<configuration>
- <configLocation>${checkstyle.dir}/kerby-checkstyle.xml</configLocation>
+ <configLocation>kerby-checkstyle.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<encoding>UTF-8</encoding>
<failOnViolation>true</failOnViolation>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.kerby</groupId>
+ <artifactId>build-tools</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<id>validate</id>
@@ -339,29 +353,6 @@
</properties>
</profile>
<profile>
- <id>activate-checkstyle-in-module</id>
- <activation>
- <file>
- <exists>${basedir}/../docs/kerby-checkstyle.xml</exists>
- </file>
- </activation>
- <properties>
- <checkstyle.dir>${basedir}/../docs</checkstyle.dir>
- </properties>
- </profile>
- <profile>
- <id>activate-checkstyle-in-submodule</id>
- <activation>
- <file>
- <exists>${basedir}/../../docs/kerby-checkstyle.xml</exists>
- </file>
- </activation>
- <properties>
- <checkstyle.dir>${basedir}/../../docs</checkstyle.dir>
- </properties>
- </profile>
-
- <profile>
<id>activate-checkstyle-supression</id>
<activation>
<file>