<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013-2019 the original author or authors.
  ~
  ~ 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>io.pivotal</groupId>
    <artifactId>pivotal-cloudfoundry-java-client</artifactId>
    <name>Pivotal Cloud Foundry Java Client Parent</name>
    <description>A Java language binding for interacting with a Cloud Foundry instance</description>
    <version>2.2.0.RELEASE</version>
    <packaging>pom</packaging>
    <url>https://github.com/cloudfoundry/cf-java-client</url>

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

    <developers>
        <developer>
            <name>VMware</name>
            <organization>VMware, Inc.</organization>
            <organizationUrl>https://github.com/pivotal-cf/pcf-java-client</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/pivotal-cf/pcf-java-client</url>
    </scm>

    <modules>
        <module>pivotal-cloudfoundry-client</module>
        <module>pivotal-cloudfoundry-client-reactor</module>
    </modules>

    <properties>
        <cf-java-client.version>4.7.0.RELEASE</cf-java-client.version>
        <dependencies.version>2.2.7.RELEASE</dependencies.version>
        <immutables.version>2.8.8</immutables.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.cloudfoundry</groupId>
                <artifactId>cloudfoundry-client</artifactId>
                <version>${cf-java-client.version}</version>
            </dependency>
            <dependency>
                <groupId>org.cloudfoundry</groupId>
                <artifactId>cloudfoundry-client-reactor</artifactId>
                <version>${cf-java-client.version}</version>
            </dependency>
            <dependency>
                <groupId>org.cloudfoundry</groupId>
                <artifactId>cloudfoundry-operations</artifactId>
                <version>${cf-java-client.version}</version>
            </dependency>
            <dependency>
                <groupId>org.immutables</groupId>
                <artifactId>value</artifactId>
                <version>${immutables.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-Werror</arg>
                            <arg>-Xlint:all</arg>
                            <arg>-Xlint:-options</arg>
                            <arg>-Xlint:-processing</arg>
                            <arg>-Xlint:-serial</arg>
                        </compilerArgs>
                        <showWarnings>true</showWarnings>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                    <configuration>
                        <links>
                            <link>https://projectreactor.io/docs/core/release/api/</link>
                            <link>https://javadoc.io/doc/org.cloudfoundry/cloudfoundry-client-reactor</link>
                        </links>
                        <quiet>true</quiet>
                    </configuration>
                    <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>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20</version>
                    <configuration>
                        <runOrder>random</runOrder>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!--<plugin>
                <groupId>org.jfrog.buildinfo</groupId>
                <artifactId>artifactory-maven-plugin</artifactId>
                <version>2.7.0</version>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>build-info</id>
                        <goals>
                            <goal>publish</goal>
                        </goals>
                        <configuration>
                            <publisher>
                                <contextUrl>https://repo.spring.io</contextUrl>
                                <username>{{ARTIFACTORY_USERNAME}}</username>
                                <password>{{ARTIFACTORY_PASSWORD}}</password>
                                <repoKey>{{ARTIFACTORY_REPO_KEY|"libs-release-local"}}</repoKey>
                                <snapshotRepoKey>{{ARTIFACTORY_SNAPSHOT_REPO_KEY|"libs-snapshot-local"}}</snapshotRepoKey>
                                <excludePatterns>*-tests.jar</excludePatterns>
                            </publisher>
                        </configuration>
                    </execution>
                </executions>
            </plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>integration-test</id>

            <modules>
                <module>integration-test</module>
            </modules>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
