<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>de.ofterdinger.parents</groupId>
    <artifactId>parent</artifactId>
    <version>0.1.3</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>build</artifactId>
  <packaging>pom</packaging>

  <name>de.ofterdinger.parent - build</name>
  <description>A reusable Maven parent aritfact that provides versions and default configurations of commonly used build plugins.</description>
  <url>https://github.com/ofterdinger/de.ofterdinger.parent</url>

  <properties>
    <!-- https://search.maven.org/artifact/com.google.googlejavaformat/google-java-format -->
    <google-java-format.version>1.15.0</google-java-format.version>

    <!-- https://search.maven.org/artifact/org.codehaus.mojo/keytool-api -->
    <keytool-api.version>1.6</keytool-api.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <trimStackTrace>false</trimStackTrace>
          </configuration>
        </plugin>

        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>${spotless-maven-plugin.version}</version>
          <configuration>
            <java>
              <removeUnusedImports />
              <googleJavaFormat>
                <version>${google-java-format.version}</version>
                <style>GOOGLE</style>
              </googleJavaFormat>
            </java>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>webstart-maven-plugin</artifactId>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>keytool-api-1.7</artifactId>
              <version>${keytool-api.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>