<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2020-2022 the original author or authors.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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>io.mybatis</groupId>
  <artifactId>mybatis-parent</artifactId>
  <version>2.2.3</version>
  <packaging>pom</packaging>
  <name>mybatis-parent</name>
  <description>MyBatis Mapper Parent</description>
  <url>https://mybatis.io</url>
  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>https://github.com/mybatis-mapper/mapper/blob/master/LICENSE</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>abel533</name>
      <email>abel533@gmail.com</email>
    </developer>
  </developers>
  <modules>
    <module>bom</module>
    <module>mapper</module>
    <module>service</module>
    <module>activerecord</module>
    <module>common</module>
    <module>generator</module>
    <module>jpa</module>
    <module>jakarta-jpa</module>
  </modules>
  <scm>
    <connection>scm:git:git@github.com:mybatis-mapper/mapper.git</connection>
    <developerConnection>scm:git:git@github.com:mybatis-mapper/mapper.git</developerConnection>
    <url>git@github.com:mybatis-mapper/mapper.git</url>
  </scm>
  <properties>
    <mybatis-spring.version>2.1.0</mybatis-spring.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <junit.version>4.13.2</junit.version>
    <logback.version>1.2.11</logback.version>
    <mybatis.version>3.5.13</mybatis.version>
    <maven.compiler.source>8</maven.compiler.source>
    <hsqldb.version>2.5.2</hsqldb.version>
    <springboot.version>2.7.9</springboot.version>
    <h2.version>2.1.214</h2.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <revision>2.2.3</revision>
    <maven.compiler.target>8</maven.compiler.target>
    <springframework.version>5.3.25</springframework.version>
    <mybatis-spring-boot.version>2.3.0</mybatis-spring-boot.version>
    <provider.version>2.2.5</provider.version>
    <argLine>-Dfile.encoding=UTF-8</argLine>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.mybatis</groupId>
        <artifactId>mybatis-provider</artifactId>
        <version>${provider.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mybatis</groupId>
        <artifactId>mybatis</artifactId>
        <version>${mybatis.version}</version>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.mybatis</groupId>
        <artifactId>mybatis-spring</artifactId>
        <version>${mybatis-spring.version}</version>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.mybatis.spring.boot</groupId>
        <artifactId>mybatis-spring-boot-starter</artifactId>
        <version>${mybatis-spring-boot.version}</version>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>${hsqldb.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${h2.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>${springframework.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${springboot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>maven-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
  </repositories>
  <build>
    <testResources>
      <testResource>
        <directory>${project.build.testSourceDirectory}</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </testResource>
      <testResource>
        <directory>${project.basedir}/src/test/resources</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <compilerArgs>
            <arg>-parameters</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.1.0</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>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.2.0</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalOptions>
                    <additionalOption>-Xdoclint:none</additionalOption>
                  </additionalOptions>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <additionalOptions>
                <additionalOption>-Xdoclint:none</additionalOption>
              </additionalOptions>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <argument>--pinentry-mode</argument>
                    <argument>loopback</argument>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <gpgArguments>
                <argument>--pinentry-mode</argument>
                <argument>loopback</argument>
              </gpgArguments>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.13</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>injected-nexus-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <serverId>ossrh</serverId>
                  <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                  <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>
</project>
