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

    <parent>
        <groupId>de.skuzzle</groupId>
        <artifactId>skuzzle-parent</artifactId>
        <version>1.2.0</version>
        <relativePath>../skuzzle-parent/pom.xml</relativePath>
    </parent>

    <groupId>de.skuzzle</groupId>
    <artifactId>jeve-parent</artifactId>
    <version>3.0.0</version>
    <packaging>pom</packaging>

    <name>jeve</name>
    <description>jeve is a lightweight java 8 event delegation framework</description>

    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>http://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>

        <!-- Activate Coveralls here -->
        <coveralls.skip>false</coveralls.skip>

        <site.name>jeve</site.name>
        <github.name>jeve</github.name>

        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.jacoco.itReportPath>${project.basedir}/../target/jacoco-it.exec</sonar.jacoco.itReportPath>
    </properties>

    <scm>
        <developerConnection>scm:git:https://github.com/skuzzle/${github.name}.git</developerConnection>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>de.skuzzle</groupId>
                <artifactId>jeve</artifactId>
                <version>3.0.0</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.7</version>
                <scope>compile</scope>
            </dependency>

            <!-- Tests -->
            <dependency>
                <groupId>org.truth0</groupId>
                <artifactId>truth</artifactId>
                <version>0.15</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.google.testing.compile</groupId>
                <artifactId>compile-testing</artifactId>
                <version>0.5</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.perf4j</groupId>
                <artifactId>perf4j</artifactId>
                <version>0.9.16</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>jeve</module>
        <module>annotationTest</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.9.1</version>
                </plugin>
                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <jacocoReports>
                            <jacocoReport>${sonar.jacoco.utReportPath}</jacocoReport>
                            <jacocoReport>${sonar.jacoco.itReportPath}</jacocoReport>
                        </jacocoReports>
                    </configuration>
                </plugin>
                <!-- Mutation Coverage -->
                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>1.1.2</version>
                    <configuration>
                        <threads>4</threads>
                        <targetClasses>
                            <param>de.skuzzle.*</param>
                        </targetClasses>
                        <targetTests>
                            <param>de.skuzzle.*</param>
                        </targetTests>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>mutationCoverage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Run Integration Tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <!-- Configure jacoco for integration tests -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-code-coverage-integration-tests</id>
                        <configuration>
                            <destFile>${sonar.jacoco.itReportPath}</destFile>
                        </configuration>
                    </execution>
                        <execution>
                            <id>integration-test-report</id>
                            <goals>
                                <goal>report-integration</goal>
                            </goals>
                            <configuration>
                                <destFile>${sonar.jacoco.itReportPath}</destFile>
                            </configuration>
                        </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Enable signing and sonatype deploy -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
