<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2010-2026. AxonIQ B.V.
  ~
  ~ Licensed under the AXONIQ TERMS OF SERVICE,
  ~ Version 29 April 2026 (the "License");
  ~
  ~ The software is available for evaluation use without registration.
  ~ Continued use beyond the evaluation period requires registration
  ~ and a commercial license. See the License for the specific language
  ~ governing permissions and limitations under the License.
  ~ You may not use this file except in compliance with the License.
  ~
  ~ You may obtain a copy of the License at:
  ~  https://www.axoniq.io/legal/terms-of-service
  ~
  ~ For licensing information and to register, visit:
  ~  https://www.axoniq.io/pricing
  -->

<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>io.axoniq.framework</groupId>
        <artifactId>axoniq-framework</artifactId>
        <version>5.3.2</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>axoniq-framework-parent</artifactId>
    <packaging>pom</packaging>

    <name>Axoniq Framework - Parent</name>
    <description>
        Module providing a parent for Axoniq Framework Modules.
    </description>

    <properties>
        <sonar.coverage.jacoco.xmlReportPaths>
            ${project.basedir}/build/coverage-report/target/site/jacoco-aggregate/jacoco.xml,
            ${project.basedir}/../build/coverage-report/target/site/jacoco-aggregate/jacoco.xml,
            ${project.basedir}/../../build/coverage-report/target/site/jacoco-aggregate/jacoco.xml,
            ${project.basedir}/../../../build/coverage-report/target/site/jacoco-aggregate/jacoco.xml
        </sonar.coverage.jacoco.xmlReportPaths>

        <!-- Use Mockito as a Java agent during tests to avoid dynamic self-attachment warnings on newer JDKs -->
        <mockito.agent.argLine>
            -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar
        </mockito.agent.argLine>

        <!-- The default common pool parallelism (availableProcessors() - 1) is sized for CPU-bound work.
             The framework's own code is I/O-bound throughout (network/database calls), and CI runners for
             this private repo have only 2 vCPUs, leaving a single common pool worker thread, which is
             too easy to starve when tests race multiple concurrent transactions through it. -->
        <common-pool.argLine>-Djava.util.concurrent.ForkJoinPool.common.parallelism=8</common-pool.argLine>

        <!-- Database -->
        <c3p0.version>0.9.1.2</c3p0.version>
        <hikari.version>7.1.0</hikari.version>
        <hsqldb.version>2.7.4</hsqldb.version>
        <hibernate-core.version>7.4.5.Final</hibernate-core.version>
        <mysql-connector-java.version>26.7.0</mysql-connector-java.version>
        <postgresql.version>42.7.13</postgresql.version>
        <ojdbc.version>23.26.1.0.0</ojdbc.version>
        <!-- gRPC -->
        <protobuf-java.version>4.36.0</protobuf-java.version>
        <!-- Jakarta -->
        <jakarta.annotation.version>3.0.0</jakarta.annotation.version>
        <jakarta.el.version>6.0.1</jakarta.el.version>
        <jakarta.el-impl.version>6.0.0</jakarta.el-impl.version>
        <jakarta.inject.version>2.0.1.MR</jakarta.inject.version>
        <jakarta.persistence.version>3.2.0</jakarta.persistence.version>
        <jakarta.validation.version>3.1.1</jakarta.validation.version>
        <jspecify.version>1.0.1</jspecify.version>
        <!-- Logging -->
        <log4j.version>2.26.1</log4j.version>
        <slf4j.version>2.0.18</slf4j.version>
        <!-- Metrics -->
        <dropwizard.metrics.version>5.0.6</dropwizard.metrics.version>
        <micrometer.version>1.16.4</micrometer.version>
        <!-- Tracing -->
        <opentelemetry.version>1.64.0</opentelemetry.version>
        <micrometer-tracing.version>1.7.0</micrometer-tracing.version>
        <context-propagation.version>1.2.1</context-propagation.version>
        <!-- Other -->
        <byte-buddy.version>1.18.11</byte-buddy.version>
        <commons-io.version>2.22.0</commons-io.version>
        <findbugs-jsr305.version>3.0.2</findbugs-jsr305.version>
        <javassist.version>3.32.0-GA</javassist.version>
        <eaio-uuid.version>3.2</eaio-uuid.version>
        <!-- Reactive -->
        <projectreactor.version>3.8.6</projectreactor.version>
        <reactive.streams.spec.version>1.0.4</reactive.streams.spec.version>
        <!-- Conversion -->
        <avro.version>1.12.1</avro.version>
        <dom4j.version>2.2.0</dom4j.version>
        <gson.version>2.14.0</gson.version>
        <jackson.version>3.2.1</jackson.version>
        <jackson2.version>2.22.1</jackson2.version>
        <!-- Spring -->
        <spring.version>6.2.19</spring.version>
        <spring-boot.version>3.5.16</spring-boot.version>
        <spring-data.version>2025.0.7</spring-data.version>
        <spring-security.version>6.5.11</spring-security.version>
        <!-- Testing -->
        <assertj.version>3.27.7</assertj.version>
        <archunit.version>1.4.2</archunit.version>
        <awaitility.version>4.3.0</awaitility.version>
        <equalsverifier.version>4.5</equalsverifier.version>
        <hamcrest.version>3.0</hamcrest.version>
        <junit.jupiter.version>6.1.2</junit.jupiter.version>
        <mockito.version>5.23.0</mockito.version>
        <testcontainers.version>2.0.5</testcontainers.version>
        <!-- Validation -->
        <hibernate-validator.version>9.1.3.Final</hibernate-validator.version>

        <!-- Maven plugins -->
        <checkstyle-maven-plugin.version>3.6.0</checkstyle-maven-plugin.version>
        <checkstyle.version>13.9.0</checkstyle.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Axon Framework -->
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-common</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-common</artifactId>
                <version>${axon-framework.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-conversion</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-conversion</artifactId>
                <version>${axon-framework.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-eventsourcing</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-eventsourcing</artifactId>
                <version>${axon-framework.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-messaging</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-messaging</artifactId>
                <version>${axon-framework.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-modelling</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-modelling</artifactId>
                <version>${axon-framework.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-test</artifactId>
                <version>${axon-framework.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-integrationtests</artifactId>
                <version>${axon-framework.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-update</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>org.axonframework.extensions.metrics</groupId>
                <artifactId>axon-metrics-dropwizard</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>org.axonframework.extensions.metrics</groupId>
                <artifactId>axon-metrics-micrometer</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>org.axonframework.extensions.spring</groupId>
                <artifactId>axon-spring</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>org.axonframework.extensions.spring</groupId>
                <artifactId>axon-spring-boot-autoconfigure</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>org.axonframework.extensions.spring</groupId>
                <artifactId>axon-spring-boot-starter</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>org.axonframework.extensions.spring</groupId>
                <artifactId>axon-spring-boot-starter-test</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>org.axonframework.extensions.tracing</groupId>
                <artifactId>axon-tracing-opentelemetry</artifactId>
                <version>${axon-framework.version}</version>
            </dependency>

            <dependency>
                <groupId>io.axoniq.license</groupId>
                <artifactId>entitlement-manager</artifactId>
                <version>${axoniq-entitlement-manager.version}</version>
            </dependency>

            <!-- Annotation -->
            <dependency>
                <groupId>org.jspecify</groupId>
                <artifactId>jspecify</artifactId>
                <version>${jspecify.version}</version>
            </dependency>

            <!-- Conversion -->
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro</artifactId>
                <version>${avro.version}</version>
            </dependency>

            <dependency>
                <groupId>org.dom4j</groupId>
                <artifactId>dom4j</artifactId>
                <version>${dom4j.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson2.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>tools.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Database -->
            <dependency>
                <groupId>c3p0</groupId>
                <artifactId>c3p0</artifactId>
                <version>${c3p0.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hibernate.orm</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${hibernate-core.version}</version>
            </dependency>

            <dependency>
                <groupId>com.zaxxer</groupId>
                <artifactId>HikariCP</artifactId>
                <version>${hikari.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>${hsqldb.version}</version>
            </dependency>

            <dependency>
                <groupId>com.mysql</groupId>
                <artifactId>mysql-connector-j</artifactId>
                <version>${mysql-connector-java.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.protobuf</groupId>
                        <artifactId>protobuf-java</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${postgresql.version}</version>
            </dependency>

            <!-- gRPC -->
            <!-- Pinned so transitive versions don't overtake the version Axon Server generated class used. -->
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>${protobuf-java.version}</version>
            </dependency>

            <!-- Jakarta -->
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${jakarta.annotation.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.validation</groupId>
                <artifactId>jakarta.validation-api</artifactId>
                <version>${jakarta.validation.version}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.expressly</groupId>
                <artifactId>expressly</artifactId>
                <version>${jakarta.el-impl.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.el</groupId>
                <artifactId>jakarta.el-api</artifactId>
                <version>${jakarta.el.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.inject</groupId>
                <artifactId>jakarta.inject-api</artifactId>
                <version>${jakarta.inject.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.persistence</groupId>
                <artifactId>jakarta.persistence-api</artifactId>
                <version>${jakarta.persistence.version}</version>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- Other -->
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>

            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-agent</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>

            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>${javassist.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>${findbugs-jsr305.version}</version>
            </dependency>

            <dependency>
                <groupId>com.eaio.uuid</groupId>
                <artifactId>uuid</artifactId>
                <version>${eaio-uuid.version}</version>
            </dependency>

            <!-- Reactive -->
            <dependency>
                <groupId>org.reactivestreams</groupId>
                <artifactId>reactive-streams</artifactId>
                <version>${reactive.streams.spec.version}</version>
            </dependency>

            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-core</artifactId>
                <version>${projectreactor.version}</version>
            </dependency>

            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-test</artifactId>
                <version>${projectreactor.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- Testing -->
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.jupiter.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
            </dependency>

            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${awaitility.version}</version>
            </dependency>

            <dependency>
                <groupId>nl.jqno.equalsverifier</groupId>
                <artifactId>equalsverifier</artifactId>
                <version>${equalsverifier.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.version}</version>
            </dependency>

            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${testcontainers.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.tngtech.archunit</groupId>
                <artifactId>archunit-junit5</artifactId>
                <version>${archunit.version}</version>
            </dependency>

            <!-- Tracing -->
            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-bom</artifactId>
                <version>${opentelemetry.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>io.micrometer</groupId>
                <artifactId>micrometer-tracing-bom</artifactId>
                <version>${micrometer-tracing.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>io.micrometer</groupId>
                <artifactId>context-propagation</artifactId>
                <version>${context-propagation.version}</version>
            </dependency>

            <!-- Validation -->
            <dependency>
                <groupId>org.hibernate.validator</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate-validator.version}</version>
            </dependency>

            <!-- Spring (Spring BOMs have to be defined last, so versions can be overwritten -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>${spring.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-bom</artifactId>
                <version>${spring-data.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-bom</artifactId>
                <version>${spring-security.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- java -->
        <dependency>
            <groupId>org.jspecify</groupId>
            <artifactId>jspecify</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.tngtech.archunit</groupId>
            <artifactId>archunit-junit5</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>io.axoniq.framework</groupId>
            <artifactId>axoniq-test-logging</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources.version}</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.transformer</groupId>
                    <artifactId>transformer-maven-plugin</artifactId>
                    <version>${eclipse.transformer-maven-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <rules>
                            <jakartaDefaults>true</jakartaDefaults>
                        </rules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${checkstyle-maven-plugin.version}</version>
                    <configuration>
                        <configLocation>build/checkstyle.xml</configLocation>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- compile -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>UTF-8</encoding>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <parameters>true</parameters>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- test -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire.version}</version>
                <configuration>
                    <argLine>${mockito.agent.argLine} ${common-pool.argLine} -Djava.awt.headless=true</argLine>
                    <systemPropertyVariables>
                        <slf4j.version>${slf4j.version}</slf4j.version>
                        <log4j.version>${log4j.version}</log4j.version>
                        <test.forkNumber>$${surefire.forkNumber}</test.forkNumber>
                    </systemPropertyVariables>
                    <includes>
                        <include>**/*Test.java</include>
                        <include>**/*Tests.java</include>
                        <include>**/*Test_*.java</include>
                        <include>**/*Tests_*.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/*IntegrationTest.java</exclude>
                        <exclude>**/*IntegrationTests.java</exclude>
                        <exclude>**/*IntegrationTest_*.java</exclude>
                        <exclude>**/*IntegrationTests_*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- package -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven-assembly.version}</version>
                <configuration>
                    <descriptorSourceDirectory>assembly</descriptorSourceDirectory>
                    <archiverConfig>
                        <duplicateBehavior>skip</duplicateBehavior>
                    </archiverConfig>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>quick-install</id>
            <properties>
                <!-- Test classes are shared between modules, so we should build these modules, but don't run them.-->
                <skipTests>true</skipTests>
            </properties>
        </profile>

        <profile>
            <id>coverage</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>coverage</name>
                </property>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>

                        <executions>
                            <execution>
                                <id>prepare-agent-for-unit-tests</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>surefireArgLine</propertyName>
                                    <destFile>${project.build.directory}/jacoco-ut.exec</destFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <!--suppress MavenModelInspection -->
                            <argLine>-Djava.awt.headless=true ${surefireArgLine} ${mockito.agent.argLine} ${common-pool.argLine}</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>integration-test</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>coverage</name>
                </property>
            </activation>

            <build>
                <defaultGoal>verify</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>prepare-agent-for-integration-test</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>failsafeArgLine</propertyName>
                                    <destFile>${project.build.directory}/jacoco-it.exec</destFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${maven-failsafe.version}</version>
                        <executions>
                            <execution>
                                <id>run-integration-tests</id>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                                <configuration>
                                    <!--suppress MavenModelInspection -->
                                    <argLine>-Djava.awt.headless=true ${failsafeArgLine} ${mockito.agent.argLine} ${common-pool.argLine}
                                    </argLine>
                                    <systemPropertyVariables>
                                        <test.forkNumber>${surefire.forkNumber}</test.forkNumber>
                                    </systemPropertyVariables>
                                    <includes>
                                        <include>**/*IntegrationTest.java</include>
                                        <include>**/*IntegrationTests.java</include>
                                        <include>**/*IntegrationTest_*.java</include>
                                        <include>**/*IntegrationTests_*.java</include>
                                        <!-- these are the defaults -->
                                        <include>**/IT*.java</include>
                                        <include>**/*IT.java</include>
                                        <include>**/*ITCase.java</include>
                                    </includes>
                                    <excludes>
                                        <exclude>**/*Test.java</exclude>
                                        <exclude>**/*Tests.java</exclude>
                                        <exclude>**/*Test_*.java</exclude>
                                        <exclude>**/*Tests_*.java</exclude>
                                    </excludes>
                                </configuration>
                            </execution>

                            <execution>
                                <id>verify-integration-tests</id>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>

        <profile>
            <id>sources</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
