Skip to content

Commit a8f08ed

Browse files
authored
refactor: move spotless to a profile active only in the root directory (#2683)
Signed-off-by: xstefank <[email protected]>
1 parent edc9e7d commit a8f08ed

File tree

1 file changed

+44
-32
lines changed

1 file changed

+44
-32
lines changed

Diff for: pom.xml

+44-32
Original file line numberDiff line numberDiff line change
@@ -313,38 +313,6 @@
313313
</plugins>
314314
</pluginManagement>
315315
<plugins>
316-
<plugin>
317-
<groupId>com.diffplug.spotless</groupId>
318-
<artifactId>spotless-maven-plugin</artifactId>
319-
<configuration>
320-
<pom>
321-
<includes>
322-
<include>pom.xml</include>
323-
<include>./**/pom.xml</include>
324-
</includes>
325-
<sortPom>
326-
<expandEmptyElements>false</expandEmptyElements>
327-
</sortPom>
328-
</pom>
329-
<java>
330-
<eclipse>
331-
<file>contributing/eclipse-google-style.xml</file>
332-
</eclipse>
333-
<importOrder>
334-
<file>contributing/eclipse.importorder</file>
335-
</importOrder>
336-
<removeUnusedImports/>
337-
</java>
338-
</configuration>
339-
<executions>
340-
<execution>
341-
<goals>
342-
<goal>apply</goal>
343-
</goals>
344-
<phase>compile</phase>
345-
</execution>
346-
</executions>
347-
</plugin>
348316
<plugin>
349317
<groupId>org.apache.maven.plugins</groupId>
350318
<artifactId>maven-surefire-plugin</artifactId>
@@ -362,6 +330,50 @@
362330
</plugins>
363331
</build>
364332
<profiles>
333+
<profile>
334+
<id>spotless</id>
335+
<activation>
336+
<file>
337+
<exists>contributing</exists>
338+
</file>
339+
</activation>
340+
<build>
341+
<plugins>
342+
<plugin>
343+
<groupId>com.diffplug.spotless</groupId>
344+
<artifactId>spotless-maven-plugin</artifactId>
345+
<configuration>
346+
<pom>
347+
<includes>
348+
<include>pom.xml</include>
349+
<include>./**/pom.xml</include>
350+
</includes>
351+
<sortPom>
352+
<expandEmptyElements>false</expandEmptyElements>
353+
</sortPom>
354+
</pom>
355+
<java>
356+
<eclipse>
357+
<file>contributing/eclipse-google-style.xml</file>
358+
</eclipse>
359+
<importOrder>
360+
<file>contributing/eclipse.importorder</file>
361+
</importOrder>
362+
<removeUnusedImports/>
363+
</java>
364+
</configuration>
365+
<executions>
366+
<execution>
367+
<goals>
368+
<goal>apply</goal>
369+
</goals>
370+
<phase>compile</phase>
371+
</execution>
372+
</executions>
373+
</plugin>
374+
</plugins>
375+
</build>
376+
</profile>
365377
<profile>
366378
<id>integration-tests</id>
367379
<build>

0 commit comments

Comments
 (0)