<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>es.sandbox.test</groupId>
    <artifactId>sandbox-test-support</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <name>Support library for testing</name>
    <description>Support utilities for testing</description>
    <url>https://github.com/jeslopalo/sandbox-test-support</url>

    <licenses>
        <license>
            <name>The MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
            <comments>It would be awesome to know that you're using it!</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>jeslopalo</id>
            <name>Jesús López</name>
            <email>jeslopalo at sandbox dot es</email>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/jeslopalo/sandbox-test-support/issues</url>
    </issueManagement>

    <distributionManagement>
        <repository>
            <id>sandbox-maven-repository</id>
            <name>Bintray sandbox-maven-repository</name>
            <url>https://api.bintray.com/maven/jeslopalo/sandbox-maven-repository/sandbox-test-support/;publish=1</url>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://github.com/jeslopalo/sandbox-test-support.git</connection>
        <developerConnection>scm:git:git@github.com:jeslopalo/sandbox-test-support.git</developerConnection>
        <url>https://github.com/jeslopalo/sandbox-test-support</url>
        <tag>HEAD</tag>
    </scm>

    <prerequisites>
        <maven>3.0.5</maven>
    </prerequisites>

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

    <dependencies>
        <dependency>
            <!-- Apache commons lang -->
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>

        <dependency>
            <!-- JodaTime API -->
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.4</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <!-- Assertj -->
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.5.2</version>
        </dependency>

        <dependency>
            <!-- Logging -->
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.21</version>
        </dependency>

        <dependency>
            <!-- Testing -->
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <includes>
                        <include>**/*Test*.java</include>
                        <include>**/*Test.java</include>
                        <include>**/*TestCase.java</include>
                        <include>**/*Spec.java</include>
                        <include>**/*Specs.java</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>coveralls</id>
            <activation>
                <property>
                    <name>coveralls</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>

                    <!-- Cobertura -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.7</version>
                        <configuration>
                            <format>xml</format>
                            <maxmem>256m</maxmem>
                            <!-- aggregated reports for multi-module projects -->
                            <aggregate>true</aggregate>
                            <check/>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.eluder.coveralls</groupId>
                        <artifactId>coveralls-maven-plugin</artifactId>
                        <version>4.2.0</version>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <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-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
