Skip to content

Commit 02f623b

Browse files
committed
AVRO-1838: Java: Update checkstyle to catch trailing whitespace. Contributed by Niels Basjes.
1 parent 7e10bab commit 02f623b

File tree

7 files changed

+35
-157
lines changed

7 files changed

+35
-157
lines changed

CHANGES.txt

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Trunk (not yet released)
3535

3636
AVRO-1839: Update the gitignore files to hide generated files (nielsbasjes)
3737

38+
AVRO-1838: Java: Update checkstyle to catch trailing whitespace.
39+
(nielsbasjes via blue)
40+
3841
BUG FIXES
3942

4043
AVRO-1493. Java: Avoid the "Turkish Locale Problem". Schema fingerprints are

lang/java/checkstyle.xml

-59
This file was deleted.

lang/java/pom.xml

-26
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
<findbugs-annotations.version>1.3.9-1</findbugs-annotations.version>
7575

7676
<!-- version properties for plugins -->
77-
<checkstyle-plugin.version>2.12.1</checkstyle-plugin.version>
7877
<bundle-plugin-version>2.5.3</bundle-plugin-version>
7978
<compiler-plugin.version>3.1</compiler-plugin.version>
8079
<exec-plugin.version>1.3.2</exec-plugin.version>
@@ -234,27 +233,6 @@
234233
</systemPropertyVariables>
235234
</configuration>
236235
</plugin>
237-
<plugin>
238-
<groupId>org.apache.maven.plugins</groupId>
239-
<artifactId>maven-checkstyle-plugin</artifactId>
240-
<version>${checkstyle-plugin.version}</version>
241-
<configuration>
242-
<consoleOutput>true</consoleOutput>
243-
<configLocation>checkstyle.xml</configLocation>
244-
</configuration>
245-
<!-- Runs by default in the verify phase (mvn verify or later in the build cycle)
246-
the 'check' goal will fail the build if it does not pass. "mvn checkstyle:check"
247-
will do this alone, or "mvn checkstyle:checkstyle" will report but not break -->
248-
<executions>
249-
<execution>
250-
<id>checkstyle-check</id>
251-
<phase>test</phase>
252-
<goals>
253-
<goal>check</goal>
254-
</goals>
255-
</execution>
256-
</executions>
257-
</plugin>
258236
<plugin>
259237
<groupId>org.apache.maven.plugins</groupId>
260238
<artifactId>maven-javadoc-plugin</artifactId>
@@ -307,10 +285,6 @@
307285
</plugins>
308286
</pluginManagement>
309287
<plugins>
310-
<plugin>
311-
<groupId>org.apache.maven.plugins</groupId>
312-
<artifactId>maven-checkstyle-plugin</artifactId>
313-
</plugin>
314288
<plugin>
315289
<groupId>org.apache.felix</groupId>
316290
<artifactId>maven-bundle-plugin</artifactId>

lang/java/trevni/avro/pom.xml

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848

4949
<build>
5050
<plugins>
51-
<plugin>
52-
<groupId>org.apache.maven.plugins</groupId>
53-
<artifactId>maven-checkstyle-plugin</artifactId>
54-
</plugin>
5551
<plugin>
5652
<groupId>org.apache.maven.plugins</groupId>
5753
<artifactId>maven-jar-plugin</artifactId>

lang/java/trevni/checkstyle.xml

-59
This file was deleted.

lang/java/trevni/core/pom.xml

-9
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@
4444
</dependency>
4545
</dependencies>
4646

47-
<build>
48-
<plugins>
49-
<plugin>
50-
<groupId>org.apache.maven.plugins</groupId>
51-
<artifactId>maven-checkstyle-plugin</artifactId>
52-
</plugin>
53-
</plugins>
54-
</build>
55-
5647
<profiles>
5748
</profiles>
5849

pom.xml

+32
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
Java artifacts are copied to the final build destination with a custom profile.
4545
-->
4646
<properties>
47+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4748
<avro.distDir>dist</avro.distDir>
4849
<avro.docDir>build/avro-doc-${project.version}/api</avro.docDir>
4950
<!-- dependency plugin versions -->
@@ -53,9 +54,11 @@
5354
<antrun-plugin.version>1.7</antrun-plugin.version>
5455
<enforcer-plugin.version>1.3.1</enforcer-plugin.version>
5556
<rat.version>0.9</rat.version>
57+
<checkstyle-plugin.version>2.17</checkstyle-plugin.version>
5658
</properties>
5759

5860
<modules>
61+
<module>dev-tools</module>
5962
<module>lang/java</module>
6063
</modules>
6164

@@ -118,6 +121,35 @@
118121
<fail>true</fail>
119122
</configuration>
120123
</plugin>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-checkstyle-plugin</artifactId>
127+
<version>${checkstyle-plugin.version}</version>
128+
<dependencies>
129+
<dependency>
130+
<groupId>org.apache.avro</groupId>
131+
<artifactId>dev-tools</artifactId>
132+
<version>${project.version}</version>
133+
</dependency>
134+
</dependencies>
135+
<configuration>
136+
<consoleOutput>true</consoleOutput>
137+
<configLocation>checkstyle/checkstyle.xml</configLocation>
138+
<suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
139+
</configuration>
140+
<!-- Runs by default in the verify phase (mvn verify or later in the build cycle)
141+
the 'check' goal will fail the build if it does not pass. "mvn checkstyle:check"
142+
will do this alone, or "mvn checkstyle:checkstyle" will report but not break -->
143+
<executions>
144+
<execution>
145+
<id>checkstyle-check</id>
146+
<phase>test</phase>
147+
<goals>
148+
<goal>check</goal>
149+
</goals>
150+
</execution>
151+
</executions>
152+
</plugin>
121153
</plugins>
122154
</build>
123155

0 commit comments

Comments
 (0)