Skip to content

Commit d523468

Browse files
rsvobodaasoldano
authored andcommitted
[WISE-317] checkstyle (jboss-wise#59)
1 parent 671268d commit d523468

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,9 @@ Prerequisites
8787

8888
The user can download and install any specific Firefox version. Add the
8989
path to that Firefox to the beginning of his PATH variable and run the testsuite.
90+
91+
92+
Checkstyle
93+
-------------------
94+
Execution of maven-checkstyle-plugin is part of the compile phase, can be skipped by adding `-Dcheckstyle.skip=true` to the mvn command
95+
Fastest way to get checkstyle reports is by invoking following command `mvn checkstyle:check -Dcheckstyle.failOnViolation=false`

pom.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
<cdi.api.version>1.2</cdi.api.version>
9292
<version.compiler.plugin>2.3.1</version.compiler.plugin>
9393
<maven-surefire-plugin.version>2.11</maven-surefire-plugin.version>
94+
<version.checkstyle-plugin>2.17</version.checkstyle-plugin>
95+
<version.org.wildfly.checkstyle-config>1.0.5.Final</version.org.wildfly.checkstyle-config>
9496

9597
<jboss-ejb-api_3.1_spec.version>1.0.2.Final</jboss-ejb-api_3.1_spec.version>
9698
<wildfly-controller-client.version>1.0.1.Final</wildfly-controller-client.version>
@@ -331,7 +333,42 @@
331333
</dependencyManagement>
332334

333335
<build>
336+
<pluginManagement>
337+
<plugins>
338+
<plugin>
339+
<groupId>org.apache.maven.plugins</groupId>
340+
<artifactId>maven-checkstyle-plugin</artifactId>
341+
<version>${version.checkstyle-plugin}</version>
342+
</plugin>
343+
</plugins>
344+
</pluginManagement>
334345
<plugins>
346+
<plugin>
347+
<artifactId>maven-checkstyle-plugin</artifactId>
348+
<dependencies>
349+
<dependency>
350+
<groupId>org.wildfly.checkstyle</groupId>
351+
<artifactId>wildfly-checkstyle-config</artifactId>
352+
<version>${version.org.wildfly.checkstyle-config}</version>
353+
</dependency>
354+
</dependencies>
355+
<configuration>
356+
<configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
357+
<consoleOutput>true</consoleOutput>
358+
<failsOnError>false</failsOnError>
359+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
360+
<useFile/>
361+
</configuration>
362+
<executions>
363+
<execution>
364+
<id>check-style</id>
365+
<phase>compile</phase>
366+
<goals>
367+
<goal>checkstyle</goal>
368+
</goals>
369+
</execution>
370+
</executions>
371+
</plugin>
335372
</plugins>
336373
</build>
337374

0 commit comments

Comments
 (0)