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

  <parent>
    <groupId>org.meeuw.math</groupId>
    <artifactId>mihxil-math-parent</artifactId>
    <version>0.12.0</version>
  </parent>
  <artifactId>mihxil-math-lib-parent</artifactId>
  <packaging>pom</packaging>


  <description>Serves as a parent for the modules that are distributed as a library. And are e.g. still java 8 compatible.</description>
  <url>https://github.com/mihxil/math</url>

  <properties>
    <java.target.version>8</java.target.version>
    <java.version>17</java.version>
  </properties>


  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>ch.obermuhlner</groupId>
        <artifactId>big-math</artifactId>
        <version>${big-math.version}</version>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>jakarta.validation</groupId>
        <artifactId>jakarta.validation-api</artifactId>
        <version>${jakarta-validation.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.hibernate.validator</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>${hibernate-validator.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>net.jqwik</groupId>
        <artifactId>jqwik</artifactId>
        <version>${jqwik.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-bom</artifactId>
        <version>${log4j.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.reflections</groupId>
        <artifactId>reflections</artifactId>
        <version>${reflections.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.annotation</groupId>
        <artifactId>jakarta.annotation-api</artifactId>
        <version>2.1.1</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.checkerframework</groupId>
      <artifactId>checker-qual</artifactId>
      <version>${checkerframework.version}</version>
      <scope>provided</scope>
    </dependency>
      <dependency>
      <groupId>net.jqwik</groupId>
      <artifactId>jqwik</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>



  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <compilerArgs>
            <arg>-AprintErrorStack</arg>
            <arg>-Awarns</arg>
          </compilerArgs>
          <annotationProcessorPaths>
            <path>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
              <version>${lombok.version}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <!-- compile everything to ensure module-info contains right entries -->
              <source>${java.version}</source>
              <release>${java.version}</release>
            </configuration>
          </execution>
          <execution>
            <id>base-compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <!-- recompile everything for target VM except the module-info.java -->
            <configuration>
              <excludes>
                <exclude>module-info.java</exclude>
              </excludes>
              <source>${java.target.version}</source>
              <release>${java.target.version}</release>
            </configuration>
          </execution>
          <execution>
            <id>test-compile</id>
            <phase>process-test-sources</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <source>${java.version}</source>
              <release>${java.version}</release>
            </configuration>
          </execution>
        </executions>
      </plugin>


    </plugins>
  </build>
</project>
