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

    <groupId>io.axoniq.framework</groupId>
    <artifactId>axoniq-framework</artifactId>
    <version>5.1.2</version>
    <packaging>pom</packaging>

    <name>Axoniq Framework - Root</name>
    <description>
        Axoniq Framework builds upon Axon Framework providing features and enhancements to improve an application's
        production "readiness," specifically for message-driven and event-sourced applications.
    </description>

    <properties>
        <revision>5.1.2</revision>

        <!-- Global Axoniq version properties -->
        <axon-framework.version>5.1.2</axon-framework.version>
        <axoniq-entitlement-manager.version>1.0.1</axoniq-entitlement-manager.version>
        <axonserver-connector-java.version>2026.0.0</axonserver-connector-java.version>

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

        <maven-enforcer.allow-spring-dependencies>false</maven-enforcer.allow-spring-dependencies>

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


        <!-- Build / Plugin -->
        <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
        <eclipse.transformer-maven-plugin.version>1.0.0</eclipse.transformer-maven-plugin.version>
        <jacoco-maven.version>0.8.14</jacoco-maven.version>
        <maven-assembly.version>3.8.0</maven-assembly.version>
        <maven-clean.version>3.5.0</maven-clean.version>
        <maven-compiler.version>3.15.0</maven-compiler.version>
        <maven-enforcer.version>3.6.2</maven-enforcer.version>
        <maven-failsafe.version>3.5.5</maven-failsafe.version>
        <maven-gpg.version>3.2.8</maven-gpg.version>
        <maven-install.version>3.1.4</maven-install.version>
        <maven-jar.version>3.5.0</maven-jar.version>
        <maven-javadoc.version>3.12.0</maven-javadoc.version>
        <maven-release.version>3.3.1</maven-release.version>
        <maven-source.version>3.4.0</maven-source.version>
        <maven-surefire.version>3.5.5</maven-surefire.version>
        <maven-resources.version>3.5.0</maven-resources.version>
    </properties>

    <modules>
        <module>build/parent</module>
        <module>axoniq-framework-bom</module>

        <module>connector/axoniq-postgresql</module>
        <module>connector/axon-server-connector</module>

        <module>dependency-injection/spring</module>

        <module>integrationtests</module>

        <module>messaging/axoniq-dead-letter</module>
        <module>messaging/axoniq-distributed-messaging</module>
        <module>messaging/axoniq-event-streaming</module>

        <module>testing/axoniq-testcontainer</module>
    </modules>

    <inceptionYear>2026</inceptionYear>
    <url>https://axoniq.io/</url>
    <licenses>
        <license>
            <name>Axoniq Terms of Service</name>
            <url>https://www.axoniq.io/legal/terms-of-service</url>
        </license>
    </licenses>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/AxonIQ/AxoniqFramework/issues</url>
    </issueManagement>
    <organization>
        <name>AxonIQ B.V.</name>
        <url>https://axoniq.io</url>
    </organization>

    <!-- Dependencies are managed in axoniq-framework-parent -->
    <dependencyManagement />

    <!-- Dependencies are managed in axoniq-framework-parent -->
    <dependencies />

    <build>
        <defaultGoal>clean package</defaultGoal>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven-clean.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer.version}</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>21</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>3.9</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <skip>${maven-enforcer.allow-spring-dependencies}</skip>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>org.springframework</exclude>
                                        <exclude>org.springframework.boot</exclude>
                                    </excludes>
                                    <includes>
                                        <!-- allow any spring dependency with test scope -->
                                        <include>org.springframework:*:*:*:test</include>
                                    </includes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- deploy -->
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release.version}</version>
                <configuration>
                    <!-- prepare goal configuration -->
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <pushChanges>false</pushChanges>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <!-- perform goal configuration -->
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <localCheckout>true</localCheckout>
                    <releaseProfiles>javadoc,sources,sign</releaseProfiles>
                    <tagNameFormat>axoniq-@{project.version}</tagNameFormat>
                </configuration>
            </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</publishingServerId>
                    <excludeArtifacts>axoniq-integrationtests</excludeArtifacts>
                </configuration>
            </plugin>

            <!--
                Flattens the effective POM before deployment so that CI-friendly version placeholders
                (such as 5.1.2) are resolved to concrete values.
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
                <version>1.7.3</version>
                <configuration>
                    <updatePomFile>true</updatePomFile>
                    <flattenMode>resolveCiFriendliesOnly</flattenMode>
                </configuration>
                <executions>
                    <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>coverage</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>coverage</name>
                </property>
            </activation>
            <modules>
                <module>build/coverage-report</module>
            </modules>
        </profile>

        <profile>
            <id>examples</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>examples</name>
                </property>
            </activation>
            <modules>
                <module>examples</module>
            </modules>
        </profile>

        <profile>
            <id>javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <doclint>none</doclint>
                            <legacyMode>true</legacyMode>
                            <skippedModules>axon-integrationtests,axoniq-integrationtests</skippedModules>
                            <!-- These parameters are in preparation for resolution of this issue: -->
                            <!-- https://bugs.openjdk.java.net/browse/JDK-8068562 -->
                            <tags>
                                <tag>
                                    <name>apiNote</name>
                                    <placement>a</placement>
                                    <head>API Note:</head>
                                </tag>
                                <tag>
                                    <name>implSpec</name>
                                    <placement>a</placement>
                                    <head>Implementation Requirements:</head>
                                </tag>
                                <tag>
                                    <name>implNote</name>
                                    <placement>a</placement>
                                    <head>Implementation Note:</head>
                                </tag>
                            </tags>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>sign</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <name>Central Portal Snapshots</name>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <scm>
        <connection>scm:git:git://github.com/AxonIQ/AxoniqFramework.git</connection>
        <developerConnection>scm:git:git@github.com:AxonIQ/AxoniqFramework.git</developerConnection>
        <url>https://github.com/AxonIQ/AxoniqFramework</url>
        <tag>axoniq-5.1.2</tag>
    </scm>

    <developers>
        <developer>
            <name>Allard Buijze</name>
            <email>allard.buijze@axoniq.io</email>
            <organization>AxonIQ</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Project Owner</role>
            </roles>
        </developer>
        <developer>
            <name>Steven van Beelen</name>
            <email>steven.vanbeelen@axoniq.io</email>
            <organization>Axoniq</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Lead Developer</role>
            </roles>
        </developer>
        <developer>
            <name>Mateusz Nowak</name>
            <email>mateusz.nowak@axoniq.io</email>
            <organization>Axoniq</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <name>John Hendrikx</name>
            <email>John.hendrikx@axoniq.io</email>
            <organization>Axoniq</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <name>Jakob Hatzl</name>
            <email>jakob.hatzl@axoniq.io</email>
            <organization>Axoniq</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <id>zambrovski</id>
            <name>Simon Zambrovski</name>
            <email>simon.zambrovski@holisticon.de</email>
            <organization>Holisticon AG</organization>
            <organizationUrl>https://holisticon.de</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <id>jangalinski</id>
            <name>Jan Galinski</name>
            <email>jan.galinski@holisticon.de</email>
            <organization>Holisticon AG</organization>
            <organizationUrl>https://holisticon.de</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>
</project>
