<?xml version="1.0" encoding="UTF-8"?>
<!--

    © Copyright 2016-2021 Micro Focus or one of its affiliates.
    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>
    <groupId>com.microfocus.adm.almoctane.sdk</groupId>
    <artifactId>sdk-root</artifactId>
    <packaging>pom</packaging>
    <version>15.1.60</version>

    <name>ALM Octane REST API SDK</name>
    <description>The Java SDK that can be used to access Octane's REST API without worrying about REST or HTTP
    </description>
    <url>https://github.com/MicroFocus/ALMOctaneJavaRESTSDK</url>

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

    <scm>
        <url>https://github.com/MicroFocus/ALMOctaneJavaRESTSDK</url>
        <connection>scm:git:https://github.com/MicroFocus/ALMOctaneJavaRESTSDK.git</connection>
        <developerConnection>scm:git:ssh://github.com:MicroFocus/ALMOctaneJavaRESTSDK.git</developerConnection>
    </scm>

    <organization>
        <name>Micro Focus</name>
        <url>http://www.microfocus.com</url>
    </organization>

    <developers>
        <developer>
            <name>Spencer Bruce</name>
            <email>spencerbruce@microfocus.com</email>
            <organization>Micro Focus</organization>
        </developer>
    </developers>

    <modules>
        <module>sdk-src</module>
        <module>sdk-integration-tests</module>
        <module>sdk-usage-examples</module>
        <module>sdk-generate-entity-models-maven-plugin</module>
        <module>sdk-extension</module>
    </modules>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <java.version>1.8</java.version>

        <slf4j.version>1.7.25</slf4j.version>
        <logback.version>1.1.3</logback.version>

        <google-api-client.version>1.30.2</google-api-client.version>
        <org-json.version>20160212</org-json.version>

        <commons-configuration.version>2.0</commons-configuration.version>
        <commons-beanutils.version>1.9.4</commons-beanutils.version>
        <commons-io.version>2.6</commons-io.version>

        <maven-release.version>2.5.3</maven-release.version>
        <maven-surefire.version>2.19.1</maven-surefire.version>
        <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <maven-compiler.version>3.5.1</maven-compiler.version>
        <maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
        <maven-plugin-api.version>3.6.0</maven-plugin-api.version>
        <maven-plugin-annotations.version>3.6.0</maven-plugin-annotations.version>
        <nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>

        <org.javassist.version>3.20.0-GA</org.javassist.version>
        <org.apache.velocity.version>1.7</org.apache.velocity.version>

        <junit.version>4.13.1</junit.version>
        <powermock.version>1.6.1</powermock.version>
        <mockito.version>1.9.5</mockito.version>
        <cobertura.version>2.7</cobertura.version>
    </properties>

    <dependencies>
        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.cloud</groupId>
                <artifactId>libraries-bom</artifactId>
                <version>16.3.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>${org-json.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-configuration2</artifactId>
                <version>${commons-configuration.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>${commons-beanutils.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.javassist</groupId>
                        <artifactId>javassist</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>${org.javassist.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <!-- License headers are checked during the verify phase, the build will fail if a file is missing the header. -->
        <!-- To fix license errors, use the following commands on the root pom. -->
        <!-- mvn com.mycila:license-maven-plugin:format (add headers if missing) -->
        <!-- mvn com.mycila:license-maven-plugin:remove (remove existing header) -->
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <!-- Update this file accordingly to change the license everywhere -->
                    <header>LICENSE.txt</header>
                    <excludes>
                        <exclude>README.MD</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>.LICENSE.txt</exclude>
                        <exclude>**/**.html</exclude>
                        <exclude>**/**.vm</exclude>
                        <exclude>**/**.properties</exclude>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>***/src/main/resources/**</exclude>
                        <!-- Taken from third-party -->
                        <exclude>**/SLF4JLogChute.java</exclude>
                        <exclude>**/**.versionBackup</exclude>
                        <exclude>**/**.log</exclude>
                    </excludes>
                    <mapping>
                        <!--Do not use javadoc comments for .java files, use only /* -->
                        <!--Not sure why that's the default.-->
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler.version}</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>coverage</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>cobertura-maven-plugin</artifactId>
                            <version>${cobertura.version}</version>
                            <configuration>
                                <formats>
                                    <format>xml</format>
                                </formats>
                            </configuration>
                            <executions>
                                <execution>
                                    <goals>
                                        <goal>clean</goal>
                                        <goal>check</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>build-deployment</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>${maven-javadoc-plugin.version}</version>
                            <executions>
                                <execution>
                                    <id>attach-javadocs</id>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-source-plugin</artifactId>
                            <version>${maven-source-plugin.version}</version>
                            <executions>
                                <execution>
                                    <id>attach-sources</id>
                                    <goals>
                                        <goal>jar</goal>
                                        <goal>test-jar</goal>
                                    </goals>
                                </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>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>release-repository</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <distributionManagement>
        <repository>
            <id>release-repository</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>snapshot-repository</id>
            <name>Maven2 Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>
</project>

