added format:validate and formatter:format to validate phase in Maven lifecycle
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle-maven-plugin.version}</version>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ <version>2.13.0</version>
<executions>
<execution>
- <id>check</id>
+ <id>formatter</id>
<phase>validate</phase>
<goals>
- <goal>check</goal>
+ <goal>format</goal>
+ <goal>validate</goal>
</goals>
</execution>
</executions>
<configuration>
- <configLocation>checkstyle.xml</configLocation>
+ <configFile>${project.basedir}/../formatter.xml</configFile>
</configuration>
</plugin>
<plugin>
- <groupId>net.revelc.code.formatter</groupId>
- <artifactId>formatter-maven-plugin</artifactId>
- <version>2.13.0</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle-maven-plugin.version}</version>
<executions>
<execution>
+ <id>check</id>
+ <phase>validate</phase>
<goals>
- <goal>validate</goal>
+ <goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
- <configFile>${project.basedir}/../formatter.xml</configFile>
+ <configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
