<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>net.guerlab.builder</groupId>
  <artifactId>guerlab-builder</artifactId>
  <version>1.0.2</version>
  <packaging>pom</packaging>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>guerlab builder</description>
  <url>https://gitee.com/guerlab_com/guerlab-builder.git</url>
  <organization>
    <name>guerlab</name>
    <url>https://www.guerlab.net</url>
  </organization>
  <licenses>
    <license>
      <name>GNU LESSER GENERAL PUBLIC LICENSE Version 3</name>
      <url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>guer</id>
      <name>guer</name>
      <email>master@guerlab.net</email>
      <organization>guerlab</organization>
      <organizationUrl>https://www.guerlab.net</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:https://gitee.com/guerlab_com/guerlab-builder.git</connection>
    <developerConnection>scm:git:https://gitee.com/guerlab_com/guerlab-builder.git</developerConnection>
    <url>https://gitee.com/guerlab_com/guerlab-builder</url>
  </scm>
  <issueManagement>
    <system>gitee</system>
    <url>https://gitee.com/guerlab_com/guerlab-builder/issues</url>
  </issueManagement>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <maven.plugin.gpg.version>3.0.1</maven.plugin.gpg.version>
    <project.encoding>UTF-8</project.encoding>
    <maven.plugin.deploy.version>3.0.0-M1</maven.plugin.deploy.version>
    <maven.plugin.javadoc.version>3.3.0</maven.plugin.javadoc.version>
    <maven.plugin.flatten.version>1.1.0</maven.plugin.flatten.version>
    <maven.plugin.compiler.version>3.8.1</maven.plugin.compiler.version>
    <java.version>11</java.version>
    <maven.plugin.resources.version>3.2.0</maven.plugin.resources.version>
    <maven.plugin.spring-boot.version>2.5.1</maven.plugin.spring-boot.version>
    <maven.plugin.failsafe.version>3.0.0-M5</maven.plugin.failsafe.version>
    <maven.plugin.git-commit-id-plugin.version>4.9.10</maven.plugin.git-commit-id-plugin.version>
  </properties>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.plugin.compiler.version}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <encoding>${project.encoding}</encoding>
            <forceJavacCompilerUse>true</forceJavacCompilerUse>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven.plugin.deploy.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven.plugin.failsafe.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven.plugin.gpg.version}</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven.plugin.javadoc.version}</version>
          <configuration>
            <encoding>${project.encoding}</encoding>
            <charset>${project.encoding}</charset>
            <docencoding>${project.encoding}</docencoding>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven.plugin.resources.version}</version>
          <configuration>
            <encoding>${project.encoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>${maven.plugin.flatten.version}</version>
          <executions>
            <execution>
              <id>flatten</id>
              <phase>process-resources</phase>
              <goals>
                <goal>flatten</goal>
              </goals>
            </execution>
            <execution>
              <id>flatten.clean</id>
              <phase>clean</phase>
              <goals>
                <goal>clean</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <updatePomFile>true</updatePomFile>
            <flattenMode>resolveCiFriendliesOnly</flattenMode>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${maven.plugin.spring-boot.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>repackage</goal>
                <goal>build-info</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <layout>ZIP</layout>
            <classifier>exec</classifier>
            <layers>
              <enabled>true</enabled>
            </layers>
            <image>
              <builder>${docker.image.builder}</builder>
              <runImage>${docker.image.runImage}</runImage>
              <name>${docker.repository.url}/${docker.repository.namespace}/${project.artifactId}:${project.version}</name>
              <publish>true</publish>
            </image>
            <docker>
              <publishRegistry>
                <url>${docker.repository.url}</url>
                <username>${docker.repository.username}</username>
                <password>${docker.repository.password}</password>
              </publishRegistry>
            </docker>
          </configuration>
        </plugin>
        <plugin>
          <groupId>pl.project13.maven</groupId>
          <artifactId>git-commit-id-plugin</artifactId>
          <version>${maven.plugin.git-commit-id-plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>revision</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <verbose>true</verbose>
            <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
            <generateGitPropertiesFile>true</generateGitPropertiesFile>
            <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
