AVRO-1900: Remove dev-tools to fix Java build. The dev-tools module has to be built before working in lang/java. This breaks the build.sh script and is a confusing failure for new Java contributors. This commit fixes the problem by moving the checkstyle config back into the lang/java/pom.xml. It is applied to all Java modules under lang/java.
Project: http://git-wip-us.apache.org/repos/asf/avro/repo Commit: http://git-wip-us.apache.org/repos/asf/avro/commit/b5d67d41 Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/b5d67d41 Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/b5d67d41 Branch: refs/heads/branch-1.8 Commit: b5d67d41fc6d64558d482f0e6d5b7a699dc62c91 Parents: ba848e2 Author: Ryan Blue <[email protected]> Authored: Sat Sep 10 16:41:58 2016 -0700 Committer: Ryan Blue <[email protected]> Committed: Sat Nov 5 13:17:50 2016 -0700 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ lang/java/checkstyle.xml | 67 ++++++++++++++++++++++++----------------- lang/java/pom.xml | 22 ++++++++++++++ lang/java/suppressions.xml | 26 ++++++++++++++++ 4 files changed, 89 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/avro/blob/b5d67d41/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index a13442d..303cc9c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -51,6 +51,8 @@ Trunk (not yet released) AVRO-1873: Ruby: Add CRC32 checksum to Snappy-compressed blocks. (blue) + AVRO-1900: Java: Remove dev-tools to fix Java build. (blue) + Avro 1.8.1 (14 May 2016) INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/avro/blob/b5d67d41/lang/java/checkstyle.xml ---------------------------------------------------------------------- diff --git a/lang/java/checkstyle.xml b/lang/java/checkstyle.xml index a51089a..fe5f008 100644 --- a/lang/java/checkstyle.xml +++ b/lang/java/checkstyle.xml @@ -18,42 +18,53 @@ --> <!DOCTYPE module PUBLIC - "-//Puppy Crawl//DTD Check Configuration 1.2//EN" - "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> + "-//Puppy Crawl//DTD Check Configuration 1.2//EN" + "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> + <module name="Checker"> - <module name="FileTabCharacter"/> - <module name="NewlineAtEndOfFile"> - <property name="lineSeparator" value="lf"/> - </module> + <module name="SuppressionFilter"> + <property name="file" value="${checkstyle.suppressions.file}"/> + </module> + + <module name="SuppressionCommentFilter"/> + + <module name="FileTabCharacter"/> + <module name="NewlineAtEndOfFile"> + <property name="lineSeparator" value="lf"/> + </module> - <module name="TreeWalker"> - <module name="ConstantName"/> - <module name="LocalFinalVariableName"/> - <module name="LocalVariableName"/> - <module name="MemberName"/> - <module name="MethodName"/> - <module name="PackageName"/> - <module name="ParameterName"/> - <module name="StaticVariableName"/> - <module name="TypeName"/> + <module name="TreeWalker"> + <module name="ConstantName"/> + <module name="LocalFinalVariableName"/> + <module name="LocalVariableName"/> + <module name="MemberName"/> + <module name="MethodName"/> + <module name="PackageName"/> + <module name="ParameterName"/> + <module name="StaticVariableName"/> + <module name="TypeName"/> - <module name="AvoidStarImport"/> - <module name="RedundantImport"/> - <module name="UnusedImports"/> + <module name="AvoidStarImport"/> + <module name="RedundantImport"/> + <module name="UnusedImports"/> - <module name="RedundantModifier"/> + <!--<module name="RedundantModifier"/>--> - <module name="EmptyStatement"/> - <module name="IllegalInstantiation"/> - <module name="RedundantThrows"/> - <module name="SimplifyBooleanExpression"/> - <module name="SimplifyBooleanReturn"/> + <module name="EmptyStatement"/> + <module name="IllegalInstantiation"/> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> - <module name="InterfaceIsType"/> + <module name="InterfaceIsType"/> - <module name="ArrayTypeStyle"/> - <module name="UpperEll"/> + <module name="ArrayTypeStyle"/> + <module name="UpperEll"/> + <module name="Regexp"> + <property name="format" value="[ \t]+$"/> + <property name="illegalPattern" value="true"/> + <property name="message" value="Trailing whitespace"/> </module> + </module> </module> http://git-wip-us.apache.org/repos/asf/avro/blob/b5d67d41/lang/java/pom.xml ---------------------------------------------------------------------- diff --git a/lang/java/pom.xml b/lang/java/pom.xml index 6365429..af55a30 100644 --- a/lang/java/pom.xml +++ b/lang/java/pom.xml @@ -343,6 +343,28 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${checkstyle-plugin.version}</version> + <configuration> + <consoleOutput>true</consoleOutput> + <configLocation>checkstyle.xml</configLocation> + <suppressionsLocation>suppressions.xml</suppressionsLocation> + </configuration> + <!-- Runs by default in the verify phase (mvn verify or later in the build cycle) + the 'check' goal will fail the build if it does not pass. "mvn checkstyle:check" + will do this alone, or "mvn checkstyle:checkstyle" will report but not break --> + <executions> + <execution> + <id>checkstyle-check</id> + <phase>test</phase> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/avro/blob/b5d67d41/lang/java/suppressions.xml ---------------------------------------------------------------------- diff --git a/lang/java/suppressions.xml b/lang/java/suppressions.xml new file mode 100644 index 0000000..c952495 --- /dev/null +++ b/lang/java/suppressions.xml @@ -0,0 +1,26 @@ +<?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" + "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> + +<suppressions> + <suppress files=".*[\\/]target[\\/]" checks=".*" /> +</suppressions>
