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

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.4.9</version>
    <relativePath/>
    <!-- lookup parent from repository -->
  </parent>

  <groupId>de.muehlencord.facessupport</groupId>
  <artifactId>faces-support-parent</artifactId>
  <version>1.4.9-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>faces-support-parent</name>
  <modules>
    <module>faces-support-spring-boot-starter</module>
    <module>faces-support-spring-boot-autoconfigure</module>
    <module>faces-support-lib</module>
    <module>faces-support-spring</module>
    <module>faces-support-coverage</module>
  </modules>

  <developers>
    <developer>
      <id>joern.muehlencord</id>
      <name>Joern Muehlencord</name>
      <email>dev@muehlencord.de</email>
      <roles>
        <role>lead-developer</role>
      </roles>
    </developer>
  </developers>

  <distributionManagement>
    <repository>
      <id>jomu-gitea</id>
      <url>https://git.muehlencord.de/api/packages/jomu/maven</url>
    </repository>
    <snapshotRepository>
      <id>jomu-gitea</id>
      <url>https://git.muehlencord.de/api/packages/jomu/maven</url>
    </snapshotRepository>
  </distributionManagement>

  <scm>
    <connection>scm:git:git@git.muehlencord.de:jomu/faces-support.git</connection>
    <developerConnection>scm:git:git@git.muehlencord.de:jomu/faces-support.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://git.muehlencord.de/jomu/faces-support</url>
  </scm>

  <properties>
    <java.version>21</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <maven.compiler.release>${java.version}</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Jacoco / Sonar-->
    <sonar.coverage.jacoco.xmlReportPaths>
      ${project.basedir}/../faces-support-coverage/target/site/jacoco-aggregate/jacoco.xml,
      ${project.basedir}/faces-support-coverage/target/site/jacoco-aggregate/jacoco.xml
    </sonar.coverage.jacoco.xmlReportPaths>

    <!-- dependency versions -->
    <joinfaces.version>5.4.9</joinfaces.version>
    <primefaces.version>14.0.12</primefaces.version>
    <spring-boot.version>3.4.9</spring-boot.version>

    <!-- plugin versions -->
    <jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.joinfaces</groupId>
        <artifactId>joinfaces-platform</artifactId>
        <version>${joinfaces.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <classifier>jakarta</classifier>
        <scope>provided</scope>
        <version>${primefaces.version}</version>
      </dependency>

      <dependency>
        <groupId>de.muehlencord.facessupport</groupId>
        <artifactId>faces-support-spring-boot-autoconfigure</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.muehlencord.facessupport</groupId>
        <artifactId>faces-support-spring-boot-starter</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.muehlencord.facessupport</groupId>
        <artifactId>faces-support-spring</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>de.muehlencord.facessupport</groupId>
        <artifactId>faces-support-lib</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <showDeprecation>true</showDeprecation>
            <annotationProcessorPaths>
              <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
              </path>
              <!-- spring boot after lombok -->
              <path>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <version>${spring-boot.version}</version>
              </path>
            </annotationProcessorPaths>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

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

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
          </includes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includes>
            <include>**/*IntegrationTest.java</include>
            <include>**/*IT.java</include>
          </includes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>


</project>
