<?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 https://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>4.1.0</version>
    <relativePath />
  </parent>

  <groupId>io.github.database-audits</groupId>
  <artifactId>database-audits-parent</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>

  <name>Database Audits Parent</name>
  <description>
    Parent for the database-audits modules.
    Consumers depend on database-audits-core or database-audits-spring-boot.
  </description>
  <url>https://github.com/database-audits</url>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <!-- CONFIG -->
    <java.version>21</java.version>
    <maven.compiler.release>${java.version}</maven.compiler.release>
    <project.build.outputTimestamp>2026-06-14T01:06:27Z</project.build.outputTimestamp>

    <!-- VERSIONS: dependencies — only for what spring-boot does not manage -->
    <asciidoctor-parser-doxia-module.version>3.2.0</asciidoctor-parser-doxia-module.version>

    <!-- VERSIONS: plugins — only for what spring-boot does not manage -->
    <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
    <jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
    <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
    <maven-project-info-reports-plugin.version>3.9.0</maven-project-info-reports-plugin.version>
    <maven-release-plugin.version>3.3.1</maven-release-plugin.version>
    <maven-site-plugin.version>3.22.0</maven-site-plugin.version>
  </properties>

  <developers>
    <developer>
      <id>jeffjensen</id>
      <name>Jeff Jensen</name>
      <email>jjensen@apache.org</email>
    </developer>
  </developers>

  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/database-audits/parent/actions</url>
  </ciManagement>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/database-audits/parent/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:https://github.com/database-audits/parent.git</connection>
    <developerConnection>scm:git:https://github.com/database-audits/parent.git</developerConnection>
    <url>https://github.com/database-audits/parent</url>
    <tag>v1.0.0</tag>
  </scm>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <compilerArgs>
              <arg>-XDaddTypeAnnotationsToSymbol=true</arg>
            </compilerArgs>
            <annotationProcessorPaths>
              <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
              </path>
            </annotationProcessorPaths>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <configuration>
            <redirectTestOutputToFile>true</redirectTestOutputToFile>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
          <configuration>
            <tagNameFormat>v@{project.version}</tagNameFormat>
            <releaseProfiles>release</releaseProfiles>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
          <configuration>
            <relativizeSiteLinks>false</relativizeSiteLinks>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.asciidoctor</groupId>
              <artifactId>asciidoctor-parser-doxia-module</artifactId>
              <version>${asciidoctor-parser-doxia-module.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <redirectTestOutputToFile>true</redirectTestOutputToFile>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
          <executions>
            <!-- Two agents keep unit and integration coverage in separate exec files: prepare-agent
                 sets argLine -> target/jacoco.exec for surefire; prepare-agent-integration re-sets
                 argLine -> target/jacoco-it.exec for failsafe (the test phase runs before
                 pre-integration-test, so each runner gets its own agent). report -> target/site/jacoco
                 (unit); report-integration -> target/site/jacoco-it (integration). Both are linked on
                 the Maven site via the <reporting> section below. No coverage gate. -->
            <execution>
              <id>prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
            <execution>
              <id>prepare-agent-integration</id>
              <goals>
                <goal>prepare-agent-integration</goal>
              </goals>
            </execution>
            <execution>
              <id>report-integration</id>
              <goals>
                <goal>report-integration</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.sonatype.central</groupId>
          <artifactId>central-publishing-maven-plugin</artifactId>
          <version>${central-publishing-maven-plugin.version}</version>
          <extensions>true</extensions>
          <configuration>
            <publishingServerId>central-publish</publishingServerId>
            <autoPublish>true</autoPublish>
            <waitUntil>published</waitUntil>
            <deploymentName>database-audits</deploymentName>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <configuration>
            <rulesUri>file:///${maven.multiModuleProjectDirectory}/versions-maven-plugin-rules.xml</rulesUri>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
              <report>report-integration</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <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-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
