<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2015 James Bacon
  ~
  ~ 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>uk.co.baconi.secure</groupId>
    <artifactId>platform</artifactId>
    <version>0.0.1</version>
    <packaging>pom</packaging>

    <modules>
        <module>base</module>
        <module>api</module>
    </modules>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Its like 'saving ones bacon' only its more secure.</description>
    <url>https://github.com/beercan1989/secure-my-bacon</url>

    <parent>
        <groupId>uk.co.baconi</groupId>
        <artifactId>baconi-parent</artifactId>
        <version>0.0.3</version>
    </parent>

    <scm>
        <connection>scm:git:git@github.com:beercan1989/secure-my-bacon.git</connection>
        <developerConnection>scm:git:git@github.com:beercan1989/secure-my-bacon.git</developerConnection>
        <url>git@github.com:beercan1989/secure-my-bacon.git</url>
        <tag>0.0.1</tag>
    </scm>

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

    <developers>
        <developer>
            <id>beercan1989</id>
            <name>James Bacon</name>
            <email>james@baconi.co.uk</email>
            <url>https://github.com/beercan1989</url>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <spring.boot.version>1.3.2.RELEASE</spring.boot.version>
        <spring.data.neo4j.version>4.0.0.RELEASE</spring.data.neo4j.version>

        <!-- GPG Configuration -->
        <root-path>.</root-path>
        <gpg.homedir>${root-path}/ci/gpg</gpg.homedir>
        <gpg.executable>gpg</gpg.executable>
    </properties>

    <build>
        <finalName>${project.artifactId}</finalName>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring.boot.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.10</version>

                    <executions>
                        <execution>
                            <id>add-integration-sources</id>
                            <phase>generate-test-sources</phase>
                            <goals>
                                <goal>add-test-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>src/integration/java</source>
                                </sources>
                            </configuration>
                        </execution>

                        <execution>
                            <id>add-integration-resources</id>
                            <phase>generate-test-resources</phase>
                            <goals>
                                <goal>add-test-resource</goal>
                            </goals>
                            <configuration>
                                <resources>
                                    <resource>
                                        <directory>src/integration/resources</directory>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>4.1.0</version>

                    <configuration>
                        <repoToken>${env.COVERALLS_TOKEN}</repoToken>
                        <jacocoReports>
                            <jacocoReport>${project.reporting.outputDirectory}/jacoco/jacoco.xml</jacocoReport>
                            <jacocoReport>${project.reporting.outputDirectory}/jacoco-it/jacoco.xml</jacocoReport>
                        </jacocoReports>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.19</version>

                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>verify</id>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.5.201505241946</version>

                <executions>
                    <execution>
                        <id>prepare-unit-test-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generate-unit-test-report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>prepare-integration-test-agent</id>
                        <goals>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generate-integration-test-report</id>
                        <goals>
                            <goal>report-integration</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>