Skip to content

Commit

Permalink
[FLINK-9323][build] Properly organize checkstyle-plugin configuration
Browse files Browse the repository at this point in the history
This closes apache#5972.
  • Loading branch information
zentol committed May 10, 2018
1 parent 84e7fe4 commit 3495b4d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 91 deletions.
23 changes: 1 addition & 22 deletions flink-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,30 +121,9 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>

<configuration>
<configLocation>/tools/maven/checkstyle.xml</configLocation>
<suppressionsLocation>/tools/maven/suppressions-core.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
<suppressionsLocation combine.self="override">/tools/maven/suppressions-core.xml</suppressionsLocation>
</configuration>
</plugin>

Expand Down
23 changes: 1 addition & 22 deletions flink-optimizer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,30 +80,9 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>

<configuration>
<configLocation>/tools/maven/checkstyle.xml</configLocation>
<suppressionsLocation>/tools/maven/suppressions-optimizer.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
<suppressionsLocation combine.self="override">/tools/maven/suppressions-optimizer.xml</suppressionsLocation>
</configuration>
</plugin>
<plugin>
Expand Down
23 changes: 1 addition & 22 deletions flink-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,30 +334,9 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>

<configuration>
<configLocation>/tools/maven/checkstyle.xml</configLocation>
<suppressionsLocation>/tools/maven/suppressions-runtime.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
<suppressionsLocation combine.self="override">/tools/maven/suppressions-runtime.xml</suppressionsLocation>
</configuration>
</plugin>
<!-- Scala Compiler -->
Expand Down
55 changes: 30 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1164,31 +1164,6 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<!-- Note: match version with docs/internals/ide_setup.md -->
<version>8.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>/tools/maven/checkstyle.xml</configLocation>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
</configuration>
</plugin>
<plugin>
<!-- just define the Java version to be used for compiling and plugins -->
Expand Down Expand Up @@ -1393,6 +1368,36 @@ under the License.
<pluginManagement>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<!-- Note: match version with docs/internals/ide_setup.md -->
<version>8.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>/tools/maven/checkstyle.xml</configLocation>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down

0 comments on commit 3495b4d

Please sign in to comment.