<?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>com.github.imrafaelmerino</groupId>
  <artifactId>jio-test</artifactId>
  <version>3.0.0-RC2</version>
  <name>jio-test</name>
  <description>JIO test library based on Property Based Testing and Java Flight Recording
    Debuggers
  </description>
  <url>https://github.com/imrafaelmerino/jio</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>imrafaelmerino</id>
      <name>Rafael Merino García</name>
      <email>imrafaelmerino@gmail.com</email>
    </developer>
  </developers>
  <scm>
    <url>https://github.com/imrafaelmerino/jio.git</url>
  </scm>

  <properties>
    <error-prone.version>2.25.0</error-prone.version>
    <NEXUS-STAGING-MAVEN-PLUGIN.VERSION>1.6.12</NEXUS-STAGING-MAVEN-PLUGIN.VERSION>
    <MAVEN-GPG-PLUGIN.VERSION>1.6</MAVEN-GPG-PLUGIN.VERSION>
    <MAVEN-SOURCE-PLUGIN.VERSION>3.0.1</MAVEN-SOURCE-PLUGIN.VERSION>
    <JACOCO-MAVEN-PLUGIN.VERSION>0.8.8</JACOCO-MAVEN-PLUGIN.VERSION>
    <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
    <MAVEN-COMPILER-PLUGIN.VERSION>3.10.1</MAVEN-COMPILER-PLUGIN.VERSION>
    <MAVEN-COMPILER-PLUGIN.SOURCE>21</MAVEN-COMPILER-PLUGIN.SOURCE>
    <MAVEN-COMPILER-PLUGIN.TARGET>21</MAVEN-COMPILER-PLUGIN.TARGET>
    <MAVEN-SUREFIRE-PLUGIN.VERSION>3.2.5</MAVEN-SUREFIRE-PLUGIN.VERSION>
    <MAVEN-JAR-PLUGIN.VERSION>3.2.2</MAVEN-JAR-PLUGIN.VERSION>
    <MAVEN-JAVADOC-PLUGIN.VERSION>3.5.0</MAVEN-JAVADOC-PLUGIN.VERSION>
    <JUNIT-JUPITER-ENGINE.VERSION>5.1.1</JUNIT-JUPITER-ENGINE.VERSION>
    <POSTGRESQL.VERSION>42.7.1</POSTGRESQL.VERSION>
    <TESTCONTAINERS.VERSION>1.17.2</TESTCONTAINERS.VERSION>
    <JIO-EXP-VERSION>3.0.0-RC2</JIO-EXP-VERSION>
    <JIO-HTTP.VERSION>3.0.0-RC2</JIO-HTTP.VERSION>
    <JIO-CONSOLE.VERSION>3.0.0-RC2</JIO-CONSOLE.VERSION>
    <JAVA-FUN.VERSION>2.1.0</JAVA-FUN.VERSION>
    <JIO-MONGODB-VERSION>3.0.0-RC2</JIO-MONGODB-VERSION>
    <JIO-JDBC-VERSION>3.0.0-RC2</JIO-JDBC-VERSION>
    <LOGBACK-CLASSIC.VERSION>1.4.12</LOGBACK-CLASSIC.VERSION>
    <FLYWAY-CORE.VERSION>7.7.3</FLYWAY-CORE.VERSION>
    <MONGODB-DRIVER-SYNC.VERSION>4.11.0</MONGODB-DRIVER-SYNC.VERSION>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${MAVEN-SUREFIRE-PLUGIN.VERSION}</version>
        <executions>
          <execution>
            <id>unit-tests</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <argLine>--enable-preview</argLine>
          <includes>
            <include>**/*Test.java</include>
            <include>**/*Tests.java</include>
            <include>**/*Property.java</include>
            <include>**/*Properties.java</include>
          </includes>
          <failIfNoTests>false</failIfNoTests>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${MAVEN-JAR-PLUGIN.VERSION}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${MAVEN-JAVADOC-PLUGIN.VERSION}</version>
        <configuration>
          <additionalOptions>--enable-preview</additionalOptions>
          <source>${MAVEN-COMPILER-PLUGIN.SOURCE}</source>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>${MAVEN-COMPILER-PLUGIN.SOURCE}</source>
          <target>${MAVEN-COMPILER-PLUGIN.TARGET}</target>
          <showWarnings>true</showWarnings>
          <encoding>${project.build.sourceEncoding}</encoding>
          <compilerArgs>
            <arg>-XDcompilePolicy=simple</arg>
            <arg>-Xplugin:ErrorProne</arg>
            <arg>-Xlint:all</arg>
            <arg>--enable-preview</arg>
          </compilerArgs>
          <annotationProcessorPaths>
            <path>
              <groupId>com.google.errorprone</groupId>
              <artifactId>error_prone_core</artifactId>
              <version>${error-prone.version}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>jio-exp</artifactId>
      <version>${JIO-EXP-VERSION}</version>
    </dependency>

    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>jio-console</artifactId>
      <version>${JIO-CONSOLE.VERSION}</version>
    </dependency>

    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>java-fun</artifactId>
      <version>${JAVA-FUN.VERSION}</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${JUNIT-JUPITER-ENGINE.VERSION}</version>
    </dependency>

    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>jio-http</artifactId>
      <version>${JIO-HTTP.VERSION}</version>
    </dependency>

    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>${POSTGRESQL.VERSION}</version>
      <scope>test</scope>
    </dependency>


    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-core</artifactId>
      <version>${FLYWAY-CORE.VERSION}</version>
      <scope>test</scope>
    </dependency>

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

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>postgresql</artifactId>
      <version>${TESTCONTAINERS.VERSION}
      </version>
      <scope>test</scope>
    </dependency>


    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${LOGBACK-CLASSIC.VERSION}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${LOGBACK-CLASSIC.VERSION}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.1.0-alpha1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>jio-jdbc</artifactId>
      <version>${JIO-JDBC-VERSION}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>jio-mongodb</artifactId>
      <version>${JIO-MONGODB-VERSION}</version>
      <scope>test</scope>
    </dependency>


  </dependencies>
  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <distributionManagement>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${NEXUS-STAGING-MAVEN-PLUGIN.VERSION}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${MAVEN-GPG-PLUGIN.VERSION}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</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</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>coverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${JACOCO-MAVEN-PLUGIN.VERSION}</version>
            <executions>
              <execution>
                <id>prepare-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>report</id>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>