Skip to content

Commit 0078580

Browse files
authored
Merge pull request #68 from MarkEWaite/use-spotless-not-tidy
Use spotless instead of tidy for formatting
2 parents 5a92ee6 + 21efdd5 commit 0078580

File tree

1 file changed

+41
-49
lines changed

1 file changed

+41
-49
lines changed

pom.xml

+41-49
Original file line numberDiff line numberDiff line change
@@ -84,56 +84,48 @@
8484
</pluginRepositories>
8585

8686
<build>
87+
<pluginManagement>
88+
<plugins>
89+
<plugin>
90+
<groupId>com.diffplug.spotless</groupId>
91+
<artifactId>spotless-maven-plugin</artifactId>
92+
<version>2.17.6</version>
93+
<configuration>
94+
<!-- define a language-specific format -->
95+
<java>
96+
<!-- no need to specify files, inferred automatically -->
97+
<!-- apply a specific flavor of google-java-format -->
98+
<googleJavaFormat>
99+
<!-- Blocked at 1.7 until Java 8 google-java-format is no longer required -->
100+
<version>1.7</version>
101+
<style>AOSP</style>
102+
</googleJavaFormat>
103+
<endWithNewline></endWithNewline>
104+
<removeUnusedImports></removeUnusedImports>
105+
</java>
106+
<pom>
107+
<indent>
108+
<spaces>true</spaces>
109+
</indent>
110+
<includes>
111+
<include>pom.xml</include>
112+
</includes>
113+
<sortPom></sortPom>
114+
</pom>
115+
</configuration>
116+
<executions>
117+
<execution>
118+
<!-- Runs in verify phase by default -->
119+
<goals>
120+
<!-- Can be disabled using -Dspotless.check.skip -->
121+
<goal>check</goal>
122+
</goals>
123+
</execution>
124+
</executions>
125+
</plugin>
126+
</plugins>
127+
</pluginManagement>
87128
<plugins>
88-
<!-- Fail build on pom formatting errors -->
89-
<!-- Fix with mvn tidy:pom -->
90-
<plugin>
91-
<groupId>org.codehaus.mojo</groupId>
92-
<artifactId>tidy-maven-plugin</artifactId>
93-
<version>1.1.0</version>
94-
<executions>
95-
<execution>
96-
<id>validate</id>
97-
<goals>
98-
<goal>check</goal>
99-
</goals>
100-
<phase>validate</phase>
101-
</execution>
102-
</executions>
103-
</plugin>
104-
<plugin>
105-
<groupId>com.diffplug.spotless</groupId>
106-
<artifactId>spotless-maven-plugin</artifactId>
107-
<version>2.17.6</version>
108-
<configuration>
109-
<!-- define a language-specific format -->
110-
<java>
111-
<!-- no need to specify files, inferred automatically -->
112-
<!-- apply a specific flavor of google-java-format -->
113-
<googleJavaFormat>
114-
<!-- Blocked at 1.7 until Java 8 google-java-format is no longer required -->
115-
<version>1.7</version>
116-
<style>AOSP</style>
117-
</googleJavaFormat>
118-
</java>
119-
<pom>
120-
<indent>
121-
<spaces>true</spaces>
122-
</indent>
123-
<includes>
124-
<include>pom.xml</include>
125-
</includes>
126-
<sortPom></sortPom>
127-
</pom>
128-
</configuration>
129-
<executions>
130-
<execution>
131-
<goals>
132-
<goal>check</goal>
133-
</goals>
134-
</execution>
135-
</executions>
136-
</plugin>
137129
<plugin>
138130
<artifactId>maven-compiler-plugin</artifactId>
139131
<configuration>

0 commit comments

Comments
 (0)