<?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>
  <groupId>ch.astorm</groupId>
  <artifactId>smtp4j</artifactId>
  <packaging>jar</packaging>
  <version>4.2.0</version>
  <name>smtp4j</name>
  <description>Simple SMTP Server</description>
  <url>https://github.com/ctabin/smtp4j</url>
  <licenses>
    <license>
      <name>LGPL-2.1</name>
      <url>https://raw.githubusercontent.com/ctabin/smtp4j/smtp4j-${project.version}/LICENCE</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Cédric Tabin</name>
      <email>tabin.cedric@gmail.com</email>
      <organization>astorm</organization>
      <organizationUrl>http://www.astorm.ch</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/ctabin/smtp4j.git</connection>
    <developerConnection>scm:git:git@github.com:ctabin/smtp4j.git</developerConnection>
    <url>http://github.com/ctabin/smtp4j/tree/master</url>
    <tag>smtp4j-4.2.0</tag>
  </scm>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <build>
    <plugins>
      <!-- Compilation with JDK21 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.1</version>
        <configuration>
          <debug>false</debug>
          <release>21</release>
        </configuration>
      </plugin>
      <!-- JUnit 5 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.3</version>
        <dependencies>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>6.0.0</version>
          </dependency>
        </dependencies>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
          <runOrder>alphabetical</runOrder>
          <statelessTestsetReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter">
            <disable>true</disable>
          </statelessTestsetReporter>
        </configuration>
      </plugin>
      <!-- Javadoc generation -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.12.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <show>public</show>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Sources generation -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- SCM provider for maven -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.1.1</version>
      </plugin>
      <!-- Maven central distribution on https://central.sonatype.com -->
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.9.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
          <publishingServerId>ossrh</publishingServerId>
        </configuration>
      </plugin>
      <!-- GPG signature -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.8</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Ensures at least maven 3.8.0 is used with a correct JDK version -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.1</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[3.8.0,)</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[11,)</version>
                </requireJavaVersion>
                <banDuplicatePomDependencyVersions />
                
                <!-- Do not activate this, otherwise it won't be possible to compile
                     only submodules. -->
                <!--reactorModuleConvergence /-->
                <!--requireProfileIdsExist/-->
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <!-- jakarta.mail API -->
    <dependency>
      <groupId>com.sun.mail</groupId>
      <artifactId>jakarta.mail</artifactId>
      <version>2.0.2</version>
    </dependency>
    <!-- JUnit -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>6.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-suite-engine</artifactId>
      <version>6.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <version>6.0.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
