<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>

  <groupId>dev.jcputney</groupId>
  <artifactId>elearning-module-parser</artifactId>
  <version>0.2.2</version>
  <name>elearning-module-parser</name>

  <description>A library for parsing eLearning module configuration files and packages</description>
  <url>https://github.com/jcputney/elearning-module-parser</url>

  <scm>
    <url>${project.url}</url>
    <connection>scm:git:https://github.com/jcputney/elearning-module-parser.git</connection>
    <developerConnection>scm:git:git@github.com:jcputney/elearning-module-parser.git
    </developerConnection>
    <tag>v0.2.2</tag>
  </scm>

  <developers>
    <developer>
      <id>jcputney</id>
      <name>Jonathan Putney</name>
      <email>jonathan@putney.io</email>
      <url>https://github.com/jcputney</url>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>GNU Lesser General Public License v3.0</name>
      <url>https://www.gnu.org/licenses/lgpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <skipTests>false</skipTests>

    <!-- Dependency Versions -->

    <version.ascii-table>1.8.0</version.ascii-table>
    <version.assertj>3.27.6</version.assertj>
    <version.aws.sdk.v1>1.12.792</version.aws.sdk.v1>
    <version.aws.sdk.v2>2.35.11</version.aws.sdk.v2>
    <version.commons-configuration2>2.12.0</version.commons-configuration2>
    <version.commons.compress>1.28.0</version.commons.compress>
    <version.commons.lang3>3.19.0</version.commons.lang3>
    <version.jackson>2.20.0</version.jackson>
    <version.jakarta.xml.bind>4.0.4</version.jakarta.xml.bind>
    <version.jmh>1.37</version.jmh>
    <version.jqwik>1.9.3</version.jqwik>
    <version.junit>6.0.0</version.junit>
    <version.log4j-to-slf4j>2.25.2</version.log4j-to-slf4j>
    <version.logback>1.5.20</version.logback>
    <version.mockito>5.20.0</version.mockito>
    <version.org.json>20250517</version.org.json>
    <version.plugin.central-publishing>0.9.0</version.plugin.central-publishing>
    <version.plugin.compiler>3.14.1</version.plugin.compiler>
    <version.plugin.exec>3.6.2</version.plugin.exec>
    <version.plugin.failsafe>3.5.4</version.plugin.failsafe>
    <version.plugin.gpg>3.2.8</version.plugin.gpg>
    <version.plugin.jacoco>0.8.14</version.plugin.jacoco>
    <version.plugin.javadoc>3.12.0</version.plugin.javadoc>
    <version.plugin.release>3.1.1</version.plugin.release>
    <version.plugin.shade>3.6.1</version.plugin.shade>
    <version.plugin.source>3.3.1</version.plugin.source>
    <version.plugin.surefire>3.5.4</version.plugin.surefire>
    <version.plugin.wrapper>3.3.4</version.plugin.wrapper>
    <version.poi.ooxml>5.4.1</version.poi.ooxml>
    <version.slf4j>2.0.17</version.slf4j>
    <version.testcontainers>1.21.3</version.testcontainers>
    <version.threeten>1.8.0</version.threeten>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>bom</artifactId>
        <version>${version.aws.sdk.v2}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-configuration2</artifactId>
      <version>${version.commons-configuration2}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang3</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${version.commons.lang3}</version>
    </dependency>
    <dependency>
      <groupId>org.threeten</groupId>
      <artifactId>threeten-extra</artifactId>
      <version>${version.threeten}</version>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>${version.org.json}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-xml</artifactId>
      <version>${version.jackson}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${version.jackson}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-csv</artifactId>
      <version>${version.jackson}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
      <version>${version.jackson}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <version>${version.jakarta.xml.bind}</version>
    </dependency>
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-java-sdk-s3</artifactId>
      <version>${version.aws.sdk.v1}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-codec</groupId>
          <artifactId>commons-codec</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>s3</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>auth</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>aws-core</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>sso</artifactId>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>ssooidc</artifactId>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>

    <!-- Test Dependencies -->

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>net.jqwik</groupId>
      <artifactId>jqwik</artifactId>
      <version>${version.jqwik}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${version.mockito}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>${version.mockito}</version>
      <scope>test</scope>
    </dependency>

    <!-- Testcontainers Dependencies -->
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>${version.testcontainers}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-compress</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>${version.commons.compress}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang3</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${version.testcontainers}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>localstack</artifactId>
      <version>${version.testcontainers}</version>
      <scope>test</scope>
    </dependency>

    <!-- Benchmarking Dependencies -->
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-core</artifactId>
      <version>${version.jmh}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-generator-annprocess</artifactId>
      <version>${version.jmh}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.github.freva</groupId>
      <artifactId>ascii-table</artifactId>
      <version>${version.ascii-table}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>${version.poi.ooxml}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${version.assertj}</version>
      <scope>test</scope>
    </dependency>


    <!-- Logging Dependencies -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-to-slf4j</artifactId>
      <version>${version.log4j-to-slf4j}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${version.slf4j}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${version.logback}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${version.plugin.release}</version>
          <configuration>
            <arguments>-ntp</arguments>
            <scmCommentPrefix />
            <tagNameFormat>v@{project.version}</tagNameFormat>
            <releaseProfiles>central</releaseProfiles>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-wrapper-plugin</artifactId>
        <version>${version.plugin.wrapper}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.plugin.compiler}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${version.plugin.gpg}</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${version.plugin.javadoc}</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${version.plugin.source}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${version.plugin.surefire}</version>
        <configuration>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${version.plugin.failsafe}</version>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${version.plugin.jacoco}</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <configuration>
              <skip>${skipTests}</skip>
            </configuration>
          </execution>
          <execution>
            <id>default-report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <skip>${skipTests}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>benchmark</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${version.plugin.compiler}</version>
            <configuration>
              <annotationProcessorPaths>
                <path>
                  <groupId>org.openjdk.jmh</groupId>
                  <artifactId>jmh-generator-annprocess</artifactId>
                  <version>${version.jmh}</version>
                </path>
              </annotationProcessorPaths>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>compile</goal>
                  <goal>testCompile</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>${version.plugin.shade}</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <finalName>benchmarks</finalName>
                  <transformers>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                      <mainClass>org.openjdk.jmh.Main</mainClass>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                  </transformers>
                  <filters>
                    <filter>
                      <artifact>*:*</artifact>
                      <excludes>
                        <exclude>META-INF/*.SF</exclude>
                        <exclude>META-INF/*.DSA</exclude>
                        <exclude>META-INF/*.RSA</exclude>
                      </excludes>
                    </filter>
                  </filters>
                  <artifactSet>
                    <includes>
                      <include>dev.jcputney:*</include>
                      <include>org.openjdk.jmh:*</include>
                      <include>net.sf.jopt-simple:*</include>
                      <include>org.apache.commons:*</include>
                      <include>commons-io:*</include>
                      <include>com.fasterxml.jackson.core:*</include>
                      <include>com.fasterxml.jackson.dataformat:*</include>
                      <include>com.google.code.gson:*</include>
                      <include>org.slf4j:*</include>
                      <include>ch.qos.logback:*</include>
                    </includes>
                  </artifactSet>
                  <createDependencyReducedPom>false</createDependencyReducedPom>
                  <shadeTestJar>true</shadeTestJar>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${version.plugin.exec}</version>
            <configuration>
              <classpathScope>test</classpathScope>
              <mainClass>org.openjdk.jmh.Main</mainClass>
              <commandlineArgs>${jmh.options}</commandlineArgs>
              <systemProperties>
                <systemProperty>
                  <key>jmh.separateClasspathJAR</key>
                  <value>true</value>
                </systemProperty>
              </systemProperties>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.plugin.surefire}</version>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>github</id>
      <distributionManagement>
        <repository>
          <id>github</id>
          <name>GitHub Packages</name>
          <url>https://maven.pkg.github.com/jcputney/elearning-module-parser</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <id>central</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>${version.plugin.central-publishing}</version>
            <extensions>true</extensions>
            <configuration>
              <autoPublish>true</autoPublish>
              <waitUntil>published</waitUntil>
              <deploymentName>${project.artifactId}:${project.version}</deploymentName>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
