<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ This file is part of Alpine.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  ~ SPDX-License-Identifier: Apache-2.0
  ~ Copyright (c) Steve Springett. All Rights Reserved.
  -->
<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>us.springett</groupId>
    <artifactId>alpine-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.2.2</version>

    <modules>
        <module>alpine-common</module>
        <module>alpine-model</module>
        <module>alpine-infra</module>
        <module>alpine-server</module>
        <module>alpine-executable-war</module>
    </modules>

    <name>alpine-parent</name>
    <description>
        An opinionated scaffolding library that jumpstarts Java projects with an API-first design,
        secure defaults, and minimal dependencies.
    </description>
    <url>https://github.com/stevespringett/Alpine</url>
    <inceptionYear>2016</inceptionYear>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Steve Springett</name>
            <organizationUrl>http://stevespringett.com/</organizationUrl>
            <roles>
                <role>Architect</role>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:stevespringett/Alpine.git</connection>
        <url>https://github.com/stevespringett/Alpine.git</url>
        <developerConnection>scm:git:git@github.com:stevespringett/Alpine.git</developerConnection>
        <tag>alpine-parent-2.2.2</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/stevespringett/Alpine/issues</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub-Actions</system>
        <url>https://github.com/stevespringett/Alpine/actions</url>
    </ciManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <!-- Maven Build Properties -->
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <timestamp>${maven.build.timestamp}</timestamp>

        <!-- Maven Plugin Versions -->
        <maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
        <maven.dependency.plugin.version>3.3.0</maven.dependency.plugin.version>
        <maven.javadoc.plugin.version>3.3.1</maven.javadoc.plugin.version>
        <maven.site.plugin.version>3.7.1</maven.site.plugin.version>
        <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
        <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
        <maven.jar.plugin.version>3.2.2</maven.jar.plugin.version>
        <maven.war.plugin.version>3.3.2</maven.war.plugin.version>
        <maven.shade.plugin.version>3.4.1</maven.shade.plugin.version>
        <maven.datanucleus.plugin.version>6.0.0-release</maven.datanucleus.plugin.version>
        <maven.versions.plugin.version>2.13.0</maven.versions.plugin.version>
        <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
        <maven.enforcer.plugin.version>3.2.1</maven.enforcer.plugin.version>
        <maven.uuidgenerator.plugin.version>1.0.1</maven.uuidgenerator.plugin.version>
        <maven.jacoco.plugin.version>0.8.8</maven.jacoco.plugin.version>
        <maven.antrun.plugin.version>3.1.0</maven.antrun.plugin.version>
        <maven.jarsigner.plugin.veresion>3.0.0</maven.jarsigner.plugin.veresion>

        <!-- Software Security: Fortify SCA -->
        <maven.fortify.plugin.version>18.20</maven.fortify.plugin.version>
        <plugin.fortify.sca.debug>false</plugin.fortify.sca.debug>
        <plugin.fortify.sca.verbose>false</plugin.fortify.sca.verbose>
        <plugin.fortify.sca.sourcePath>${project.build.directory}/dependency-sources</plugin.fortify.sca.sourcePath>
        <plugin.fortify.sca.buildId>${project.artifactId}</plugin.fortify.sca.buildId>
        <plugin.fortify.sca.source.version>${maven.compiler.source}</plugin.fortify.sca.source.version>
        <plugin.fortify.sca.findbugs>false</plugin.fortify.sca.findbugs>

        <!-- Sonatype OSS Index -->
        <maven.ossindex.plugin.version>3.2.0</maven.ossindex.plugin.version>
        <plugin.ossindex.authId>ossindex</plugin.ossindex.authId>
        <plugin.ossindex.cvssScoreThreshold>0.0</plugin.ossindex.cvssScoreThreshold>
        <plugin.ossindex.excludeCoordinatesCsv />
        <plugin.ossindex.excludeVulnerabilityIdsCsv />
        <plugin.ossindex.fail>true</plugin.ossindex.fail>
        <plugin.ossindex.reportFile>${project.build.directory}/ossindex.json</plugin.ossindex.reportFile>
        <plugin.ossindex.scope>compile</plugin.ossindex.scope>
        <plugin.ossindex.skip>false</plugin.ossindex.skip>
        <plugin.ossindex.transitive>true</plugin.ossindex.transitive>

        <!-- Software Security: Retire.js -->
        <maven.retirejs.plugin.version>3.0.4</maven.retirejs.plugin.version>
        <plugin.retirejs.breakOnFailure>true</plugin.retirejs.breakOnFailure>
        <plugin.retirejs.webAppDir>${project.build.sourceDirectory}/../webapp</plugin.retirejs.webAppDir>
        <plugin.retirejs.detail>true</plugin.retirejs.detail>
        <plugin.retirejs.indentSize>4</plugin.retirejs.indentSize>

        <!-- CycloneDX SBOM Creation -->
        <maven.cyclonedx.plugin.version>2.7.1</maven.cyclonedx.plugin.version>
        <plugin.cyclonedx.projectType>framework</plugin.cyclonedx.projectType>
        <plugin.cyclonedx.schemaVersion>1.4</plugin.cyclonedx.schemaVersion>
        <plugin.cyclonedx.outputFormat>all</plugin.cyclonedx.outputFormat>
        <plugin.cyclonedx.includeCompileScope>true</plugin.cyclonedx.includeCompileScope>
        <plugin.cyclonedx.includeProvidedScope>true</plugin.cyclonedx.includeProvidedScope>
        <plugin.cyclonedx.includeRuntimeScope>true</plugin.cyclonedx.includeRuntimeScope>
        <plugin.cyclonedx.includeSystemScope>true</plugin.cyclonedx.includeSystemScope>
        <plugin.cyclonedx.includeTestScope>false</plugin.cyclonedx.includeTestScope>
        <plugin.cyclonedx.includeLicenseText>false</plugin.cyclonedx.includeLicenseText>
        <plugin.cyclonedx.outputReactorProjects>true</plugin.cyclonedx.outputReactorProjects>

        <!-- Dependency Versions -->
        <lib.alpine.executable.war.version>2.2.2</lib.alpine.executable.war.version>
        <lib.bcrypt.version>0.4</lib.bcrypt.version>
        <lib.caffeine.version>3.1.1</lib.caffeine.version>
        <lib.commons.collections4.version>4.4</lib.commons.collections4.version>
        <lib.commons.io.version>2.11.0</lib.commons.io.version>
        <lib.commons.lang3.version>3.12.0</lib.commons.lang3.version>
        <lib.datanucleus-api-jdo.version>6.0.1</lib.datanucleus-api-jdo.version>
        <lib.datanucleus.version>6.0.3</lib.datanucleus.version>
        <lib.datanucleus-rdbms.version>6.0.3</lib.datanucleus-rdbms.version>
        <lib.h2.version>2.1.214</lib.h2.version>
        <lib.hikaricp.version>5.0.1</lib.hikaricp.version>
        <lib.javassist.version>3.29.2-GA</lib.javassist.version>
        <lib.jackson.version>2.14.2</lib.jackson.version>
        <lib.jackson-databind.version>2.14.1</lib.jackson-databind.version>
        <lib.javamail.version>1.6.7</lib.javamail.version>
        <lib.jaxb.api.version>2.3.1</lib.jaxb.api.version>
        <lib.jaxb.core.version>2.3.0.1</lib.jaxb.core.version>
        <lib.jaxb.impl.version>2.3.6</lib.jaxb.impl.version>
        <lib.jdo.api.version>3.2.1</lib.jdo.api.version>
        <lib.jersey.version>2.38</lib.jersey.version>
        <lib.json-unit.version>2.37.0</lib.json-unit.version>
        <lib.jsp.api.version>2.2</lib.jsp.api.version>
        <lib.jsonwebtoken.version>0.9.1</lib.jsonwebtoken.version>
        <lib.jsr305.version>3.0.2</lib.jsr305.version>
        <lib.jsr353-impl.version>1.1.4</lib.jsr353-impl.version>
        <lib.jsr353-spec.version>1.1.4</lib.jsr353-spec.version>
        <lib.jstl.version>1.2.5</lib.jstl.version>
        <lib.logback.version>1.2.11</lib.logback.version>
        <lib.micrometer.version>1.9.4</lib.micrometer.version>
        <lib.microprofile-health-api.version>3.1</lib.microprofile-health-api.version>
        <lib.nimbus-oauth2-oidc-sdk.version>10.7.1</lib.nimbus-oauth2-oidc-sdk.version>
        <lib.owasp.encoder.version>1.2.3</lib.owasp.encoder.version>
        <lib.owasp.security-logging.version>1.1.7</lib.owasp.security-logging.version>
        <lib.slf4j.version>1.7.36</lib.slf4j.version>
        <lib.swagger.jersey.version>1.6.9</lib.swagger.jersey.version>
        <!-- Unit test libraries -->
        <lib.junit.version>4.13.2</lib.junit.version>
        <lib.mockito.version>5.1.1</lib.mockito.version>
        <lib.assertj.version>3.23.1</lib.assertj.version>
        <lib.wiremock.version>2.35.0</lib.wiremock.version>

        <war-embedded-finalname>${project.build.finalName}</war-embedded-finalname>

        <!-- Logback configuration - Used for Embedded Jetty profile -->
        <logback.configuration.file>${project.build.directory}/classes/logback.xml</logback.configuration.file>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Misc helper libraries -->
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${lib.commons.io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${lib.commons.lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${lib.commons.collections4.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-client</artifactId>
                <version>${lib.jersey.version}</version>
            </dependency>
            <!-- Server architecture -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>4.0.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-servlet</artifactId>
                <version>${lib.jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.media</groupId>
                <artifactId>jersey-media-json-jackson</artifactId>
                <version>${lib.jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.media</groupId>
                <artifactId>jersey-media-multipart</artifactId>
                <version>${lib.jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.ext</groupId>
                <artifactId>jersey-bean-validation</artifactId>
                <version>${lib.jersey.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.inject</groupId>
                <artifactId>jersey-hk2</artifactId>
                <version>${lib.jersey.version}</version>
            </dependency>
            <!-- JAXB -->
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>${lib.jaxb.api.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-core</artifactId>
                <version>${lib.jaxb.core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>${lib.jaxb.impl.version}</version>
            </dependency>
            <!-- JSON API specification and default implementation of JSR 353 -->
            <dependency>
                <groupId>javax.json</groupId>
                <artifactId>javax.json-api</artifactId>
                <version>${lib.jsr353-spec.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.json</artifactId>
                <version>${lib.jsr353-impl.version}</version>
            </dependency>
            <!-- todo: update swagger when available -->
            <!-- https://github.com/swagger-api/swagger-core/issues/1594 -->
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-jersey2-jaxrs</artifactId>
                <version>${lib.swagger.jersey.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.validation</groupId>
                        <artifactId>validation-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- Persistence -->
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>javax.jdo</artifactId>
                <version>${lib.jdo.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-api-jdo</artifactId>
                <version>${lib.datanucleus-api-jdo.version}</version>
            </dependency>
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-core</artifactId>
                <version>${lib.datanucleus.version}</version>
            </dependency>
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-rdbms</artifactId>
                <version>${lib.datanucleus-rdbms.version}</version>
            </dependency>
            <!--
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-jdo-query</artifactId>
                <version>${lib.datanucleus-jdo-query.version}</version>
            </dependency>
            -->
            <dependency>
                <groupId>com.zaxxer</groupId>
                <artifactId>HikariCP</artifactId>
                <version>${lib.hikaricp.version}</version>
            </dependency>
            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>${lib.javassist.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${lib.h2.version}</version>
            </dependency>
            <!-- Authentication and Authorization -->
            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt</artifactId>
                <version>${lib.jsonwebtoken.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mindrot</groupId>
                <artifactId>jbcrypt</artifactId>
                <version>${lib.bcrypt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>oauth2-oidc-sdk</artifactId>
                <version>${lib.nimbus-oauth2-oidc-sdk.version}</version>
            </dependency>
            <!-- JAX-RS JSON -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${lib.jackson-databind.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${lib.jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-base</artifactId>
                <version>${lib.jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-json-provider</artifactId>
                <version>${lib.jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk8</artifactId>
                <version>${lib.jackson.version}</version>
            </dependency>
            <!-- Metrics -->
            <dependency>
                <groupId>io.micrometer</groupId>
                <artifactId>micrometer-registry-prometheus</artifactId>
                <version>${lib.micrometer.version}</version>
            </dependency>
            <!-- Health -->
            <dependency>
                <groupId>org.eclipse.microprofile.health</groupId>
                <artifactId>microprofile-health-api</artifactId>
                <version>${lib.microprofile-health-api.version}</version>
            </dependency>
            <!-- Logging -->
            <!-- Overriding OWASP Security Logging dependencies with newer versions -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${lib.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${lib.logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${lib.logback.version}</version>
            </dependency>
            <dependency>
                <groupId>org.owasp</groupId>
                <artifactId>security-logging-common</artifactId>
                <version>${lib.owasp.security-logging.version}</version>
            </dependency>
            <dependency>
                <groupId>org.owasp</groupId>
                <artifactId>security-logging-logback</artifactId>
                <version>${lib.owasp.security-logging.version}</version>
            </dependency>
            <!-- XSS prevention -->
            <dependency>
                <groupId>org.owasp.encoder</groupId>
                <artifactId>encoder</artifactId>
                <version>${lib.owasp.encoder.version}</version>
            </dependency>
            <dependency>
                <groupId>org.owasp.encoder</groupId>
                <artifactId>encoder-jsp</artifactId>
                <version>${lib.owasp.encoder.version}</version>
            </dependency>
            <!-- JavaMail API -->
            <dependency>
                <groupId>com.sun.mail</groupId>
                <artifactId>jakarta.mail</artifactId>
                <version>${lib.javamail.version}</version>
            </dependency>
            <!-- Quality -->
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>${lib.jsr305.version}</version>
            </dependency>
            <!-- Object cache -->
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${lib.caffeine.version}</version>
            </dependency>
            <!-- Unit Tests -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${lib.junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.test-framework.providers</groupId>
                <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
                <version>${lib.jersey.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${lib.mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.stefanbirkner</groupId>
                <artifactId>system-rules</artifactId>
                <version>1.19.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${lib.assertj.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>net.javacrumbs.json-unit</groupId>
                <artifactId>json-unit-assertj</artifactId>
                <version>${lib.json-unit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.tomakehurst</groupId>
                <artifactId>wiremock-jre8-standalone</artifactId>
                <version>${lib.wiremock.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <prerequisites>
        <maven>3.6.0</maven>
    </prerequisites>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.datanucleus</groupId>
                    <artifactId>datanucleus-maven-plugin</artifactId>
                    <version>${maven.datanucleus.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jarsigner-plugin</artifactId>
                    <version>${maven.jarsigner.plugin.veresion}</version>
                    <executions>
                        <execution>
                            <id>sign</id>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>verify</id>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <compilerArgs>
                        <arg>-Xlint:all</arg>
                        <arg>-Xlint:-processing</arg>
                        <arg>-Xlint:-serial</arg>
                        <!-- <arg>-Werror</arg> -->
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <argLine>@{argLine} --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED</argLine>
                    <reuseForks>false</reuseForks>
                    <forkCount>1</forkCount>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven.war.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>us.springett</groupId>
                <artifactId>maven-uuid-generator</artifactId>
                <version>${maven.uuidgenerator.plugin.version}</version>
                <executions>
                    <execution>
                        <id>generate-uuid</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.cyclonedx</groupId>
                <artifactId>cyclonedx-maven-plugin</artifactId>
                <version>${maven.cyclonedx.plugin.version}</version>
                <executions>
                    <execution>
                        <id>cyclonedx-aggregate</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>makeAggregateBom</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <projectType>${plugin.cyclonedx.projectType}</projectType>
                    <schemaVersion>${plugin.cyclonedx.schemaVersion}</schemaVersion>
                    <includeCompileScope>${plugin.cyclonedx.includeCompileScope}</includeCompileScope>
                    <includeProvidedScope>${plugin.cyclonedx.includeProvidedScope}</includeProvidedScope>
                    <includeRuntimeScope>${plugin.cyclonedx.includeRuntimeScope}</includeRuntimeScope>
                    <includeSystemScope>${plugin.cyclonedx.includeSystemScope}</includeSystemScope>
                    <includeTestScope>${plugin.cyclonedx.includeTestScope}</includeTestScope>
                    <includeLicenseText>${plugin.cyclonedx.includeLicenseText}</includeLicenseText>
                    <outputReactorProjects>${plugin.cyclonedx.outputReactorProjects}</outputReactorProjects>
                    <outputFormat>${plugin.cyclonedx.outputFormat}</outputFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${maven.jacoco.plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->
                            <dataFile>target/jacoco.exec</dataFile>
                            <!-- Sets the output directory for the code coverage report. -->
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <destFile>target/jacoco.exec</destFile>
                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>alpine.version</include>
                    <include>application.properties</include>
                </includes>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <id>enhance</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.datanucleus</groupId>
                        <artifactId>datanucleus-maven-plugin</artifactId>
                        <configuration>
                            <api>JDO</api>
                            <persistenceUnitName>Alpine</persistenceUnitName>
                            <verbose>true</verbose>
                            <fork>false</fork>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>process-classes</phase>
                                <goals>
                                    <goal>enhance</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>fortify</id>
            <!-- Only activate this profile if you're a Fortify customer, have the required
                 Fortify Maven plugin installed, and SCA installed and configured. -->
            <activation>
                <property>
                    <name>env.ACTIVATE_FORTIFY</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <defaultGoal>process-classes</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>${maven.dependency.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>src-dependencies</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>unpack-dependencies</goal>
                                </goals>
                                <configuration>
                                    <classifier>sources</classifier>
                                    <includeScope>compile</includeScope>
                                    <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
                                    <outputDirectory>${plugin.fortify.sca.sourcePath}</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.fortify.sca.plugins.maven</groupId>
                        <artifactId>sca-maven-plugin</artifactId>
                        <version>${maven.fortify.plugin.version}</version>
                        <configuration>
                            <buildId>${plugin.fortify.sca.buildId}</buildId>
                            <sourcePath>${plugin.fortify.sca.sourcePath}</sourcePath>
                            <debug>${plugin.fortify.sca.debug}</debug>
                            <verbose>${plugin.fortify.sca.verbose}</verbose>
                            <source>${plugin.fortify.sca.source.version}</source>
                            <findbugs>${plugin.fortify.sca.findbugs}</findbugs>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sca-clean</id>
                                <phase>clean</phase>
                                <goals>
                                    <goal>clean</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>sca-translate</id>
                                <phase>process-classes</phase>
                                <goals>
                                    <goal>translate</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>sca-scan</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>scan</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>component-analysis</id>
            <!-- Activate this profile to check third-party components for known vulnerabilities
                 using Sonatype  OSS Index and Retire.js. -->
            <activation>
                <property>
                    <name>env.ACTIVATE_COMPONENT_ANALYSIS</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <defaultGoal>package</defaultGoal>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.sonatype.ossindex.maven</groupId>
                            <artifactId>ossindex-maven-plugin</artifactId>
                            <version>${maven.ossindex.plugin.version}</version>
                            <configuration>
                                <authId>${plugin.ossindex.authId}</authId>
                                <cvssScoreThreshold>${plugin.ossindex.cvssScoreThreshold}</cvssScoreThreshold>
                                <excludeCoordinatesCsv>${plugin.ossindex.excludeCoordinatesCsv}</excludeCoordinatesCsv>
                                <excludeVulnerabilityIdsCsv>${plugin.ossindex.excludeVulnerabilityIdsCsv}</excludeVulnerabilityIdsCsv>
                                <fail>${plugin.ossindex.fail}</fail>
                                <reportFile>${plugin.ossindex.reportFile}</reportFile>
                                <scope>${plugin.ossindex.scope}</scope>
                                <skip>${plugin.ossindex.skip}</skip>
                                <transitive>${plugin.ossindex.transitive}</transitive>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>audit-dependencies</id>
                                    <phase>validate</phase>
                                    <goals>
                                        <goal>audit</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <version>${maven.versions.plugin.version}</version>
                        <inherited>true</inherited>
                        <executions>
                            <execution>
                                <id>maven-versions</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>display-dependency-updates</goal>
                                    <goal>display-plugin-updates</goal>
                                    <goal>display-property-updates</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>${maven.dependency.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>tree-dependencies</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>analyze-only</goal>
                                    <goal>tree</goal>
                                </goals>
                                <configuration>
                                    <outputFile>${project.build.directory}/dependency-tree.txt</outputFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.h3xstream.retirejs</groupId>
                        <artifactId>retirejs-maven-plugin</artifactId>
                        <version>${maven.retirejs.plugin.version}</version>
                        <configuration>
                            <breakOnFailure>${plugin.retirejs.breakOnFailure}</breakOnFailure>
                            <webAppDirectory>${plugin.retirejs.webAppDir}</webAppDirectory>
                            <detail>${plugin.retirejs.detail}</detail>
                            <indentSize>${plugin.retirejs.indentSize}</indentSize>
                        </configuration>
                        <executions>
                            <execution>
                                <id>retire-js</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>scan</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.ossindex.maven</groupId>
                        <artifactId>ossindex-maven-plugin</artifactId>
                        <version>${maven.ossindex.plugin.version}</version>
                        <configuration>
                            <authId>${plugin.ossindex.authId}</authId>
                            <cvssScoreThreshold>${plugin.ossindex.cvssScoreThreshold}</cvssScoreThreshold>
                            <excludeCoordinatesCsv>${plugin.ossindex.excludeCoordinatesCsv}</excludeCoordinatesCsv>
                            <excludeVulnerabilityIdsCsv>${plugin.ossindex.excludeVulnerabilityIdsCsv}</excludeVulnerabilityIdsCsv>
                            <fail>${plugin.ossindex.fail}</fail>
                            <reportFile>${plugin.ossindex.reportFile}</reportFile>
                            <scope>${plugin.ossindex.scope}</scope>
                            <skip>${plugin.ossindex.skip}</skip>
                            <transitive>${plugin.ossindex.transitive}</transitive>
                        </configuration>
                        <executions>
                            <execution>
                                <id>audit-dependencies</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>audit</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>embedded-jetty</id>
            <activation>
                <property>
                    <name>env.ACTIVATE_EMBEDDED_JETTY</name>
                    <value>true</value>
                </property>
            </activation>
            <dependencies>
                <!-- Executable WAR with embedded Jetty -->
                <dependency>
                    <groupId>us.springett</groupId>
                    <artifactId>alpine-executable-war</artifactId>
                    <version>${lib.alpine.executable.war.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.owasp</groupId>
                    <artifactId>security-logging-common</artifactId>
                    <version>${lib.owasp.security-logging.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.owasp</groupId>
                    <artifactId>security-logging-logback</artifactId>
                    <version>${lib.owasp.security-logging.version}</version>
                </dependency>
            </dependencies>
            <build>
                <defaultGoal>package</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>com.coderplus.maven.plugins</groupId>
                        <artifactId>copy-rename-maven-plugin</artifactId>
                        <version>1.0.1</version>
                        <executions>
                            <execution>
                                <id>copy-and-rename-file</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <sourceFile>${logback.configuration.file}</sourceFile>
                                    <destinationFile>${project.build.directory}/${project.build.finalName}/logback.xml</destinationFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>${maven.war.plugin.version}</version>
                        <configuration>
                            <warName>${war-embedded-finalname}</warName>
                            <archive>
                                <manifest>
                                    <mainClass>alpine.embedded.EmbeddedJettyServer</mainClass>
                                </manifest>
                            </archive>
                            <packagingExcludes>WEB-INF/lib/executable-war-*.jar</packagingExcludes>
                            <dependentWarExcludes>WEB-INF/lib/*log4j*.jar,WEB-INF/lib/*slf4j*.jar</dependentWarExcludes>
                            <overlays>
                                <overlay>
                                    <groupId>us.springett</groupId>
                                    <artifactId>alpine-executable-war</artifactId>
                                    <type>jar</type>
                                </overlay>
                                <overlay>
                                    <groupId>org.owasp</groupId>
                                    <artifactId>security-logging-common</artifactId>
                                    <type>jar</type>
                                </overlay>
                                <overlay>
                                    <groupId>org.owasp</groupId>
                                    <artifactId>security-logging-logback</artifactId>
                                    <type>jar</type>
                                </overlay>
                            </overlays>
                        </configuration>
                    </plugin>
                    <!-- Not ideal to include Ant, however, after trying copy-rename-maven-plugin, the resulting
                    executable war always had DEBUG logging on when executed. Really odd behavior. Using the Move
                    target within Ant seems to work fine without the weird logging issue in the resulting jar. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>${maven.antrun.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>rename-war-file</id>
                                <phase>package</phase>
                                <configuration>
                                    <target>
                                        <move file="${project.build.directory}/${war-embedded-finalname}.war" tofile="${project.build.directory}/${war-embedded-finalname}.jar" />
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

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

        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>${maven.enforcer.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>enforce-java</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireJavaVersion>
                                            <version>${maven.compiler.target}</version>
                                        </requireJavaVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

</project>
