Add format plugin to samples

This adds the spring-javaformat plugin to the samples
module. The motivation is as follows:

- Keep the samples in the Spring recommended format
- Allow running `./mvnw spring-javaformat:apply` at project root
This commit is contained in:
Chris Bono
2024-09-22 13:02:29 -05:00
committed by Dave Syer
parent 422289e800
commit 32286cfbed

View File

@@ -31,6 +31,7 @@
<java.version>17</java.version>
<protobuf-java.version>3.25.2</protobuf-java.version>
<grpc.version>1.63.0</grpc.version>
<spring-javaformat-maven-plugin.version>0.0.39</spring-javaformat-maven-plugin.version>
</properties>
<dependencies>
<dependency>
@@ -79,6 +80,20 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>${spring-javaformat-maven-plugin.version}</version>
<executions>
<execution>
<phase>validate</phase>
<inherited>true</inherited>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
@@ -102,4 +117,4 @@
</plugins>
</build>
</project>
</project>