<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>


  <name>Dependency Lock Maven Plugin</name>
  <description>Maven plugin that makes sure that Maven dependency are not accidentally changed.</description>
  <url>https://github.com/vandmo/dependency-lock-maven-plugin</url>

  <groupId>se.vandmo</groupId>
  <artifactId>dependency-lock-maven-plugin</artifactId>
  <version>1.3.2</version>
  <packaging>maven-plugin</packaging>


  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <!-- Where XSDs being tested will be published -->
    <test.xsd.directories>${project.build.directory}/generated-test-sources/xsds</test.xsd.directories>
    <!-- SCM publish configuration -->
    <scm.publish.password>${env.GITHUB_TOKEN}</scm.publish.password>
    <scm.publish.username />
    <scm.publish.branch>gh-pages</scm.publish.branch>

    <!-- Maven Plugin Versions -->
    <central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
    <dependency-lock-maven-plugin.version>0.0.2ea83aea976dd358aab53965fd961c8d614f835f</dependency-lock-maven-plugin.version>
    <maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
    <maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
    <maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
    <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    <maven-install-plugin.version>3.1.3</maven-install-plugin.version>
    <maven-invoker-plugin.version>3.8.1</maven-invoker-plugin.version>
    <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <maven-plugin-plugin.version>3.15.1</maven-plugin-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <maven-site-plugin.version>3.21.0</maven-site-plugin.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
    <maven-wrapper-plugin.version>3.2.0</maven-wrapper-plugin.version>
    <mrm-maven-plugin.version>1.6.0</mrm-maven-plugin.version>

    <!-- Libraries -->
    <commons-io.version>2.17.0</commons-io.version>
    <commons-lang3.version>3.18.0</commons-lang3.version>
    <freemarker.version>2.3.33</freemarker.version>
    <guava.version>33.3.1-jre</guava.version>
    <hamcrest.version>2.2</hamcrest.version>
    <jsr305.version>3.0.2</jsr305.version>
    <junit.version>4.13.2</junit.version>
    <maven-artifact.version>3.9.11</maven-artifact.version>
    <maven-common-artifact-filters.version>3.4.0</maven-common-artifact-filters.version>
    <maven-compat.version>3.9.11</maven-compat.version>
    <maven-core.version>3.9.11</maven-core.version>
    <maven-model.version>3.9.11</maven-model.version>
    <maven-plugin-annotations.version>3.15.1</maven-plugin-annotations.version>
    <maven-plugin-api.version>3.9.11</maven-plugin-api.version>
    <plexus-utils.version>3.6.0</plexus-utils.version>
    <stax2-api.version>4.2.1</stax2-api.version>
    <woodstox-core.version>6.4.0</woodstox-core.version>

    <!-- BOMs -->
    <jackson-bom.version>2.18.3</jackson-bom.version>
  </properties>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Mikael Vandmo</name>
      <email>mikael@vandmo.se</email>
    </developer>
  </developers>

  <profiles>
    <profile>
      <id>sign</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>analyze</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>${maven-dependency-plugin.version}</version>
            <executions>
              <execution>
                <id>enforce-correct-java-compile-dependencies</id>
                <phase>validate</phase>
                <goals>
                  <goal>analyze</goal>
                </goals>
                <configuration>
                  <failOnWarning>true</failOnWarning>
                  <ignoreNonCompile>true</ignoreNonCompile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${maven-invoker-plugin.version}</version>
            <configuration>
              <setupIncludes>
                <setupInclude>setup/*/pom.xml</setupInclude>
              </setupIncludes>
              <pomIncludes>
                <pomInclude>*/*/pom.xml</pomInclude>
              </pomIncludes>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <addTestClassPath>true</addTestClassPath>
              <streamLogs>true</streamLogs>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>${jsr305.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>${plexus-utils.version}</version>
      </dependency>

      <!-- Transitively pulled but with CVE warnings on each of them -->
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-archiver</artifactId>
        <version>4.10.0</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.17.0</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>${hamcrest.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-testing</groupId>
        <artifactId>maven-plugin-testing-harness</artifactId>
        <version>3.3.0</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.plexus</artifactId>
        <version>0.9.0.M3</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest</artifactId>
        <version>${hamcrest.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-compat</artifactId>
        <version>${maven-compat.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven-plugin-api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${maven-plugin-annotations.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${maven-artifact.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven-core.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.woodstox</groupId>
      <artifactId>woodstox-core</artifactId>
      <version>${woodstox-core.version}</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>stax2-api</artifactId>
      <version>${stax2-api.version}</version>
    </dependency>
    <dependency>
      <groupId>org.freemarker</groupId>
      <artifactId>freemarker</artifactId>
      <version>${freemarker.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-common-artifact-filters</artifactId>
      <version>${maven-common-artifact-filters.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${maven-model.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-api</artifactId>
      <version>1.6.3</version>
    </dependency>
    <!-- For tests -->
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- Used at both compile (indirectly) and test time -->
    <dependency>
      <groupId>org.eclipse.sisu</groupId>
      <artifactId>org.eclipse.sisu.plexus</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-util</artifactId>
      <version>1.9.22</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>4.11.0</version>
      <scope>test</scope>
    </dependency>
    <!-- Used for logging purposes -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.36</version>
      <scope>test</scope>
    </dependency>
    <!-- Only way to have an XML Schema 1.1 Compliant xerces implementation -->
    <dependency>
      <groupId>org.exist-db.thirdparty.xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.12.2</version>
      <classifier>xml-schema-1.1</classifier>
      <scope>test</scope>
    </dependency>
    <!-- Required at runtime for xerces Impl XML Schema 1.1 support-->
    <dependency>
      <groupId>org.exist-db.thirdparty.org.eclipse.wst.xml</groupId>
      <artifactId>xpath2</artifactId>
      <version>1.2.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>edu.princeton.cup</groupId>
      <artifactId>java-cup</artifactId>
      <version>10k</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.4.01</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <filters>
      <filter>resources.properties</filter>
    </filters>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>${maven-enforcer-plugin.version}</version>
        <executions>
          <execution>
            <id>enforce-good-practices</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <rules>
                <requirePluginVersions />
                <requireMavenVersion>
                  <version>3.3</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>1.8</version>
                </requireJavaVersion>
                <requireUpperBoundDeps />
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>se.vandmo</groupId>
        <artifactId>dependency-lock-maven-plugin</artifactId>
        <version>${dependency-lock-maven-plugin.version}</version>
        <configuration>
          <format>pom</format>
          <lockBuild>true</lockBuild>
        </configuration>
        <executions>
          <execution>
            <id>check</id>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.19.0</version>
          </dependency>
          <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.27.1</version>
          </dependency>
          <dependency>
            <groupId>org.iq80.snappy</groupId>
            <artifactId>snappy</artifactId>
            <version>0.5</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>${maven-clean-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>${maven-install-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.iq80.snappy</groupId>
            <artifactId>snappy</artifactId>
            <version>0.5</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${maven-resources-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.19.0</version>
          </dependency>
        </dependencies>
        <configuration>
          <useDefaultDelimiters>false</useDefaultDelimiters>
          <delimiters>
            <delimiter>@</delimiter>
          </delimiters>
        </configuration>
        <executions>
          <execution>
            <id>prepare-xsd-test-resources</id>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <!--
             Should be generate-test-resources but for IDE integration
             it avoids having to compile everything
            -->
            <phase>generate-resources</phase>
            <configuration>
              <outputDirectory>${test.xsd.directories}</outputDirectory>
              <resources>
                <resource>
                  <directory>src/site/xsd</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
              <filters>
                <filter>test-resources.properties</filter>
              </filters>
            </configuration>
          </execution>
          <execution>
            <id>generate-site-xsds</id>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <phase>pre-site</phase>
            <configuration>
              <outputDirectory>${project.build.directory}/site</outputDirectory>
              <resources>
                <resource>
                  <directory>src/site/xsd</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>add-test-resource</goal>
            </goals>
            <phase>process-resources</phase>
            <configuration>
              <resources>
                <resource>
                  <directory>${test.xsd.directories}</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>stage</goal>
            </goals>
            <phase>post-site</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-publish-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>publish-scm</goal>
            </goals>
            <phase>site-deploy</phase>
            <configuration>
              <!-- 
              An empty css file is being generated by the site generation, let's ignore it for now
              -->
              <excludes>css/**</excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>biz.aQute.bnd</groupId>
            <artifactId>biz.aQute.bndlib</artifactId>
            <version>5.3.0</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${central-publishing-maven-plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
              <version>2.19.0</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven-plugin-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
          <configuration>
            <skip>true</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-wrapper-plugin</artifactId>
          <version>${maven-wrapper-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
              <version>2.19.0</version>
            </dependency>
          </dependencies>
          <configuration>
            <!-- Not interested yet in having reports generated -->
            <generateReports>false</generateReports>
            <generateProjectInfo>false</generateProjectInfo>
            <!-- We won't be relying on the default deployment mechanism -->
            <skipDeploy>true</skipDeploy>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>3.3.0</version>
          <configuration>
            <username>${scm.publish.username}</username>
            <password>${scm.publish.password}</password>
            <scmBranch>${scm.publish.branch}</scmBranch>
            <pubScmUrl>scm:git:https://github.com/vandmo/dependency-lock-maven-plugin.git</pubScmUrl>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <distributionManagement>
    <site>
      <id>github</id>
      <url>scm:git:git@github.com:vandmo/dependency-lock-maven-plugin.git</url>
    </site>
  </distributionManagement>

  <scm>
    <connection>scm:git:git@github.com:vandmo/dependency-lock-maven-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:vandmo/dependency-lock-maven-plugin.git</developerConnection>
    <url>git@github.com:vandmo/dependency-lock-maven-plugin.git</url>
    <tag>HEAD</tag>
  </scm>

</project>
