<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.0sd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.optum.sourcehawk</groupId>
    <artifactId>sourcehawk-parent</artifactId>
    <version>2.0.0</version>
    <packaging>pom</packaging>

    <name>Sourcehawk Parent</name>
    <description>Sourcehawk Parent Pom for supporting maven project inheritance</description>

    <inceptionYear>2020</inceptionYear>

    <organization>
        <name>Optum</name>
        <url>https://optum.github.io/</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>

        <!-- VERSIONS -->
        <maven.version>3.8.4</maven.version> <!-- Minimum required maven version -->

        <!-- PLUGIN PROPERTY OVERRIDES -->
        <flatten.mode>ossrh</flatten.mode> <!-- flatten-maven-plugin -->

        <!-- ENCODING -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- GLOBAL ORGANIZATION -->
        <global.organization.name>optum</global.organization.name>
        <global.organization.email>opensource@optum.com</global.organization.email>

        <!-- GLOBAL PROJECT -->
        <global.project.name>sourcehawk</global.project.name>
        <global.project.description>Sourcehawk is an extensible compliance as code automation tool which enables teams to run tailored compliance scans on their source code.</global.project.description>
        <global.project.url>https://optum.github.io/sourcehawk</global.project.url>
        <global.project.maintainer>brianwyka</global.project.maintainer>
        <global.project.maintainer.name>Brian Wyka</global.project.maintainer.name>
        <global.project.maintainer.email>brian.wyka@optum.com</global.project.maintainer.email>

        <!-- DOCKER -->
        <docker.organization>optumopensource</docker.organization>

        <!-- SONAR PROPERTIES -->
        <sonar.organization>${global.project.name}</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.junit.reportPaths>**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml,**/target/invoker-reports/BUILD-*.xml</sonar.junit.reportPaths>
        <sonar.java.checkstyle.reportPaths>**/target/checkstyle-result.xml</sonar.java.checkstyle.reportPaths>
        <sonar.coverage.jacoco.xmlReportPaths>**/target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>

    </properties>

    <developers>
        <developer>
            <id>brianwyka</id>
            <name>Brian Wyka</name>
            <email>brian.wyka@optum.com</email>
            <organization>Optum</organization>
            <roles>
                <role>Project Lead</role>
            </roles>
        </developer>
        <developer>
            <id>ctoestreich</id>
            <name>Christian Oestreich</name>
            <email>christian.oestreich@optum.com</email>
            <organization>Optum}</organization>
            <roles>
                <role>Project Lead</role>
            </roles>
        </developer>
    </developers>

    <url>${global.project.url}</url>

    <scm>
        <url>https://github.com/optum/sourcehawk-parent</url>
        <connection>scm:git:https://github.com/optum/sourcehawk-parent.git</connection>
        <developerConnection>scm:git:git@github.com:optum/sourcehawk-parent.git</developerConnection>
    </scm>

    <issueManagement>
        <url>https://github.com/optum/sourcehawk-parent/issues</url>
    </issueManagement>

    <ciManagement>
        <system>github</system>
        <url>https://github.com/optum/sourcehawk-parent/actions</url>
    </ciManagement>

    <build>

        <defaultGoal>install</defaultGoal>

        <pluginManagement>
            <plugins>

                <!-- START: OFFICIAL MAVEN PLUGINS -->
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>enforce-build-prerequisites</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireNoRepositories/>
                                    <requireMavenVersion>
                                        <version>${maven.version}</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <fail>true</fail>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>extra-enforcer-rules</artifactId>
                            <version>1.5.1</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <configuration>
                                <gpgArguments>
                                    <arg>--pinentry-mode</arg>
                                    <arg>loopback</arg>
                                </gpgArguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.9.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <!-- END: OFFICIAL MAVEN PLUGINS -->

                <!-- START: THIRD PARTY MAVEN PLUGINS -->
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>
                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>4.9.10</version>
                    <executions>
                        <execution>
                            <id>generate-git-commit-info</id>
                            <goals>
                                <goal>revision</goal>
                            </goals>
                            <phase>initialize</phase>
                        </execution>
                    </executions>
                    <configuration>
                        <offline>true</offline>
                        <dotGitDirectory>${maven.multiModuleProjectDirectory}/.git</dotGitDirectory>
                        <skipPoms>false</skipPoms>
                        <generateGitPropertiesFile>true</generateGitPropertiesFile>
                        <generateGitPropertiesFilename>${project.build.directory}/git.properties</generateGitPropertiesFilename>
                        <includeOnlyProperties>
                            <includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
                            <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
                        </includeOnlyProperties>
                        <commitIdGenerationMode>full</commitIdGenerationMode>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>dockerfile-maven-plugin</artifactId>
                    <version>1.4.13</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.0.0</version>
                    <executions>
                        <execution>
                            <id>add-license-to-file-headers</id>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                                <projectName>${global.project.name}</projectName>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.8.1</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                        <updateMatchingVersions>false</updateMatchingVersions>
                        <processAllModules>true</processAllModules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>flatten-maven-plugin</artifactId>
                    <version>1.2.7</version>
                    <executions>
                        <execution>
                            <id>flatten</id>
                            <goals>
                                <goal>flatten</goal>
                            </goals>
                            <phase>process-resources</phase>
                            <configuration>
                                <flattenMode>${flatten.mode}</flattenMode>
                                <outputDirectory>${project.build.directory}</outputDirectory>
                            </configuration>
                        </execution>
                        <execution>
                            <id>flatten.clean</id>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                            <phase>clean</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.9.1.2184</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        <stagingProfileId>d56a306692c92</stagingProfileId>
                    </configuration>
                </plugin>
                <!-- END: THIRD PARTY MAVEN PLUGINS -->

            </plugins>
        </pluginManagement>

    </build>

    <profiles>

        <!-- DEFAULT: ALWAYS ACTIVE -->
        <profile>
            <id>default</id>
            <activation>
                <file>
                    <exists>pom.xml</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-enforcer-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>flatten-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- DEVELOPMENT: TEST -->
        <profile>
            <id>dev.test</id>
            <properties>
                <enforcer.skip>true</enforcer.skip> <!-- maven-enforcer-plugin -->
            </properties>
        </profile>

        <!-- CI: BUILD -->
        <profile>
            <id>ci.build</id>
            <activation>
                <property>
                    <name>ci.build</name>
                </property>
            </activation>
        </profile>

        <!-- CI: DEPLOY -->
        <profile>
            <id>ci.deploy</id>
            <activation>
                <property>
                    <name>ci.deploy</name>
                </property>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

    <modules>
        <module>checkstyle-config</module>
        <module>jar-parent</module>
    </modules>

</project>
