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

    Copyright 2015-2017 Hewlett Packard Enterprise Development LP.

    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.github.cafapi</groupId>
    <artifactId>caf-common</artifactId>
    <version>1.9.0-197</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>A set of re-usable Java libraries which are used by the various CAF Services and Frameworks.</description>
    <url>http://cafapi.github.io/</url>

    <inceptionYear>2015</inceptionYear>

    <organization>
        <name>Hewlett Packard Enterprise Development LP</name>
        <url>http://www.hpe.com</url>
    </organization>

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

    <developers>
        <developer>
            <id>andyreidz</id>
            <name>Andy Reid</name>
            <email>andrew.reid@hpe.com</email>
        </developer>
        <developer>
            <id>arogan92</id>
            <name>Adam Rogan</name>
            <email>adam.pau.rogan@hpe.com</email>
        </developer>
        <developer>
            <id>dermot-hardy</id>
            <name>Dermot Hardy</name>
            <email>dermot.hardy@hpe.com</email>
        </developer>
        <developer>
            <id>glucy</id>
            <name>Gregory Lucy</name>
            <email>gregory.lucy@hpe.com</email>
        </developer>
        <developer>
            <id>kploch</id>
            <name>Krzysztof Ploch</name>
            <email>krzysztof.ploch@hpe.com</email>
        </developer>
        <developer>
            <id>michael-bryson</id>
            <name>Michael Bryson</name>
            <email>michael.bryson@hpe.com</email>
        </developer>
        <developer>
            <id>mulhollandc</id>
            <name>Connor Mulholland</name>
            <email>connor.mulholland@hpe.com</email>
        </developer>
        <developer>
            <id>pcrookshpe</id>
            <name>Philip Crooks</name>
            <email>philip.crooks@hpe.com</email>
        </developer>
        <developer>
            <id>trevorgetty</id>
            <name>Trevor Getty</name>
            <email>trevor.getty@hpe.com</email>
        </developer>
        <developer>
            <id>zaramckeown</id>
            <name>Zara McKeown</name>
            <email>zara.mckeown@hpe.com</email>
        </developer>
    </developers>

    <modules>
        <module>caf-api</module>
        <module>caf-utils</module>
        <module>cipher-jasypt</module>
        <module>cipher-null</module>
        <module>codec-json</module>
        <module>codec-yaml</module>
        <module>codec-json-lzf</module>
        <module>config-caf</module>
        <module>config-decoder</module>
        <module>config-file</module>
        <module>config-rest</module>
        <module>config-system</module>
        <module>container-cert-script</module>
        <module>decoder-js</module>
        <module>election-null</module>
        <module>swagger-restapi-client-base</module>
        <module>swagger-ui</module>
        <module>util-ref</module>
        <module>util-jerseycompat</module>
        <module>util-liquibase-installer</module>
        <module>util-moduleloader</module>
        <module>util-naming</module>
        <module>util-process-identifier</module>
        <module>util-testing</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/CAFapi/caf-common.git</connection>
        <developerConnection>scm:git:https://github.com/CAFapi/caf-common.git</developerConnection>
        <url>https://github.com/CAFapi/caf-common</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.failsafe.version>2.19</maven.failsafe.version>
        <maven.compiler.version>3.3</maven.compiler.version>
        <maven.resources.version>2.7</maven.resources.version>
        <docker.maven.version>0.13.6</docker.maven.version>
        <fabric8.docker.maven.version>0.20.1</fabric8.docker.maven.version>
        <tini.version>0.9.0</tini.version>
        <marathon.client.version>0.4.9</marathon.client.version>
        <skipLicenseHeadersCheck>false</skipLicenseHeadersCheck>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>args4j</groupId>
                <artifactId>args4j</artifactId>
                <version>2.33</version>
            </dependency>
            <dependency>
                <groupId>cc.roden</groupId>
                <artifactId>marathon-client</artifactId>
                <version>0.4.9</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>com.autonomy.aci.actions</groupId>
                <artifactId>autonomy-aci-actions-base</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.autonomy.aci.client</groupId>
                <artifactId>autonomy-aci-client-api</artifactId>
                <version>4.1.3</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.6.0</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-xml</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-guava</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk7</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-json-provider</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-afterburner</artifactId>
                <version>2.6.4</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi</groupId>
                <artifactId>caf-api</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi</groupId>
                <artifactId>caf-utils</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi</groupId>
                <artifactId>container-cert-script</artifactId>
                <version>1.9.0-197</version>
                <type>tar.gz</type>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi</groupId>
                <artifactId>swagger-ui</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.cipher</groupId>
                <artifactId>cipher-jasypt</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.cipher</groupId>
                <artifactId>cipher-null</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.codec</groupId>
                <artifactId>codec-json</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.codec</groupId>
                <artifactId>codec-json-lzf</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.codec</groupId>
                <artifactId>codec-yaml</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.config</groupId>
                <artifactId>config-caf</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.config</groupId>
                <artifactId>config-decoder</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.config</groupId>
                <artifactId>config-file</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.config</groupId>
                <artifactId>config-rest</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.config</groupId>
                <artifactId>config-system</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.decoder</groupId>
                <artifactId>decoder-js</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.election</groupId>
                <artifactId>election-null</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.util</groupId>
                <artifactId>util-jerseycompat</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.util</groupId>
                <artifactId>util-liquibase-installer</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.util</groupId>
                <artifactId>util-moduleloader</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.util</groupId>
                <artifactId>util-naming</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.util</groupId>
                <artifactId>util-process-identifier</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.util</groupId>
                <artifactId>util-ref</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.github.cafapi.util</groupId>
                <artifactId>util-testing</artifactId>
                <version>1.9.0-197</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.3</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>18.0</version>
            </dependency>
            <dependency>
                <groupId>com.github.krallin</groupId>
                <artifactId>tini</artifactId>
                <version>${tini.version}</version>
                <type>exe</type>
            </dependency>
            <dependency>
                <groupId>com.microsoft.sqlserver</groupId>
                <artifactId>sqljdbc4</artifactId>
                <version>4.0</version>
            </dependency>
            <dependency>
                <groupId>com.netflix.feign</groupId>
                <artifactId>feign-core</artifactId>
                <version>8.11.0</version>
            </dependency>
            <dependency>
                <groupId>com.netflix.feign</groupId>
                <artifactId>feign-gson</artifactId>
                <version>8.11.0</version>
            </dependency>
            <dependency>
                <groupId>com.ning</groupId>
                <artifactId>compress-lzf</artifactId>
                <version>1.0.3</version>
            </dependency>
            <dependency>
                <groupId>com.rabbitmq</groupId>
                <artifactId>amqp-client</artifactId>
                <version>3.5.3</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp</groupId>
                <artifactId>okhttp</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit</groupId>
                <artifactId>retrofit</artifactId>
                <version>1.9.0</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-client</artifactId>
                <version>1.19</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-core</artifactId>
                <version>1.19</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey.contribs</groupId>
                <artifactId>jersey-multipart</artifactId>
                <version>1.19</version>
            </dependency>
            <dependency>
                <groupId>com.verity</groupId>
                <artifactId>keyview-api</artifactId>
                <version>11.2.0</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.10</version>
            </dependency>
            <dependency>
                <groupId>commons-configuration</groupId>
                <artifactId>commons-configuration</artifactId>
                <version>1.10</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.4</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-core</artifactId>
                <version>0.8.4</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-testing</artifactId>
                <version>0.8.4</version>
            </dependency>
            <dependency>
                <groupId>javax.el</groupId>
                <artifactId>javax.el-api</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>1</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.5</version>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>1.1.0.Final</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.8.2</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
            <dependency>
                <groupId>net.jodah</groupId>
                <artifactId>lyra</artifactId>
                <version>0.5.3</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-dbcp2</artifactId>
                <version>2.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-io</artifactId>
                <version>1.3.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.4</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-utils</artifactId>
                <version>3.0.8</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.woodstox</groupId>
                <artifactId>woodstox-core-asl</artifactId>
                <version>4.4.1</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-common</artifactId>
                <version>2.21</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.web</groupId>
                <artifactId>el-impl</artifactId>
                <version>2.2</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>5.1.3.Final</version>
            </dependency>
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt</artifactId>
                <version>1.9.2</version>
            </dependency>
            <dependency>
                <groupId>org.jdom</groupId>
                <artifactId>jdom</artifactId>
                <version>1.1.3</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.9.5</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.10.19</version>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito</artifactId>
                <version>1.6.4</version>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>1.6.4</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.10</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>6.4</version>
            </dependency>
            <dependency>
                <groupId>org.unitils</groupId>
                <artifactId>unitils-core</artifactId>
                <version>3.4.2</version>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>1.15</version>
            </dependency>
            <dependency>
                <groupId>uk.co.jemos.podam</groupId>
                <artifactId>podam</artifactId>
                <version>6.0.2.RELEASE</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <!-- Use Java 8 for both source code and target VM -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <!-- Get the git buildnumbers -->
            <plugin>
                <groupId>ru.concerteza.buildnumber</groupId>
                <artifactId>maven-jgit-buildnumber-plugin</artifactId>
                <version>1.2.10</version>
                <executions>
                    <execution>
                        <id>git-buildnumber</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>extract-buildnumber</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Set the git.branch property to 'unknown' if it could not be retrieved -->
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>set-git-branch-if-unknown</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scripts>
                                <script><![CDATA[
                                    if (project.properties['git.branch'].allWhitespace) {
                                        project.properties.setProperty('git.branch', 'unknown');
                                    }
                                ]]></script>
                            </scripts>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>2.4.7</version>
                        <scope>runtime</scope>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Add the project and version information to the JAR Manifest -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Implementation-Title>${project.groupId}.${project.artifactId}</Implementation-Title>
                            <Implementation-Version>${git.revision}</Implementation-Version>
                            <Specification-Version>${project.version}</Specification-Version>
                            <X-Git-Branch>${git.branch}</X-Git-Branch>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <!-- Surefire Plugin Configuration -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/*IT.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <!-- Create a jar archive of the source files -->
            <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-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Generate javadocs -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Check the license headers -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <inlineHeader>
<![CDATA[
Copyright ${project.inceptionYear}-2017 ${project.organization.name}.

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.
]]>
                    </inlineHeader>
                    <excludes>
                        <exclude>LICENSE</exclude>
                        <exclude>official-build.props</exclude>
                        <exclude>docs/**</exclude>
                        <exclude>**/marathon-template-config/**</exclude>
                        <exclude>**/test-configs/**</exclude>
                        <exclude>**/test-data/**</exclude>
                        <exclude>**/test-license/**</exclude>
                    </excludes>
                    <mapping>
                        <java>PHP</java>
                    </mapping>
                    <skip>${skipLicenseHeadersCheck}</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>check-license-headers</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Use the Nexus Staging Maven Plugin for deployment -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                </configuration>
            </plugin>

            <!-- Include SonarQube Maven Plugin for project analysis -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>2.6</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- Update the license headers if required -->
        <profile>
            <id>update-licenses</id>
            <activation>
                <property>
                    <name>!RE_BUILD_TYPE</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>update-license-headers</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
                <file>
                    <exists>FileSystemActivator.txt</exists>
                </file>
            </activation>
            <properties>
                 <caf.integrationtests.fs.path>\\${docker.host.address}@${webdav.apache.port}\webdav</caf.integrationtests.fs.path>
            </properties>
        </profile>

        <profile>
            <id>linux</id>
            <activation>
                <os>
                    <family>unix</family>
                    <name>linux</name>
                </os>
                <file>
                    <exists>FileSystemActivator.txt</exists>
                </file>
            </activation>
            <properties>
                <caf.integrationtests.fs.path>/mnt/vm-${webdav.apache.port}-webdav</caf.integrationtests.fs.path>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.5.0</version>
                        <executions>
                            <execution>
                                <id>create-filestore-dir</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>/bin/bash</executable>
                                    <commandlineArgs>-c 'sudo mkdir -m 755 ${caf.integrationtests.fs.path} &amp;&amp; echo | sudo http_proxy= https_proxy= mount -t davfs http://${docker.host.address}:${webdav.apache.port}/webdav ${caf.integrationtests.fs.path} -o rw,user,noauto,uid=$USER,file_mode=600,dir_mode=700,username=" "'</commandlineArgs>
                                </configuration>
                            </execution>
                            <execution>
                                <id>remove-filestore-dir</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>/bin/bash</executable>
                                    <commandlineArgs>-c 'sudo umount ${caf.integrationtests.fs.path} ; sudo rm -rf ${caf.integrationtests.fs.path}'</commandlineArgs>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
      
        <profile>
            <id>istf</id>
            <activation>
                <property>
                    <name>RE_BUILD_TYPE</name>
                </property>
                <file>
                    <exists>istfActivator.txt</exists>
                </file>
            </activation>
            <properties>
                <istfSourceDB>${project.basedir}</istfSourceDB>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${maven.failsafe.version}</version>
                        <configuration>
                            <systemPropertyVariables>
                                <ProductName>${project.artifactId}</ProductName>
                                <BuildID>${project.artifactId}:${project.version}::${git.branch}::${git.shortRevision}::${maven.build.timestamp}</BuildID> 
                                <ProductVersion>${project.version}</ProductVersion>
                                <ProductGUID>1</ProductGUID>
                            </systemPropertyVariables>
                            <properties>
                                <property>
                                    <name>listener</name>
                                    <value>com.hpe.qa.test.framework.listeners.testng_sqlreporter</value>
                                </property>
                            </properties>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.hpe.caf</groupId>
                        <artifactId>caf-kafka-istf-maven-plugin</artifactId>
                        <version>1.1.0-2</version>
                        <executions>
                            <execution>
                                <id>istf-upload</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>upload</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>com.hpe.caf.qa.test.framework.listeners</groupId>
                    <artifactId>caf-testng-sqlreporter</artifactId>
                    <version>1.1.0</version>
                    <scope>test</scope> 
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>integration-test</id>
            <activation>
                <property>
                    <name>RE_BUILD_TYPE</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>1.9.1</version>
                        <executions>
                            <execution>
                                <id>add-integration-test-source-as-test-sources</id>
                                <phase>generate-test-sources</phase>
                                <goals>
                                    <goal>add-test-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>src/integration-test/java</source>
                                    </sources>
                                </configuration>
                            </execution>
                            <execution>
                                <id>add-integration-test-resource</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>add-test-resource</goal>
                                </goals>
                                <configuration>
                                    <resources>
                                        <resource>
                                            <directory>src/integration-test/resources</directory>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${maven.failsafe.version}</version>
                        <configuration>
                            <includes>
                                <include>**/*IT.java</include>
                            </includes>
                            <excludes>
                                <exclude>**/*Test.java</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Sign the artifacts with GnuPG -->
        <profile>
            <id>sign-artifacts</id>
            <activation>
                <property>
                    <name>RE_BUILD_TYPE</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
