Closed
Description
We would like to default to always applying formatting rules and then validating, i.e.
<build>
<plugins>
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>0.0.35</version>
<executions>
<execution>
<phase>validate</phase>
<inherited>true</inherited>
<goals>
<goal>apply</goal>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
However, in our pipelines we then need to skip the apply goal to make sure that the code is actually correctly validated.
We would like to avoid using profiles and just add command line parameter similar to -Dmaven.test.skip
, e.g.
-Dspring-javaformat.apply.skip
-Dspring-javaformat.validate.skip
I've checked issues and code and could not see that it has been brought up or is implemented.