<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.trustedanalytics</groupId>
    <artifactId>project-template</artifactId>
    <packaging>pom</packaging>
    <version>0.4.3</version>
    <name>Parent POM</name>
    <description>Project template</description>
    <url>http://trustedanalytics.org/</url>

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

    <developers>
        <developer>
            <id>TAP-developers</id>
            <name>TAP</name>
            <email>trustedanalytics@gmail.com</email>
            <organization>Trusted Analytics Platform</organization>
            <organizationUrl>http://trustedanalytics.github.io</organizationUrl>
        </developer>
    </developers>

    <properties>
        <repository.snapshot.id>snapshots</repository.snapshot.id>
        <repository.snapshot.name>SnapshotRepository</repository.snapshot.name>
        <repository.snapshot.url>file:///${user.home}/.m2/snapshots</repository.snapshot.url>

        <repository.release.id>releases</repository.release.id>
        <repository.release.name>ReleaseRepository</repository.release.name>
        <repository.release.url>file:///${user.home}/.m2/releases</repository.release.url>
        <hadoop.version>2.6.0-cdh5.4.2.1</hadoop.version>

        <git-repository>trustedanalytics-cloud-parent-placeholder</git-repository>

        <skip-jacoco>false</skip-jacoco>
        <skip-jacoco-check>false</skip-jacoco-check>
        <jacoco-measurement-instructions>0</jacoco-measurement-instructions>
        <jacoco-measurement-branches>0</jacoco-measurement-branches>
        <jacoco-measurement-lines>0</jacoco-measurement-lines>
        <jacoco-measurement-classes>0</jacoco-measurement-classes>
    </properties>

    <scm>
        <connection>scm:git:git@${artifactId}:${git-repository}</connection>
        <url>https://github.com/intel-data/project-template</url>
        <tag>HEAD</tag>
    </scm>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <header>license/license_header.txt</header>
                        <includes>
                            <include>src/**/*.java</include>
                            <include>src/**/*.html</include>
                            <include>tools/*.sh</include>
                            <include>license/*.sh</include>
                            <include>license_checker/*.sh</include>
                        </includes>
                        <mapping>
                            <java>JAVADOC_STYLE</java>
                            <sh>SCRIPT_STYLE</sh>
                            <html>XML_STYLE</html>
                        </mapping>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-license</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.4.201502262128</version>
                    <configuration>
                        <skip>${skip-jacoco}</skip>
                        <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
                        <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
                    </configuration>
                    <executions>
                        <execution>
                            <id>jacoco-initialize</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>jacoco-site</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>jacoco-check</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <skip>${skip-jacoco-check}</skip>
                                <rules>
                                    <rule>
                                        <element>BUNDLE</element>
                                        <limits>
                                            <limit>
                                                <counter>INSTRUCTION</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${jacoco-measurement-instructions}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>BRANCH</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${jacoco-measurement-branches}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>LINE</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${jacoco-measurement-lines}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>CLASS</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${jacoco-measurement-classes}</minimum>
                                            </limit>
                                        </limits>
                                    </rule>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>${repository.snapshot.id}</id>
            <name>${repository.snapshot.name}</name>
            <url>${repository.snapshot.url}</url>
        </snapshotRepository>

        <repository>
            <id>${repository.release.id}</id>
            <name>${repository.release.name}</name>
            <url>${repository.release.url}</url>
        </repository>
    </distributionManagement>

</project>
