Skip to content

Commit eabda82

Browse files
committed
Fix maven checkstyle
As root module is just there to track the independent child modules, they don't get the plugin's configuration
1 parent 39be717 commit eabda82

File tree

3 files changed

+62
-16
lines changed

3 files changed

+62
-16
lines changed

pom.xml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,16 @@
2929

3030
<profiles>
3131
<profile>
32+
<!-- Disable checkstyle in root module as there is nothing to check -->
3233
<id>checkstyle</id>
3334
<build>
3435
<plugins>
3536
<plugin>
3637
<groupId>org.apache.maven.plugins</groupId>
3738
<artifactId>maven-checkstyle-plugin</artifactId>
38-
<version>3.3.1</version>
39-
<dependencies>
40-
<dependency>
41-
<groupId>com.puppycrawl.tools</groupId>
42-
<artifactId>checkstyle</artifactId>
43-
<version>10.12.7</version>
44-
</dependency>
45-
</dependencies>
4639
<configuration>
47-
<configLocation>.config/checkstyle/checkstyle.xml</configLocation>
40+
<skip>true</skip>
4841
</configuration>
49-
<executions>
50-
<execution>
51-
<goals>
52-
<goal>check</goal>
53-
</goals>
54-
</execution>
55-
</executions>
5642
</plugin>
5743
</plugins>
5844
</build>

standard-maven-template-demo/pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,35 @@
7979
</plugin>
8080
</plugins>
8181
</build>
82+
<profiles>
83+
<profile>
84+
<id>checkstyle</id>
85+
<build>
86+
<plugins>
87+
<plugin>
88+
<groupId>org.apache.maven.plugins</groupId>
89+
<artifactId>maven-checkstyle-plugin</artifactId>
90+
<version>3.3.1</version>
91+
<dependencies>
92+
<dependency>
93+
<groupId>com.puppycrawl.tools</groupId>
94+
<artifactId>checkstyle</artifactId>
95+
<version>10.12.7</version>
96+
</dependency>
97+
</dependencies>
98+
<configuration>
99+
<configLocation>../.config/checkstyle/checkstyle.xml</configLocation>
100+
</configuration>
101+
<executions>
102+
<execution>
103+
<goals>
104+
<goal>check</goal>
105+
</goals>
106+
</execution>
107+
</executions>
108+
</plugin>
109+
</plugins>
110+
</build>
111+
</profile>
112+
</profiles>
82113
</project>

standard-maven-template/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,34 @@
204204
</plugins>
205205
</build>
206206
</profile>
207+
<profile>
208+
<id>checkstyle</id>
209+
<build>
210+
<plugins>
211+
<plugin>
212+
<groupId>org.apache.maven.plugins</groupId>
213+
<artifactId>maven-checkstyle-plugin</artifactId>
214+
<version>3.3.1</version>
215+
<dependencies>
216+
<dependency>
217+
<groupId>com.puppycrawl.tools</groupId>
218+
<artifactId>checkstyle</artifactId>
219+
<version>10.12.7</version>
220+
</dependency>
221+
</dependencies>
222+
<configuration>
223+
<configLocation>../.config/checkstyle/checkstyle.xml</configLocation>
224+
</configuration>
225+
<executions>
226+
<execution>
227+
<goals>
228+
<goal>check</goal>
229+
</goals>
230+
</execution>
231+
</executions>
232+
</plugin>
233+
</plugins>
234+
</build>
235+
</profile>
207236
</profiles>
208237
</project>

0 commit comments

Comments
 (0)