Skip to content

8.2. Required Plugins

8.2.1. Plugin List

PluginPurpose
spring-boot-maven-pluginSpring Boot executable JAR packaging
maven-compiler-pluginJava compiler configuration
spotless-maven-pluginGoogle Java Format verification
flyway-maven-pluginDatabase migration
jooq-codegen-mavenjOOQ type-safe code generation
maven-surefire-pluginUnit test execution
jacoco-maven-pluginTest 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 @RequestParam and @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>

TIENIPIA QUALIFIED STANDARD