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

    The MIT License (MIT)

    Copyright (C) 2013-2016 tarent solutions GmbH

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

-->
<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>org.osiam</groupId>
    <artifactId>connector4java</artifactId>
    <version>1.9</version>

    <name>OSIAM Connector 4 Java</name>
    <description>Native Java API to connect to the REST based OSIAM services</description>
    <url>https://github.com/osiam/connector4java</url>
    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>http://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>OSIAM Team</name>
            <email>info@osiam.org</email>
            <timezone>+1</timezone>
            <organization>tarent solutions GmbH</organization>
            <organizationUrl>http://www.tarent.de</organizationUrl>
        </developer>
    </developers>

    <prerequisites>
        <maven>3.0.4</maven>
    </prerequisites>

    <scm>
        <connection>scm:git://git@github.com/osiam/connector4java.git</connection>
        <url>https://github.com/osiam/connector4java</url>
        <developerConnection>scm:git:ssh://git@github.com/osiam/connector4java.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.7</java.version>

        <sonar.core.codeCoveragePlugin>cobertura</sonar.core.codeCoveragePlugin>
        <!-- force sonar to reuse reports generated during build cycle -->
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <mockserver.version>3.10.4</mockserver.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.4</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.jersey.connectors</groupId>
            <artifactId>jersey-apache-connector</artifactId>
            <version>2.23.1</version>
        </dependency>

        <!-- JSON -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.8.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
            <version>1.12</version>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>19.0</version>
        </dependency>

        <!-- Spock testing framework for all kinds of tests LICENSE: Apache 2.0 according to http://code.google.com/p/spock/ -->
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>1.0-groovy-2.4</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>3.2.4</version>
            <scope>test</scope>
        </dependency>

        <!-- Testing JSON -->
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>json-path</artifactId>
            <version>2.9.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>nl.jqno.equalsverifier</groupId>
            <artifactId>equalsverifier</artifactId>
            <version>1.7.8</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-matchers</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mock-server</groupId>
            <artifactId>mockserver-netty</artifactId>
            <version>${mockserver.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mock-server</groupId>
            <artifactId>mockserver-core</artifactId>
            <version>${mockserver.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mock-server</groupId>
            <artifactId>mockserver-client-java</artifactId>
            <version>${mockserver.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.0.4</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <header>LICENSE</header>
                    <excludes>
                        <exclude>LICENSE</exclude>
                        <exclude>circle.yml</exclude>
                        <exclude>jpmInstall.sh</exclude>
                        <exclude>**/*.md</exclude>
                        <exclude>settings.xml</exclude>
                        <exclude>src/main/shade/**</exclude>
                        <exclude>src/test/resources/org/osiam/resources/data/noPicture.txt</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <extensions>true</extensions>
                <configuration>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <verbose>false</verbose>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-batch</artifactId>
                        <version>2.4.3-01</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.9.2-01</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <parallel>classes</parallel>
                    <threadCount>3</threadCount>
                    <argLine>${argLine} -XX:-UseSplitVerifier</argLine>
                    <includes>
                        <include>**/*Test.*</include>
                        <include>**/*Spec.*</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.11</version>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/src/test/groovy</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.7.201606060606</version>
                <configuration>
                    <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
                    <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
                    <outputDirectory>${project.build.directory}/coverage-reports/jacoco/</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>pre-unit-tests</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-tests</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.2.0</version>
                <configuration>
                    <jacocoReports>
                        <entry>${project.build.directory}/coverage-reports/jacoco/jacoco.xml</entry>
                    </jacocoReports>
                </configuration>
            </plugin>

            <plugin>
                <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>

            <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>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <file>${project.build.directory}/${project.build.finalName}.jar</file>
                    <pomFile>pom.xml</pomFile>
                    <classifiers>javadoc,sources</classifiers>
                    <types>jar,jar</types>
                    <files>${project.build.directory}/${project.build.finalName}-javadoc.jar,${project.build.directory}/${project.build.finalName}-sources.jar</files>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                                    <resources>
                                        <resource>
                                            META-INF/services/org.glassfish.hk2.extension.ServiceLocatorGenerator
                                        </resource>
                                        <resource>
                                            META-INF/services/com.fasterxml.jackson.core.JsonFactory
                                        </resource>
                                        <resource>
                                            META-INF/services/com.fasterxml.jackson.core.ObjectCodec
                                        </resource>
                                    </resources>
                                </transformer>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                                    <resource>
                                        META-INF/services/org.osiam.bundled.org.glassfish.hk2.extension.ServiceLocatorGenerator
                                    </resource>
                                    <file>
                                        ${project.basedir}/src/main/shade/org.osiam.bundled.org.glassfish.hk2.extension.ServiceLocatorGenerator
                                    </file>
                                </transformer>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                                    <resource>
                                        META-INF/services/org.osiam.bundled.com.fasterxml.jackson.core.JsonFactory
                                    </resource>
                                    <file>
                                        ${project.basedir}/src/main/shade/org.osiam.bundled.com.fasterxml.jackson.core.JsonFactory
                                    </file>
                                </transformer>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                                    <resource>
                                        META-INF/services/org.osiam.bundled.com.fasterxml.jackson.core.ObjectCodec
                                    </resource>
                                    <file>
                                        ${project.basedir}/src/main/shade/org.osiam.bundled.com.fasterxml.jackson.core.ObjectCodec
                                    </file>
                                </transformer>
                            </transformers>
                            <artifactSet>
                                <includes>
                                    <include>org.glassfish.jersey.connectors</include>
                                    <include>org.glassfish.jersey.core</include>
                                    <include>org.glassfish.jersey.bundles.repackaged</include>
                                    <include>org.glassfish.hk2.external</include>
                                    <include>org.glassfish.hk2</include>
                                    <include>org.apache.httpcomponents</include>
                                    <include>commons-logging</include>
                                    <include>commons-codec</include>
                                    <include>commons-io</include>
                                    <include>joda-time</include>
                                    <include>javax.annotation</include>
                                    <include>javax.ws.rs</include>
                                    <include>org.javassist</include>
                                    <include>org.apache.tika</include>
                                    <include>com.fasterxml.jackson.core</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>org.glassfish.jersey</pattern>
                                    <shadedPattern>org.osiam.bundled.org.glassfish.jersey</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>jersey.repackaged</pattern>
                                    <shadedPattern>org.osiam.bundled.jersey.repackaged</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.aopalliance</pattern>
                                    <shadedPattern>org.osiam.bundled.org.aopalliance</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>javax.inject</pattern>
                                    <shadedPattern>org.osiam.bundled.javax.inject</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.glassfish.hk2</pattern>
                                    <shadedPattern>org.osiam.bundled.org.glassfish.hk2</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.jvnet.hk2</pattern>
                                    <shadedPattern>org.osiam.bundled.org.jvnet.hk2</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.jvnet.tiger_types</pattern>
                                    <shadedPattern>org.osiam.bundled.org.jvnet.tiger_types</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.apache.http</pattern>
                                    <shadedPattern>org.osiam.bundled.org.apache.http</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.apache.commons.codec</pattern>
                                    <shadedPattern>org.osiam.bundled.org.apache.commons.codec</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.apache.commons.io</pattern>
                                    <shadedPattern>org.osiam.bundled.org.apache.commons.io</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.apache.commons.logging</pattern>
                                    <shadedPattern>org.osiam.bundled.org.apache.commons.logging</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.joda.time</pattern>
                                    <shadedPattern>org.osiam.bundled.org.joda.time</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>javax.annotation</pattern>
                                    <shadedPattern>org.osiam.bundled.javax.annotation</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>javax.ws.rs</pattern>
                                    <shadedPattern>org.osiam.bundled.javax.ws.rs</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>javassist</pattern>
                                    <shadedPattern>org.osiam.bundled.javassist</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.apache.tika</pattern>
                                    <shadedPattern>org.osiam.bundled.org.apache.tika</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.fasterxml.jackson</pattern>
                                    <shadedPattern>org.osiam.bundled.com.fasterxml.jackson</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
