<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>com.boozallen.aissemble</groupId>
        <artifactId>aissemble-root</artifactId>
        <version>1.9.4</version>
    </parent>

    <artifactId>build-parent</artifactId>
    <packaging>pom</packaging>

    <name>aiSSEMBLE::Build POM</name>

    <description>Build parent to bring in required build-time dependencies (e.g., Maven configuration)</description>

    <distributionManagement>
        <snapshotRepository>
            <id>ghcr.io</id>
            <url>https://maven.pkg.github.com/boozallen/aissemble</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <version.aissemble>1.9.4</version.aissemble>

        <!-- **************** -->
        <!-- Plugins versions -->
        <!-- **************** -->
        <version.archetype.plugin>3.2.1</version.archetype.plugin>
        <version.assembly.plugin>3.6.0</version.assembly.plugin>
        <version.buildhelper.plugin>3.2.0</version.buildhelper.plugin>
        <version.buildnumber.plugin>3.1.0</version.buildnumber.plugin>
        <version.failsafe.plugin>${version.maven.surefire.plugin}</version.failsafe.plugin>
        <version.fermenter>2.10.3</version.fermenter>
        <version.fermenter.legacy.tools>2.8.0</version.fermenter.legacy.tools>
        <version.habushu.plugin>2.16.1</version.habushu.plugin>
        <version.python>3.11.4</version.python>
        <version.help.plugin>3.2.0</version.help.plugin>
        <version.krausening>19</version.krausening>
        <version.plexus.archiver>3.6.0</version.plexus.archiver>
        <version.plugin.plugin>3.9.0</version.plugin.plugin>
        <version.quarkus>2.8.3.Final</version.quarkus>
        <version.quarkus.plugin>${version.quarkus}</version.quarkus.plugin>
        <version.shade.plugin>3.2.4</version.shade.plugin>
        <version.smallrye.config>1.12.0</version.smallrye.config>
        <version.smallrye.plugin>1.6.0</version.smallrye.plugin>
        <version.smallrye.reactive.messaging>3.15.0</version.smallrye.reactive.messaging>
        <version.orphedomos.plugin>0.10.1</version.orphedomos.plugin>
        <version.janino>3.0.8</version.janino>
        <version.jackson>2.13.2</version.jackson>
        <version.jclouds>2.5.0</version.jclouds>
        <version.log4j>2.20.0</version.log4j>
        <version.maven.core>3.8.6</version.maven.core>
        <version.mutiny>0.5.0</version.mutiny>
        <version.plexus.component>2.1.1</version.plexus.component>
        <version.postgresql>42.5.1</version.postgresql>
        <version.resteasy>4.7.7.Final</version.resteasy>
        <version.vertx>4.2.5</version.vertx>
        <version.urllib3>^1.26.18</version.urllib3>
        <version.fastapi>&gt;=0.95.0</version.fastapi>
        <version.uvicorn>&gt;=0.18.0</version.uvicorn>
        <version.cryptography>&gt;=42.0.4</version.cryptography>
        <version.python.krausening>&gt;=${version.krausening}</version.python.krausening>
        <version.slf4j>2.0.7</version.slf4j>
        <version.delta.hive.connector>0.6.0</version.delta.hive.connector>
        <version.testcontainers>1.19.8</version.testcontainers>
        <version.vault>5.1.0</version.vault>

<!--        Spark Default Dependencies.  See `spark-*` profiles below for alternative sets -->
        <version.spark>3.4.0</version.spark>
        <version.delta>2.4.0</version.delta>
        <version.elasticsearch>8.9.0</version.elasticsearch>
        <version.sedona>1.4.0</version.sedona>
        <version.geotools.wrapper>1.4.0-28.2</version.geotools.wrapper>
        <version.mysql-connector>8.0.30</version.mysql-connector>
        <version.hadoop>3.3.4</version.hadoop>
        <version.neo4j>4.1.5_for_spark_3</version.neo4j>
        <version.aws.sdk.bundle>1.12.262</version.aws.sdk.bundle>
        <version.baton>1.1.1</version.baton>
        <version.quarkus.cucumber>0.6.0</version.quarkus.cucumber>
        <version.quarkus.cucumber.java>7.4.1</version.quarkus.cucumber.java>

        <!-- io.fabric8:docker-maven-plugin -->
        <version.fabric8.docker.maven.plugin>0.45-tb-0.1.0</version.fabric8.docker.maven.plugin>
        <docker.platforms>linux/amd64,linux/arm64</docker.platforms>
        <!-- Used for switching between forked and original helm repo-->
        <group.fabric8.plugin>org.technologybrewery.fabric8</group.fabric8.plugin>

        <!-- ***************** -->
        <!-- Repository Deployment URLs - mostly in aissemble-root -->
        <!-- ***************** -->
        <docker.repo.id />
        <docker.baseline.repo.id>ghcr.io</docker.baseline.repo.id>

        <!-- ************** -->
        <!-- Build settings -->
        <!-- ************** -->
        <!-- Cross plugins settings -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- maven-compiler-plugin set in aissemble-root -->

        <!-- Options to override the compiler arguments directly on the compiler
            argument line to separate between what the IDE understands as the source
            level and what the Maven compiler actually use. -->
        <maven.compiler.argument.target>${maven.compiler.target}</maven.compiler.argument.target>
        <maven.compiler.argument.source>${maven.compiler.source}</maven.compiler.argument.source>
        <maven.compiler.argument.testTarget>${maven.compiler.target}</maven.compiler.argument.testTarget>
        <maven.compiler.argument.testSource>${maven.compiler.source}</maven.compiler.argument.testSource>

        <!-- maven-enforcer-plugin -->
        <version.maven.min>3.6.2</version.maven.min>
        <version.jdk.required>${maven.compiler.argument.source}</version.jdk.required>
        <version.jdk.next-unsupported>12</version.jdk.next-unsupported>
        <insecure.repositories>ERROR</insecure.repositories>

        <!-- maven-idea-plugin & maven-eclipse-plugin -->
        <downloadSources>true</downloadSources>

        <!-- maven-release-plugin -->
        <useReleaseProfile>false</useReleaseProfile>

        <!-- maven-assembly-plugin -->
        <sourceReleaseAssemblyDescriptor>source-release</sourceReleaseAssemblyDescriptor>

        <!-- exposed additional params for javadoc, such as Xlint -->
        <javadoc.additional.params />
        <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>

        <!-- tie java and python skip tests together -->
        <skipTests>false</skipTests> <!-- surefire config -->
        <habushu.skipTests>${skipTests}</habushu.skipTests>

        <dockerImageName>${project.artifactId}</dockerImageName>
        <dockerImageVersion>${project.version}</dockerImageVersion>

        <!-- Helm chart repository -->
        <aissemble.helm.repo.protocol>oci</aissemble.helm.repo.protocol>
        <aissemble.helm.repo>ghcr.io/boozallen</aissemble.helm.repo>
        <aissemble.helm.repo.name>ghcr.io</aissemble.helm.repo.name>

        <!-- Used for switching between forked and original helm repo-->
        <group.helm.plugin>org.technologybrewery</group.helm.plugin>
        <version.helm.plugin>6.14.3</version.helm.plugin>
        <version.helm.min>3.12.0</version.helm.min>
        <version.snakeyaml>2.0</version.snakeyaml>
    </properties>

    <dependencyManagement>
        <!-- NB: Why are these here and not with the other dependencies? -->
        <dependencies>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${version.log4j}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${version.log4j}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j2-impl</artifactId>
                <version>${version.log4j}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>net.masterthought</groupId>
                <artifactId>cucumber-reporting</artifactId>
                <version>${version.cucumber.reporting.plugin}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- START: workaround to get maven build cache invalidation on new SNAPSHOTS of commonly updated plugins:  -->
        <dependency>
            <groupId>org.technologybrewery.fermenter</groupId>
            <artifactId>fermenter-mda</artifactId>
            <version>${version.fermenter}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.technologybrewery.habushu</groupId>
            <artifactId>habushu-maven-plugin</artifactId>
            <version>${version.habushu.plugin}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.technologybrewery.baton</groupId>
            <artifactId>baton-maven-plugin</artifactId>
            <version>${version.baton}</version>
            <scope>provided</scope>
        </dependency>
        <!-- END: workaround to get maven build cache invalidation on new SNAPSHOTS of commonly updated plugins -->
    </dependencies>

    <build>

        <pluginManagement>
            <!-- All plugins ordered by shortname (archetype, assembly ...) -->
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-archetype-plugin</artifactId>
                    <version>${version.archetype.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${version.assembly.plugin}</version>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <manifest>
                                <addDefaultSpecificationEntries>
                                    true
                                </addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>
                                    true
                                </addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-URL>${project.url}</Implementation-URL>
                                <Java-Version>${java.version}</Java-Version>
                                <Java-Vendor>${java.vendor}</Java-Vendor>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <Scm-Url>${project.scm.url}</Scm-Url>
                                <Scm-Connection>${project.scm.connection}</Scm-Connection>
                                <Scm-Revision>${buildNumber}</Scm-Revision>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.technologybrewery.baton</groupId>
                    <artifactId>baton-maven-plugin</artifactId>
                    <version>${version.baton}</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <id>default</id>
                            <goals>
                                <goal>baton-migrate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>net.masterthought</groupId>
                    <artifactId>maven-cucumber-reporting</artifactId>
                    <version>${version.cucumber.reporting.plugin}</version>
                    <executions>
                        <execution>
                            <id>execution</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                            <configuration>
                                <skip>${skipTests}</skip>
                                <projectName>${project.artifactId}</projectName>
                                <buildNumber>${version.aissemble}</buildNumber>
                                <skipEmptyJSONFiles>true</skipEmptyJSONFiles>
                                <checkBuildResult>true</checkBuildResult>
                                <treatUndefinedAsFailed>true</treatUndefinedAsFailed>
                                <treatSkippedAsFailed>false</treatSkippedAsFailed>
                                <outputDirectory>${project.build.directory}/../target/cucumber-reports</outputDirectory>
                                <inputDirectory>${project.build.directory}/../target/cucumber-reports</inputDirectory>
                                <jsonFiles>
                                    <param>cucumber.json</param>
                                </jsonFiles>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${version.buildhelper.plugin}</version>
                    <executions>
                        <execution>
                            <id>add-source</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>src/generated/java</source>
                                </sources>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-resource</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>add-resource</goal>
                            </goals>
                            <configuration>
                                <resources>
                                    <resource>
                                        <directory>src/generated/resources</directory>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-test-source</id>
                            <phase>generate-test-sources</phase>
                            <goals>
                                <goal>add-test-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>src/generated-test/java</source>
                                </sources>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-test-resource</id>
                            <phase>generate-test-resources</phase>
                            <goals>
                                <goal>add-test-resource</goal>
                            </goals>
                            <configuration>
                                <resources>
                                    <resource>
                                        <directory>src/generated-test/resources</directory>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>${version.buildnumber.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <release>${maven.compiler.target}</release>
                        <testRelease>${maven.compiler.target}</testRelease>
                        <compilerArgs>
                            <arg>-Xlint:unchecked</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${version.failsafe.plugin}</version>
                    <configuration>
                        <systemPropertyVariables>
                            <KRAUSENING_BASE>${project.basedir}/src/test/resources/krausening/base</KRAUSENING_BASE>
                            <KRAUSENING_EXTENSIONS>
                                ${project.basedir}/src/test/resources/krausening/${krausening.profile}
                            </KRAUSENING_EXTENSIONS>
                            <KRAUSENING_PASSWORD>3uQ2j_=wmP5A2q8b</KRAUSENING_PASSWORD>
                            <cucumber.options>--tags not @manual</cucumber.options>
                        </systemPropertyVariables>
                        <environmentVariables>
                            <TESTCONTAINERS_RYUK_DISABLED>${TESTCONTAINERS_RYUK_DISABLED}</TESTCONTAINERS_RYUK_DISABLED>
                        </environmentVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.technologybrewery.fermenter</groupId>
                    <artifactId>fermenter-mda</artifactId>
                    <version>${version.fermenter}</version>
                    <configuration>
                        <metadataRepositoryImpl>com.boozallen.aiops.mda.metamodel.AIOpsModelInstanceRepostory
                        </metadataRepositoryImpl>
                    </configuration>
                    <executions>
                        <execution>
                            <id>generate-sources</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>generate-sources</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.technologybrewery.habushu</groupId>
                    <artifactId>habushu-maven-plugin</artifactId>
                    <version>${version.habushu.plugin}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <cacheWheels>true</cacheWheels>
                        <pythonVersion>${version.python}</pythonVersion>
                        <behaveTestEnvironmentVariables>
                            <TESTCONTAINERS_RYUK_DISABLED>${TESTCONTAINERS_RYUK_DISABLED}</TESTCONTAINERS_RYUK_DISABLED>
                        </behaveTestEnvironmentVariables>
                        <managedDependencies>
                        <!-- IA related dependency definitions. Can be configured to specific versions within the different  -->
                            <packageDefinition>
                                <packageName>urllib3</packageName>
                                <operatorAndVersion>${version.urllib3}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>fastapi</packageName>
                                <operatorAndVersion>${version.fastapi}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>uvicorn[standard]</packageName>
                                <operatorAndVersion>${version.uvicorn}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>cryptography</packageName>
                                <operatorAndVersion>${version.cryptography}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>krausening</packageName>
                                <operatorAndVersion>${version.python.krausening}</operatorAndVersion>
                            </packageDefinition>

                            <!-- this is an easy way to extend anything that is in build parent and overwrite it in the defined child folders. This will allow for ease of upgrades -->
                            <packageDefinition>
                                <packageName>aissemble-foundation-core-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-data-lineage-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-pdp-client-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-encryption-policy-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-transform-core-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-drift-detection-client-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-model-lineage</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>foundation-model-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-model-training-api</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-foundation-messaging-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-extensions-transform-spark-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-extensions-encryption-vault-python</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-extensions-data-delivery-spark-py</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-versioning-service</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-model-training-api-sagemaker</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-test-data-delivery-pyspark-model</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-machine-learning-training</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>aissemble-machine-learning-inference</packageName>
                                <operatorAndVersion>${version.aissemble}</operatorAndVersion>
                            </packageDefinition>
                            <!-- Current version of SciPy (used by MLFlow and scikit-learn) caps numpy to 1.26.0, causing it to downgrade to an "incompatible" version with the new 1.26.2 release-->
                            <!-- Remove when a version of scipy compatible with numpy 1.26.2 is released -->
                            <packageDefinition>
                                <packageName>scipy</packageName>
                                <operatorAndVersion>^1.9.3</operatorAndVersion>
                            </packageDefinition>

                            <!-- Handles spark version decisions -->
                            <packageDefinition>
                                <packageName>pyspark</packageName>
                                <operatorAndVersion>${version.spark}</operatorAndVersion>
                            </packageDefinition>
                            <packageDefinition>
                                <packageName>apache-sedona</packageName>
                                <operatorAndVersion>~${version.sedona}</operatorAndVersion>
                            </packageDefinition>
                        </managedDependencies>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.technologybrewery.orphedomos</groupId>
                    <artifactId>orphedomos-maven-plugin</artifactId>
                    <version>${version.orphedomos.plugin}</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <id>default-push-docker-image</id>
                            <configuration>
                                <repoUrl>${docker.repo.id}</repoUrl>
                                <repoId>${docker.repo.id}</repoId>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <imageVersion>${dockerImageVersion}</imageVersion>
                        <imageName>${dockerImageName}</imageName>
                        <buildArgs>
                            <DOCKER_BASELINE_REPO_ID>${docker.baseline.repo.id}/</DOCKER_BASELINE_REPO_ID>
                            <VERSION_AISSEMBLE>${version.aissemble}</VERSION_AISSEMBLE>
                            <SPARK_VERSION>${version.spark}</SPARK_VERSION>
                        </buildArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <!--
                        NB: using a temporary fork of the docker-maven-plugin for faster local builds.
                        This can be removed once https://github.com/fabric8io/docker-maven-plugin/issues/1804
                        is incorporated into the io.fabric8 plugin directly.
                      -->
                    <groupId>${group.fabric8.plugin}</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <version>${version.fabric8.docker.maven.plugin}</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <id>default-push</id>
                            <phase>deploy</phase>
                            <goals>
                                <goal>push</goal>
                            </goals>
                            <configuration>
                                <images>
                                    <image>
                                        <build>
                                            <buildx>
                                                <builderName>maven</builderName>
                                                <cacheTo>type=local,dest=${user.home}/.docker/cache</cacheTo>
                                                <cacheFrom>type=local,src=${user.home}/.docker/cache</cacheFrom>
                                            </buildx>
                                        </build>
                                    </image>
                                </images>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <images>
                            <image>
                                <name>${docker.repo.id}/${dockerImageName}:${dockerImageVersion}</name>
                                <build>
                                    <filter>@</filter>
                                    <args>
                                        <DOCKER_BASELINE_REPO_ID>${docker.baseline.repo.id}/</DOCKER_BASELINE_REPO_ID>
                                        <VERSION_AISSEMBLE>${version.aissemble}</VERSION_AISSEMBLE>
                                        <SPARK_VERSION>${version.spark}</SPARK_VERSION>
                                    </args>
                                    <buildx>
                                        <builderName>default</builderName>
                                        <dockerStateDir>~/.docker</dockerStateDir>
                                        <platforms>
                                            <platform>${docker.platforms}</platform>
                                        </platforms>
                                    </buildx>
                                    <contextDir>${project.basedir}</contextDir>
                                    <dockerFile>./src/main/resources/docker/Dockerfile</dockerFile>
                                </build>
                            </image>
                        </images>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>${group.helm.plugin}</groupId>
                    <artifactId>helm-maven-plugin</artifactId>
                    <version>${version.helm.plugin}</version>
                    <configuration>
                        <!-- These config options are required to run the plugin -->
                        <chartVersion>${project.version}</chartVersion>
                        <autoDetectLocalHelmBinary>true</autoDetectLocalHelmBinary>
                        <useLocalHelmBinary>true</useLocalHelmBinary>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-help-plugin</artifactId>
                    <version>${version.help.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <manifest>
                                <addDefaultSpecificationEntries>
                                    true
                                </addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>
                                    true
                                </addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-URL>${project.url}</Implementation-URL>
                                <Java-Version>${java.version}</Java-Version>
                                <Java-Vendor>${java.vendor}</Java-Vendor>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <Scm-Url>${project.scm.url}</Scm-Url>
                                <Scm-Connection>${project.scm.connection}</Scm-Connection>
                                <Scm-Revision>${buildNumber}</Scm-Revision>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
                    <artifactId>maven-java-formatter-plugin</artifactId>
                    <version>0.4</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>format</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <compilerSource>1.8</compilerSource>
                        <compilerCompliance>1.8</compilerCompliance>
                        <compilerTargetPlatform>1.8</compilerTargetPlatform>
                        <lineEnding>LF</lineEnding>
                        <configFile>eclipse-java-standards-with-120-wrap.xml</configFile>
                        <sourceDirectory>${project.basedir}/src/generated/java</sourceDirectory>
                        <testSourceDirectory>${project.basedir}/src/test/generated/java</testSourceDirectory>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.technologybrewery.fermenter.stout</groupId>
                            <artifactId>stout-build-tools</artifactId>
                            <version>${version.fermenter.legacy.tools}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <header>
                            <![CDATA[<b>${project.name} ${project.version}</b>]]>
                        </header>
                        <footer>
                            <![CDATA[<b>${project.name} ${project.version}</b>]]>
                        </footer>
                        <archive>
                            <index>true</index>
                            <manifest>
                                <addDefaultSpecificationEntries>
                                    true
                                </addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>
                                    true
                                </addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-URL>${project.url}</Implementation-URL>
                                <Java-Version>${java.version}</Java-Version>
                                <Java-Vendor>${java.vendor}</Java-Vendor>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <Scm-Url>${project.scm.url}</Scm-Url>
                                <Scm-Connection>${project.scm.connection}</Scm-Connection>
                                <Scm-Revision>${buildNumber}</Scm-Revision>
                            </manifestEntries>
                        </archive>
                        <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                        <additionalOptions>${javadoc.additional.params}</additionalOptions>
                        <failOnError>false</failOnError>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <configuration>
                        <licenseName>booz-allen-public-license</licenseName>
                        <licenseResolver>classpath://com/boozallen</licenseResolver>
                        <excludes>
                            <exclude>**/*.json</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>update-file-header</id>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <canUpdateCopyright>true</canUpdateCopyright>
                                <ignoreLastDate>true</ignoreLastDate>
                            </configuration>
                        </execution>
                        <execution>
                            <id>update-project-license</id>
                            <goals>
                                <goal>update-project-license</goal>
                            </goals>
                            <configuration>
                                <force>true</force>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.boozallen.aissemble</groupId>
                            <artifactId>booz-allen-licenses</artifactId>
                            <version>1.2.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${version.plugin.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-maven-plugin</artifactId>
                    <version>${version.quarkus.plugin}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>build</goal>
                                <goal>generate-code</goal>
                                <goal>generate-code-tests</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${version.shade.plugin}</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                            <configuration>
                                <createDependencyReducedPom>false</createDependencyReducedPom>
                                <filters>
                                    <filter>
                                        <artifact>*:*</artifact>
                                        <excludes>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                                <!-- NOTE: Transformer configurations will need to be added when using this
                                plugin. aissemble will generate the minimum required transformers
                                needed, but please be aware that it is tricky to debug this configuration,
                                and additional transformers may need to be added. -->
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <manifest>
                                <addDefaultSpecificationEntries>
                                    true
                                </addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>
                                    true
                                </addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-URL>${project.url}</Implementation-URL>
                                <Java-Version>${java.version}</Java-Version>
                                <Java-Vendor>${java.vendor}</Java-Vendor>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <Scm-Url>${project.scm.url}</Scm-Url>
                                <Scm-Connection>${project.scm.connection}</Scm-Connection>
                                <Scm-Revision>${buildNumber}</Scm-Revision>
                            </manifestEntries>
                        </archive>
                    </configuration>
                    <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-surefire-plugin</artifactId>
                    <configuration>
                        <trimStackTrace>false</trimStackTrace>
                        <systemPropertyVariables>
                            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
                            <KRAUSENING_BASE>${project.basedir}/src/test/resources/krausening/base</KRAUSENING_BASE>
                            <KRAUSENING_EXTENSIONS>${project.basedir}/src/test/resources/krausening/test
                            </KRAUSENING_EXTENSIONS>
                            <KRAUSENING_PASSWORD>3uQ2j_=wmP5A2q8b</KRAUSENING_PASSWORD>
                            <cucumber.options>--tags not @manual</cucumber.options>
                        </systemPropertyVariables>
                        <environmentVariables>
                            <TESTCONTAINERS_RYUK_DISABLED>${TESTCONTAINERS_RYUK_DISABLED}</TESTCONTAINERS_RYUK_DISABLED>
                            <!--<TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>YOUR MIRROR OR INTENRAL REPO GOES HERE - e.g., nexus.foobar.com/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>-->
                        </environmentVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.boozallen.aissemble</groupId>
                    <artifactId>mda-maven-plugin</artifactId>
                    <version>${version.aissemble}</version>
                </plugin>
                <plugin>
                    <groupId>com.boozallen.aissemble</groupId>
                    <artifactId>foundation-upgrade-plugin</artifactId>
                    <version>${version.aissemble}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Check for the minimum version of Java and Maven. Runs during the
                validate phase. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-java-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedRepositories>
                                    <message>To build this project, don't use maven repositories
                                        over HTTP. Please use HTTPS in your settings.xml or run the
                                        build with property insecure.repositories=WARN
                                    </message>
                                    <level>${insecure.repositories}</level>
                                    <bannedRepositories>
                                        <bannedRepository>http://*</bannedRepository>
                                    </bannedRepositories>
                                    <bannedPluginRepositories>
                                        <bannedPluginRepository>http://*</bannedPluginRepository>
                                    </bannedPluginRepositories>
                                </bannedRepositories>
                                <requireJavaVersion>
                                    <message>To build this project JDK ${version.jdk.required} is required. Please
                                        install it.
                                    </message>
                                    <version>[${version.jdk.required},${version.jdk.next-unsupported})</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <message>To build this project Maven ${version.maven.min} (or
                                        greater) is required. Please install it.
                                    </message>
                                    <version>${version.maven.min}</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-helm-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <enforceHelmVersion>
                                    <message>You will need to upgrade your version of helm to ${version.helm.min}+. If you are using rancher desktop, upgrade to version 1.9.0+, which comes with the correct helm version.
To suppress enforce-helm-version rule, you must add following plugin to the root pom.xml:

                                        &lt;plugin&gt;
                                            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                            &lt;artifactId&gt;maven-enforcer-plugin&lt;/artifactId&gt;
                                            &lt;executions&gt;
                                                &lt;execution&gt;
                                                    &lt;id&gt;enforce-helm-version&lt;/id&gt;
                                                    &lt;phase&gt;none&lt;/phase&gt;
                                                &lt;/execution&gt;
                                            &lt;/executions&gt;
                                        &lt;/plugin&gt;
                                    </message>
                                    <requiredHelmVersion>${version.helm.min}</requiredHelmVersion>
                                </enforceHelmVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.boozallen.aissemble</groupId>
                        <artifactId>aissemble-enforcer-extension</artifactId>
                        <version>${version.aissemble}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Apply licenses automatically -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>

            <!-- Set properties containing the scm revision -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>get-scm-revision</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <configuration>
                            <doCheck>false</doCheck>
                            <doUpdate>false</doUpdate>
                            <revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
                            <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.technologybrewery.baton</groupId>
                <artifactId>baton-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>

        <profile>
            <id>ci</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.technologybrewery.habushu</groupId>
                            <artifactId>habushu-maven-plugin</artifactId>
                            <version>${version.habushu.plugin}</version>
                            <configuration>
                                <deleteVirtualEnv>true</deleteVirtualEnv>
                                <forceSync>true</forceSync>
                                <decryptPassword>false</decryptPassword>
                                <rewriteLocalPathDepsInArchives>true</rewriteLocalPathDepsInArchives>
                                <addPypiRepoAsPackageSources>false</addPypiRepoAsPackageSources>
                                <useDevRepository>true</useDevRepository>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>${group.fabric8.plugin}</groupId>
                            <artifactId>docker-maven-plugin</artifactId>
                            <version>${version.fabric8.docker.maven.plugin}</version>
                            <executions>
                                <execution>
                                    <id>default-build</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>build</goal>
                                    </goals>
                                    <configuration>
                                        <!-- Deploy will build all platforms, so skip build phase in this case: -->
                                        <buildArchiveOnly>true</buildArchiveOnly>
                                        <images>
                                            <image>
                                                <build>
                                                    <buildx>
                                                        <builderName>maven</builderName>
                                                    </buildx>
                                                </build>
                                            </image>
                                        </images>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>integration-test</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${version.failsafe.plugin}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <javadoc.additional.params>-Xdoclint:none</javadoc.additional.params>
            </properties>
        </profile>
        <!-- This profile can be activated to generate gpg signatures for all build
            artifacts. This profile requires that the properties "gpg.keyname" and "gpg.passphrase"
            are available to the current build. -->
        <profile>
            <id>gpg-sign</id>
            <build>
                <plugins>
                    <!-- This will sign the artifact, the POM, and all attached artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <useAgent>true</useAgent>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>incremental</id>
            <activation>
                <property>
                    <name>incremental</name>
                </property>
            </activation>
            <properties>
                <!-- the *local* dev, not refs/remotes/... -->
                <gib.referenceBranch>dev</gib.referenceBranch>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.github.gitflow-incremental-builder</groupId>
                        <artifactId>gitflow-incremental-builder</artifactId>
                        <version>${version.gitflow-incremental-builder}</version>
                        <extensions>true</extensions>
                        <!-- https://github.com/gitflow-incremental-builder/gitflow-incremental-builder#configuration
                             General recap: Anything that is directly set in <configuration> cannot be redefined via '-D...'!
                             See also: https://github.com/gitflow-incremental-builder/gitflow-incremental-builder/issues/213 -->
                        <configuration>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>hide-manual-actions</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <hide.manual.actions>true</hide.manual.actions>
            </properties>
        </profile>
    </profiles>

</project>
