Skip to content

Commit 2274ac5

Browse files
committed
Move spring-javaformat plugins to root POM
Relocate spring-javaformat plugins to the root of the project. Closes gh-13306
1 parent e1d21e5 commit 2274ac5

File tree

8 files changed

+57
-103
lines changed

8 files changed

+57
-103
lines changed

pom.xml

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
34
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
45
<modelVersion>4.0.0</modelVersion>
56
<groupId>org.springframework.boot</groupId>
@@ -20,6 +21,61 @@
2021
<activation>
2122
<activeByDefault>true</activeByDefault>
2223
</activation>
24+
<properties>
25+
<spring-javaformat.version>0.0.2</spring-javaformat.version>
26+
</properties>
27+
<build>
28+
<plugins>
29+
<plugin>
30+
<groupId>org.apache.maven.plugins</groupId>
31+
<artifactId>maven-checkstyle-plugin</artifactId>
32+
<version>3.0.0</version>
33+
<dependencies>
34+
<dependency>
35+
<groupId>com.puppycrawl.tools</groupId>
36+
<artifactId>checkstyle</artifactId>
37+
<version>8.8</version>
38+
</dependency>
39+
<dependency>
40+
<groupId>io.spring.javaformat</groupId>
41+
<artifactId>spring-javaformat-checkstyle</artifactId>
42+
<version>${spring-javaformat.version}</version>
43+
</dependency>
44+
</dependencies>
45+
<executions>
46+
<execution>
47+
<id>checkstyle-validation</id>
48+
<phase>validate</phase>
49+
<configuration>
50+
<skip>${disable.checks}</skip>
51+
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
52+
<suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
53+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
54+
</configuration>
55+
<goals>
56+
<goal>check</goal>
57+
</goals>
58+
</execution>
59+
</executions>
60+
</plugin>
61+
<plugin>
62+
<groupId>io.spring.javaformat</groupId>
63+
<artifactId>spring-javaformat-maven-plugin</artifactId>
64+
<version>${spring-javaformat.version}</version>
65+
<executions>
66+
<execution>
67+
<phase>validate</phase>
68+
<configuration>
69+
<skip>${disable.checks}</skip>
70+
</configuration>
71+
<goals>
72+
<goal>validate</goal>
73+
</goals>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
</plugins>
78+
</build>
2379
<modules>
2480
<module>spring-boot-project</module>
2581
<!-- Samples are built via the invoker plugin -->

spring-boot-project/spring-boot-parent/pom.xml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<aether.version>1.0.2.v20150114</aether.version>
2727
<maven.version>3.1.1</maven.version>
2828
<spock.version>1.0-groovy-2.4</spock.version>
29-
<spring-javaformat.version>0.0.2</spring-javaformat.version>
3029
</properties>
3130
<scm>
3231
<url>http://github.com/spring-projects/spring-boot</url>
@@ -304,23 +303,6 @@
304303
<artifactId>asciidoctor-maven-plugin</artifactId>
305304
<version>1.5.5</version>
306305
</plugin>
307-
<plugin>
308-
<groupId>org.apache.maven.plugins</groupId>
309-
<artifactId>maven-checkstyle-plugin</artifactId>
310-
<version>3.0.0</version>
311-
<dependencies>
312-
<dependency>
313-
<groupId>com.puppycrawl.tools</groupId>
314-
<artifactId>checkstyle</artifactId>
315-
<version>8.8</version>
316-
</dependency>
317-
<dependency>
318-
<groupId>io.spring.javaformat</groupId>
319-
<artifactId>spring-javaformat-checkstyle</artifactId>
320-
<version>${spring-javaformat.version}</version>
321-
</dependency>
322-
</dependencies>
323-
</plugin>
324306
<plugin>
325307
<groupId>org.apache.maven.plugins</groupId>
326308
<artifactId>maven-failsafe-plugin</artifactId>
@@ -574,41 +556,6 @@
574556
</execution>
575557
</executions>
576558
</plugin>
577-
<plugin>
578-
<groupId>io.spring.javaformat</groupId>
579-
<artifactId>spring-javaformat-maven-plugin</artifactId>
580-
<version>${spring-javaformat.version}</version>
581-
<executions>
582-
<execution>
583-
<phase>validate</phase>
584-
<configuration>
585-
<skip>${disable.checks}</skip>
586-
</configuration>
587-
<goals>
588-
<goal>validate</goal>
589-
</goals>
590-
</execution>
591-
</executions>
592-
</plugin>
593-
<plugin>
594-
<groupId>org.apache.maven.plugins</groupId>
595-
<artifactId>maven-checkstyle-plugin</artifactId>
596-
<executions>
597-
<execution>
598-
<id>checkstyle-validation</id>
599-
<phase>validate</phase>
600-
<configuration>
601-
<skip>${disable.checks}</skip>
602-
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
603-
<suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
604-
<includeTestSourceDirectory>true</includeTestSourceDirectory>
605-
</configuration>
606-
<goals>
607-
<goal>check</goal>
608-
</goals>
609-
</execution>
610-
</executions>
611-
</plugin>
612559
<plugin>
613560
<groupId>org.apache.maven.plugins</groupId>
614561
<artifactId>maven-compiler-plugin</artifactId>

spring-boot-samples/pom.xml

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<properties>
1616
<main.basedir>${basedir}/..</main.basedir>
1717
<java.version>1.8</java.version>
18-
<spring-javaformat.version>0.0.2</spring-javaformat.version>
1918
<disable.checks>false</disable.checks>
2019
</properties>
2120
<modules>
@@ -176,54 +175,6 @@
176175
</plugins>
177176
</pluginManagement>
178177
<plugins>
179-
<plugin>
180-
<groupId>io.spring.javaformat</groupId>
181-
<artifactId>spring-javaformat-maven-plugin</artifactId>
182-
<version>${spring-javaformat.version}</version>
183-
<executions>
184-
<execution>
185-
<phase>validate</phase>
186-
<configuration>
187-
<skip>${disable.checks}</skip>
188-
</configuration>
189-
<goals>
190-
<goal>validate</goal>
191-
</goals>
192-
</execution>
193-
</executions>
194-
</plugin>
195-
<plugin>
196-
<groupId>org.apache.maven.plugins</groupId>
197-
<artifactId>maven-checkstyle-plugin</artifactId>
198-
<version>3.0.0</version>
199-
<dependencies>
200-
<dependency>
201-
<groupId>com.puppycrawl.tools</groupId>
202-
<artifactId>checkstyle</artifactId>
203-
<version>8.8</version>
204-
</dependency>
205-
<dependency>
206-
<groupId>io.spring.javaformat</groupId>
207-
<artifactId>spring-javaformat-checkstyle</artifactId>
208-
<version>${spring-javaformat.version}</version>
209-
</dependency>
210-
</dependencies>
211-
<executions>
212-
<execution>
213-
<id>checkstyle-validation</id>
214-
<phase>validate</phase>
215-
<configuration>
216-
<skip>${disable.checks}</skip>
217-
<configLocation>../spring-boot-parent/src/checkstyle/checkstyle.xml</configLocation>
218-
<suppressionsLocation>../spring-boot-parent/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
219-
<includeTestSourceDirectory>true</includeTestSourceDirectory>
220-
</configuration>
221-
<goals>
222-
<goal>check</goal>
223-
</goals>
224-
</execution>
225-
</executions>
226-
</plugin>
227178
<plugin>
228179
<groupId>org.apache.maven.plugins</groupId>
229180
<artifactId>maven-surefire-plugin</artifactId>

0 commit comments

Comments
 (0)