<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2010-2024 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

          https://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 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-parent</artifactId>
    <version>45</version>
    <relativePath />
  </parent>

  <groupId>org.mybatis.maven</groupId>
  <artifactId>migrations-maven-plugin</artifactId>
  <version>1.2.0</version>
  <packaging>maven-plugin</packaging>

  <name>MyBatis Migrations Maven plugin</name>
  <description>Migration-plugin is a Apache Maven 3 plugin that aims to integrate into the maven life cycle,
    the myBatis 3 Migration tool. MyBatis 3 Migration Schema is a tool that helps you to manage database
    schema changes.</description>
  <url>https://www.mybatis.org/migrations-maven-plugin/</url>

  <scm>
    <connection>scm:git:ssh://git@github.com/mybatis/migrations-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/mybatis/migrations-maven-plugin.git</developerConnection>
    <tag>migrations-maven-plugin-1.2.0</tag>
    <url>https://github.com/mybatis/migrations-maven-plugin/</url>
  </scm>
  <issueManagement>
    <system>GitHub Issue Management</system>
    <url>https://github.com/mybatis/migrations-maven-plugin/issues</url>
  </issueManagement>
  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/mybatis/migrations-maven-plugin/actions</url>
  </ciManagement>
  <distributionManagement>
    <site>
      <id>gh-pages-scm</id>
      <name>Mybatis GitHub Pages</name>
      <url>scm:git:ssh://git@github.com/mybatis/migrations-maven-plugin.git</url>
    </site>
  </distributionManagement>

  <properties>
    <!-- Java Usage -->
    <java.version>8</java.version>
    <java.release.version>8</java.release.version>

    <findbugs.onlyAnalyze>org.mybatis.maven.mvnmigrate.*</findbugs.onlyAnalyze>
    <module.name>org.mybatis.maven.migrations</module.name>

    <!-- External Modules -->
    <maven.version>3.9.8</maven.version>

    <!-- Targeted patches -->
    <beanutils.version>1.9.4</beanutils.version>
    <collections.version>3.2.2</collections.version>
    <io.version>2.16.1</io.version>
    <lang3.version>3.16.0</lang3.version>

    <!-- Reproducible Builds -->
    <project.build.outputTimestamp>1723398750</project.build.outputTimestamp>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.13.1</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-migrations</artifactId>
      <version>3.4.0</version>
    </dependency>

    <!-- Dependencies for Analyze-report mojo -->
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>4.0.0-M12</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-sink-api</artifactId>
      <version>2.0.0-M12</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-core</artifactId>
      <version>2.0.0-M12</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-site-renderer</artifactId>
      <version>2.0.0-M19</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
      <version>4.0.0-M15</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>4.0.0-beta-1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>2.7.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>4.0.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-xml</artifactId>
      <version>3.0.1</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-shared-utils</artifactId>
      <version>3.4.2</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>33.2.1-jre</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.10.3</version>
      <scope>test</scope>
    </dependency>
    <!-- Needed still for Plexus Test Case code borrowed from Maven as we don't want to modify their library -->
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>5.10.3</version>
      <scope>test</scope>
    </dependency>

    <!-- Commons Patches due to maven legacy usage and vulnerabilities in many cases -->
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>${beanutils.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>${collections.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${io.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${lang3.version}</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.36</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <debug>false</debug>
          <projectsDirectory>${project.basedir}/src/it</projectsDirectory>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <pomIncludes>
            <pomInclude>**/pom.xml</pomInclude>
          </pomIncludes>
          <pomExcludes>
            <pomExclude>**/mod1/pom.xml</pomExclude>
            <pomExclude>**/mod2/pom.xml</pomExclude>
            <pomExclude>**/mod3/pom.xml</pomExclude>
          </pomExcludes>
          <postBuildHookScript>verify.bsh</postBuildHookScript>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.13.1</version>
        <configuration>
          <goalPrefix>migration</goalPrefix>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <property>
              <name>migrationHome</name>
              <value>${project.build.directory}</value>
            </property>
            <property>
              <name>java.io.tmpdir</name>
              <value>${project.build.directory}</value>
            </property>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <licenseSets>
            <licenseSet>
              <excludes combine.children="append">
                <exclude>**/README</exclude>
                <exclude>**/verify.bsh</exclude>
              </excludes>
            </licenseSet>
          </licenseSets>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-report-plugin</artifactId>
        <version>3.13.1</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>eclipse</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
              <groupId>org.eclipse.m2e</groupId>
              <artifactId>lifecycle-mapping</artifactId>
              <version>1.0.0</version>
              <configuration>
                <lifecycleMappingMetadata>
                  <pluginExecutions>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-plugin-plugin</artifactId>
                        <versionRange>[3.13.1,)</versionRange>
                        <goals>
                          <goal>helpmojo</goal>
                          <goal>descriptor</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore />
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <versionRange>[3.7.0,)</versionRange>
                        <goals>
                          <goal>install</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore />
                      </action>
                    </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>

</project>
