<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you 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>org.tomitribe</groupId>
    <artifactId>beryllium</artifactId>
    <packaging>jar</packaging>
    <version>0.2.12</version>

    <parent>
        <groupId>com.github.cchacin</groupId>
        <artifactId>basepom</artifactId>
        <version>0.1.8</version>
    </parent>

    <name>Beryllium</name>
    <description>Functional testing for REST API, Database setup, external service mocks and redis setup/assertions.
    </description>
    <inceptionYear>2014</inceptionYear>
    <url>https://github.com/tomitribe/beryllium</url>

    <scm>
        <url>scm:git:git@github.com:tomitribe/beryllium.git</url>
        <connection>scm:git:git@github.com:tomitribe/beryllium.git</connection>
        <developerConnection>scm:git:git@github.com:tomitribe/beryllium.git</developerConnection>
        <tag>v0.2.12</tag>
    </scm>

    <properties>
        <maven.compiler.target>1.7</maven.compiler.target>
        <maven.compiler.source>1.7</maven.compiler.source>
        <!-- Version strings -->
        <cukespace.version>1.6.1</cukespace.version>
        <cucumber.version>1.2.4</cucumber.version>
        <tomee.version>1.7.2</tomee.version>
        <junit.version>4.12</junit.version>
        <assertj.version>2.0.0</assertj.version>
        <truth.version>0.27</truth.version>
        <javaee.version>6.0-6</javaee.version>
        <dbsetup.version>1.6.0</dbsetup.version>
        <jsonunit.version>1.6.1</jsonunit.version>
        <lombok.version>1.16.6</lombok.version>
        <restassured.version>2.6.0</restassured.version>
        <jedis.version>2.7.3</jedis.version>
        <restito.version>0.7</restito.version>
        <jsonpath.version>2.0.0</jsonpath.version>
    </properties>

    <repositories>
        <repository>
            <id>repo.bodar.com</id>
            <url>http://repo.bodar.com</url>
        </repository>
    </repositories>

    <dependencies>

        <!-- Java EE 6 -->
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>javaee-api</artifactId>
            <version>${javaee.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Database -->
        <dependency>
            <groupId>com.ninja-squad</groupId>
            <artifactId>DbSetup</artifactId>
            <version>${dbsetup.version}</version>
        </dependency>

        <!-- JUnit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
        </dependency>

        <!-- Google Truth -->
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <version>${truth.version}</version>
        </dependency>

        <!-- Cucumber -->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber.version}</version>
        </dependency>

        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-core</artifactId>
            <version>${cucumber.version}</version>
        </dependency>

        <!-- CukeSpace -->
        <dependency>
            <groupId>com.github.cukespace</groupId>
            <artifactId>cukespace-core</artifactId>
            <version>${cukespace.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Arquillian TomEE -->
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>arquillian-tomee-embedded</artifactId>
            <version>${tomee.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>tomee-jaxrs</artifactId>
            <version>${tomee.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- RestAssured -->
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>${restassured.version}</version>
        </dependency>

        <!-- JSON -->
        <dependency>
            <groupId>net.javacrumbs.json-unit</groupId>
            <artifactId>json-unit-fluent</artifactId>
            <version>${jsonunit.version}</version>
        </dependency>

        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>${jsonpath.version}</version>
        </dependency>

        <!-- Findbugs -->
        <dependency>
            <groupId>net.sourceforge.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <version>1.3.2</version>
            <scope>provided</scope>
        </dependency>

        <!-- Jedis -->
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>${jedis.version}</version>
        </dependency>

        <!-- Lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.37</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.3.0</version>
        </dependency>

        <dependency>
            <groupId>com.xebialabs.restito</groupId>
            <artifactId>restito</artifactId>
            <version>${restito.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>junit</artifactId>
                    <groupId>junit</groupId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <basedir>${basedir}</basedir>
                    <header>${basedir}/header.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>false</aggregate>
                    <includes>
                        <include>src/**/*</include>
                        <include>src/test/resources/*.feature</include>
                    </includes>
                    <excludes>
                        <exclude>**/README</exclude>
                    </excludes>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <mapping>
                        <java>JAVADOC_STYLE</java>
                    </mapping>
                    <strictCheck>true</strictCheck>
                    <useDefaultMapping>true</useDefaultMapping>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Cobertura -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <check>true</check>
                    <format>xml</format>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <version>0.11</version>
                <configuration>
                    <includes>
                        <include>src/**/*</include>
                        <include>pom.xml</include>
                    </includes>
                    <excludes>
                        <exclude>**/*/MANIFEST.MF</exclude>
                        <exclude>.git</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>derby.log</exclude>
                        <exclude>**/META-INF/services/*</exclude>
                        <exclude>**/bootstrap-*</exclude>
                        <exclude>**/js/jquery-*</exclude>
                        <exclude>**/*.json</exclude>
                        <exclude>src/test/resources/**/*.csv</exclude>
                        <exclude>src/test/resources/**/*.txt</exclude>
                        <exclude>src/test/resources/**/*.text</exclude>
                        <exclude>src/test/resources/**/*.feature</exclude>
                        <exclude>**/src/main/resources/archetype-resources/**/*</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- Travis CI -->
        <profile>
            <id>travis</id>

            <activation>
                <property>
                    <name>env.TRAVIS</name>
                    <value>true</value>
                </property>
            </activation>

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