8.2. Required Plugins
8.2.1. Plugin List
| Plugin | Purpose |
|---|---|
spring-boot-maven-plugin | Spring Boot executable JAR packaging |
maven-compiler-plugin | Java compiler configuration |
spotless-maven-plugin | Google Java Format verification |
flyway-maven-plugin | Database migration |
jooq-codegen-maven | jOOQ type-safe code generation |
maven-surefire-plugin | Unit test execution |
jacoco-maven-plugin | Test coverage measurement |
Note
For detailed configuration of flyway-maven-plugin and jooq-codegen-maven, refer to the Flyway Migration and jOOQ Usage Standard documents respectively.
8.2.2. maven-compiler-plugin
xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>21</source>
<target>21</target>
<parameters>true</parameters>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin><parameters>true</parameters>: Preserves method parameter names in the bytecode. This is required for name mapping in Spring annotations such as@RequestParamand@PathVariable.-Xlint:all: Enables all compiler warnings.
8.2.3. spotless-maven-plugin
Automatically verifies Google Java Format during the build process. For detailed configuration, refer to the Java Code Convention document.
8.2.4. jacoco-maven-plugin
xml
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.80</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>