<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017-Present Okta, Inc.
  ~
  ~ 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.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>com.okta</groupId>
    <artifactId>okta-aggregator</artifactId>
    <version>38</version>
    <packaging>pom</packaging>

    <name>Okta OSS Root POM</name>
    <description>Okta OSS Root POM</description>
    <url>https://github.com/okta/okta-java-parent</url>

    <organization>
        <name>Okta</name>
        <url>http://developer.okta.com/</url>
    </organization>

    <inceptionYear>2017</inceptionYear>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <root.dir>${session.executionRootDirectory}</root.dir>
        <github.slug>okta/okta-java-parent</github.slug>
    </properties>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>https://github.com/okta/okta-sdk-java/blob/master/LICENSE</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Okta</name>
            <email>developers@okta.com</email>
            <organization>Okta</organization>
            <organizationUrl>https://www.okta.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/okta/${github.slug}.git</connection>
        <developerConnection>scm:git:ssh://github.com:${github.slug}.git</developerConnection>
        <url>http://github.com/${github.slug}/tree/master</url>
        <tag>okta-aggregator-38</tag>
    </scm>

    <modules>
        <module>build-support</module>
        <module>parent</module>
        <module>doclist-plugin</module>
        <module>code-snippet-plugin</module>
    </modules>

    <build>
        <plugins>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <message>You are running an older version of Maven. This project requires at least Maven 3.3.9</message>
                                    <version>[3.3.9,)</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <pushChanges>false</pushChanges>
                        <localCheckout>true</localCheckout>
                        <preparationGoals>clean verify dependency-check:aggregate</preparationGoals>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <goals>deploy</goals>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <arguments>-Pdocs,okta-signature</arguments>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>2.1.0</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-api</artifactId>
                            <version>2.1.0</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.commons</groupId>
                            <artifactId>commons-lang3</artifactId>
                            <version>3.18.0</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>12.1.3</version>
                    <configuration>
                        <suppressionFile>${root.dir}/src/owasp/owasp-suppression.xml</suppressionFile>
                        <failBuildOnCVSS>0</failBuildOnCVSS>
                        <name>OWASP Dependency Check</name>
                        <nvdApiKey>${nvd.api.key}</nvdApiKey>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.18.0</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>io.snyk</groupId>
                    <artifactId>snyk-maven-plugin</artifactId>
                    <version>2.3.0</version>
                    <configuration>
                        <apiToken>${env.SNYK_API_TOKEN}</apiToken>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>okta-signature</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
