<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>dev.skywolfxp</groupId>
  <artifactId>discord-channel-html-transcript</artifactId>
  <version>3.0.0</version>

  <name>discord-channel-html-transcript</name>
  <description>
    Java library to generate easily shareable HTML archives of channels, bringing back the familiar Discord visuals!
  </description>
  <url>https://github.com/skywolfxp/discord-channel-html-transcript</url>

  <licenses>
    <license>
      <name>CC BY-SA 4.0</name>
      <url>https://github.com/skywolfxp/discord-channel-html-transcript/blob/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>SkyWolfXP</name>
      <email>contact@skywolfxp.dev</email>
      <url>https://skywolfxp.dev</url>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/skywolfxp/discord-channel-html-transcript</url>
    <connection>scm:git:git://github.com/skywolfxp/discord-channel-html-transcript.git</connection>
    <developerConnection>
      scm:git:ssh://git@github.com:skywolfxp/discord-channel-html-transcript.git
    </developerConnection>
  </scm>

  <properties>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jte.version>3.2.1</jte.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>net.dv8tion</groupId>
      <artifactId>JDA</artifactId>
      <version>5.6.1</version>
      <exclusions>
        <exclusion>
          <groupId>club.minnced</groupId>
          <artifactId>opus-java</artifactId>
        </exclusion>

        <exclusion>
          <groupId>com.google.crypto.tink</groupId>
          <artifactId>tink</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>gg.jte</groupId>
      <artifactId>jte</artifactId>
      <version>${jte.version}</version>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.5.18</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.13.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.18.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.0</version>

        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.11.2</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>3.3.1</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-gpg-plugin</artifactId>
        <version>3.2.7</version>

        <executions>
          <execution>
            <id>sign-artifacts</id>

            <phase>verify</phase>

            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.7.0</version>

        <extensions>true</extensions>

        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
        </configuration>
      </plugin>

      <plugin>
        <groupId>gg.jte</groupId>
        <artifactId>jte-maven-plugin</artifactId>
        <version>${jte.version}</version>

        <configuration>
          <sourceDirectory>${project.basedir}/src/main/resources/template</sourceDirectory>
          <targetDirectory>${project.build.directory}/classes</targetDirectory>
          <trimControlStructures>true</trimControlStructures>
          <contentType>Html</contentType>
        </configuration>

        <executions>
          <execution>
            <phase>process-classes</phase>

            <goals>
              <goal>precompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Dismiss https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>

        <configuration>
          <argLine>-XX:+EnableDynamicAgentLoading</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
