Skip to content

Commit 32286cf

Browse files
onobcdsyer
authored andcommitted
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
1 parent 422289e commit 32286cf

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

samples/grpc-server/pom.xml

+16-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<java.version>17</java.version>
3232
<protobuf-java.version>3.25.2</protobuf-java.version>
3333
<grpc.version>1.63.0</grpc.version>
34+
<spring-javaformat-maven-plugin.version>0.0.39</spring-javaformat-maven-plugin.version>
3435
</properties>
3536
<dependencies>
3637
<dependency>
@@ -79,6 +80,20 @@
7980
<skip>true</skip>
8081
</configuration>
8182
</plugin>
83+
<plugin>
84+
<groupId>io.spring.javaformat</groupId>
85+
<artifactId>spring-javaformat-maven-plugin</artifactId>
86+
<version>${spring-javaformat-maven-plugin.version}</version>
87+
<executions>
88+
<execution>
89+
<phase>validate</phase>
90+
<inherited>true</inherited>
91+
<goals>
92+
<goal>validate</goal>
93+
</goals>
94+
</execution>
95+
</executions>
96+
</plugin>
8297
<plugin>
8398
<groupId>org.xolstice.maven.plugins</groupId>
8499
<artifactId>protobuf-maven-plugin</artifactId>
@@ -102,4 +117,4 @@
102117
</plugins>
103118
</build>
104119

105-
</project>
120+
</project>

0 commit comments

Comments
 (0)