<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sap.cloud.instancemanager</groupId>
    <artifactId>client</artifactId>
    <packaging>jar</packaging>
    <version>3.14.1</version>
    <name>service-manager-client</name>
    <description>Client Library for Instance Manager</description>
    <url>http://www.sap.com</url>
    <!--   scm.url is needed for maven central release -->
    <scm>
        <connection />
        <url />
        <developerConnection />
    </scm>
    <developers>
        <developer>
            <name>SAP SE</name>
            <organization>SAP SE</organization>
            <organizationUrl>http://www.sap.com</organizationUrl>
            <email />
        </developer>
    </developers>
    <licenses>
        <license>
            <name>SAP DEVELOPER LICENSE AGREEMENT</name>
            <url>https://tools.hana.ondemand.com/developer-license-3_1.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <properties>
        <java.version>1.8</java.version>
        <artifactory.host>int.repositories.cloud.sap</artifactory.host>
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
        <build.timestamp>${maven.build.timestamp}</build.timestamp>
        <surefireArgLine>-Xms4096m -Xmx4096m</surefireArgLine>
        <argLine>${surefireArgLine} -Xverify:none</argLine>
        <surefire.useSystemClassLoader>false</surefire.useSystemClassLoader>
        <jacocoInclude>**</jacocoInclude>
        <minimumLineCoverage>80</minimumLineCoverage>
        <jacocoVersion>0.8.8</jacocoVersion>
        <skip.surefire.tests>false</skip.surefire.tests>
    </properties>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>4.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>5.0.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.14</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>fluent-hc</artifactId>
            <version>4.5.14</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.15</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>2.0.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.javacrumbs.json-unit</groupId>
            <artifactId>json-unit-fluent</artifactId>
            <version>2.36.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sap.cloud.security.xsuaa</groupId>
            <artifactId>token-client</artifactId>
            <version>2.17.0</version>
        </dependency>
        <dependency>
            <groupId>net.javacrumbs.json-unit</groupId>
            <artifactId>json-unit</artifactId>
            <version>2.36.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sap.cloud.security</groupId>
            <artifactId>java-security</artifactId>
            <version>2.17.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.10</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.3.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sap.hcp.cf.logging</groupId>
            <artifactId>cf-java-logging-support-logback</artifactId>
            <version>3.6.3</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
                <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <configuration>
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <excludePackageNames>*.impl.*</excludePackageNames>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M7</version>
                <configuration>
                    <skipTests>${skip.surefire.tests}</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>templating-maven-plugin</artifactId>
                <version>1.0.0</version>
                <executions>
                    <execution>
                        <id>filtering-java-templates</id>
                        <goals>
                            <goal>filter-sources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.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-failsafe-plugin</artifactId>
                <version>3.0.0-M7</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>empty-javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>javadoc</classifier>
                            <forceCreation>true</forceCreation>
                            <includes>
                                <include>README</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- https://github.wdf.sap.corp/pages/xmake-ci/User-Guide/Setting_up_a_Build/Quality_Metrics/Jacoco/Jacoco/ -->
        <profile>
            <id>xmake-jacoco</id>
            <activation>
                <property>
                    <name>ldi.parent.jacoco-coverage</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <version>3.0.0-M7</version>
                            <dependencies>
                                <dependency>
                                    <groupId>org.apache.maven.surefire</groupId>
                                    <artifactId>surefire-junit47</artifactId>
                                    <version>3.0.0-M7</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacocoVersion}</version>
                        <executions>
                            <execution>
                                <id>default-instrument</id>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-restore-instrumented-classes</id>
                                <goals>
                                    <goal>restore-instrumented-classes</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.jacoco</groupId>
                    <artifactId>org.jacoco.agent</artifactId>
                    <version>${jacocoVersion}</version>
                    <classifier>runtime</classifier>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>codeCoverage</id>
            <properties>
                <maven.test.skip>false</maven.test.skip>
                <sonar.junit.reportPaths>${project.basedir}/target/site/cobertura/coverage.xml</sonar.junit.reportPaths>
                <surefire.runOrder>alphabetical</surefire.runOrder>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacocoVersion}</version>
                        <executions>
                            <execution>
                                <id>default-instrument</id>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-restore-instrumented-classes</id>
                                <goals>
                                    <goal>restore-instrumented-classes</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.jacoco</groupId>
                    <artifactId>org.jacoco.agent</artifactId>
                    <version>${jacocoVersion}</version>
                    <classifier>runtime</classifier>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jacocoCheck</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacocoVersion}</version>
                        <configuration>
                            <excludes>
                                <exclude>**/*Enum.*</exclude>
                                <exclude>**/*Enums.*</exclude>
                                <exclude>**/*Dto*.*</exclude>
                                <exclude>**/*DTO*.*</exclude>
                                <exclude>**/*Exception.*</exclude>
                                <exclude>**/*Constants.*</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>jacoco-check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <includes>
                                        <include>${jacocoInclude}</include>
                                    </includes>
                                    <rules>
                                        <rule>
                                            <element>CLASS</element>
                                            <limits>
                                                <limit>
                                                    <counter>LINE</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>${minimumLineCoverage}%</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.jacoco</groupId>
                    <artifactId>org.jacoco.agent</artifactId>
                    <version>${jacocoVersion}</version>
                    <classifier>runtime</classifier>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <distributionManagement>
        <!-- XMake: Artifactory Milestones Repository -->
        <repository>
            <id>artifactory</id>
            <name>deploy milestones</name>
            <url>https://${artifactory.host}/artifactory/deploy-milestones</url>
            <layout>default</layout>
        </repository>
        <snapshotRepository>
            <id>artifactory</id>
            <name>Snapshots</name>
            <url>https://${artifactory.host}/artifactory/deploy-snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>
</project>
