From 2d7363b27360e36fdd62546c0f9d0b1d78133f29 Mon Sep 17 00:00:00 2001 From: Jonathan Eagles Date: Fri, 1 May 2015 13:11:50 -0500 Subject: [PATCH] HADOOP-11889. Make checkstyle runnable from root project (Gera Shegalov via jeagles) --- hadoop-build-tools/pom.xml | 28 +++ .../checkstyle-noframes-sorted.xsl | 0 .../main/resources/checkstyle}/checkstyle.xml | 5 +- .../checkstyle-noframes-sorted.xsl | 178 ------------------ .../hadoop-hdfs/dev-support/checkstyle.xml | 169 ----------------- hadoop-project-dist/pom.xml | 11 -- hadoop-project/pom.xml | 6 - .../hadoop-azure/src/config/checkstyle.xml | 1 - hadoop-tools/hadoop-distcp/pom.xml | 7 - pom.xml | 32 ++++ 10 files changed, 63 insertions(+), 374 deletions(-) create mode 100644 hadoop-build-tools/pom.xml rename {hadoop-common-project/hadoop-common/src/test => hadoop-build-tools/src/main/resources/checkstyle}/checkstyle-noframes-sorted.xsl (100%) rename {hadoop-common-project/hadoop-common/dev-support => hadoop-build-tools/src/main/resources/checkstyle}/checkstyle.xml (98%) delete mode 100644 hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle-noframes-sorted.xsl delete mode 100644 hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle.xml diff --git a/hadoop-build-tools/pom.xml b/hadoop-build-tools/pom.xml new file mode 100644 index 0000000000..1931072aff --- /dev/null +++ b/hadoop-build-tools/pom.xml @@ -0,0 +1,28 @@ + + + + + hadoop-main + org.apache.hadoop + 3.0.0-SNAPSHOT + +4.0.0 + +hadoop-build-tools + Apache Hadoop Build Tools Project + Apache Hadoop Build Tools + \ No newline at end of file diff --git a/hadoop-common-project/hadoop-common/src/test/checkstyle-noframes-sorted.xsl b/hadoop-build-tools/src/main/resources/checkstyle/checkstyle-noframes-sorted.xsl similarity index 100% rename from hadoop-common-project/hadoop-common/src/test/checkstyle-noframes-sorted.xsl rename to hadoop-build-tools/src/main/resources/checkstyle/checkstyle-noframes-sorted.xsl diff --git a/hadoop-common-project/hadoop-common/dev-support/checkstyle.xml b/hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml similarity index 98% rename from hadoop-common-project/hadoop-common/dev-support/checkstyle.xml rename to hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml index 4caa03f05d..de7319c9e1 100644 --- a/hadoop-common-project/hadoop-common/dev-support/checkstyle.xml +++ b/hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml @@ -114,7 +114,9 @@ - + + + @@ -158,7 +160,6 @@ - diff --git a/hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle-noframes-sorted.xsl b/hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle-noframes-sorted.xsl deleted file mode 100644 index 5f9e93ba27..0000000000 --- a/hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle-noframes-sorted.xsl +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

CheckStyle Audit

Designed for use with CheckStyle and Ant.
-
- - - -
- - - -
- - - - -
- - - - -
- - - - -

Files

- - - - - - - - - - - - - - -
NameErrors
-
- - - - -

File

- - - - - - - - - - - - - - -
Error DescriptionLine
- Back to top -
- - - -

Summary

- - - - - - - - - - - - -
FilesErrors
-
- - - - a - b - - -
- - diff --git a/hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle.xml b/hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle.xml deleted file mode 100644 index eda4a47163..0000000000 --- a/hadoop-hdfs-project/hadoop-hdfs/dev-support/checkstyle.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/hadoop-project-dist/pom.xml b/hadoop-project-dist/pom.xml index d2065938d9..c26aa9aa33 100644 --- a/hadoop-project-dist/pom.xml +++ b/hadoop-project-dist/pom.xml @@ -106,17 +106,6 @@ 2048 - - org.apache.maven.plugins - maven-checkstyle-plugin - - file://${basedir}/dev-support/checkstyle.xml - false - xml - html - ${project.build.directory}/test/checkstyle-errors.xml - - org.apache.maven.plugins maven-javadoc-plugin diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 9674de1b56..f23a2ddfa5 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -102,7 +102,6 @@ 2.5 2.4 2.3 - 2.12.1 2.7 1.2 1.9 @@ -1023,11 +1022,6 @@ findbugs-maven-plugin ${findbugs.version} - - org.apache.maven.plugins - maven-checkstyle-plugin - ${maven-checkstyle-plugin.version} - org.codehaus.mojo native-maven-plugin diff --git a/hadoop-tools/hadoop-azure/src/config/checkstyle.xml b/hadoop-tools/hadoop-azure/src/config/checkstyle.xml index f68f6c8208..acf6f7f7ef 100644 --- a/hadoop-tools/hadoop-azure/src/config/checkstyle.xml +++ b/hadoop-tools/hadoop-azure/src/config/checkstyle.xml @@ -157,7 +157,6 @@ - diff --git a/hadoop-tools/hadoop-distcp/pom.xml b/hadoop-tools/hadoop-distcp/pom.xml index 2dace6a533..374155d47c 100644 --- a/hadoop-tools/hadoop-distcp/pom.xml +++ b/hadoop-tools/hadoop-distcp/pom.xml @@ -160,13 +160,6 @@ - - org.apache.maven.plugins - maven-checkstyle-plugin - - true - - org.apache.maven.plugins maven-jar-plugin diff --git a/pom.xml b/pom.xml index 3bad969ee8..1ea52eb681 100644 --- a/pom.xml +++ b/pom.xml @@ -103,6 +103,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs 3.3.0 2.5.0 1.0.0 + 2.15 + 6.6 @@ -118,6 +120,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs hadoop-dist hadoop-client hadoop-minicluster + hadoop-build-tools @@ -292,6 +295,30 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs maven-bundle-plugin ${maven-bundle-plugin.version} + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + org.apache.hadoop + hadoop-build-tools + ${project.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + + checkstyle/checkstyle.xml + false + xml + html + ${project.build.directory}/test/checkstyle-errors.xml + + @@ -357,6 +384,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs true true + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} +