<?xml version="1.0" encoding="UTF-8"?>
<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>eu.stamp-project</groupId>
    <artifactId>botsing</artifactId>
    <version>1.0.1</version>
    <packaging>pom</packaging>

    <name>Botsing</name>
    <description>Botsing is a Java framework for crash reproduction using evolutionary algorithms.</description>
    <url>https://www.stamp-project.eu/</url>
    <inceptionYear>2017</inceptionYear>

    <organization>
        <name>Delft University of Technology</name>
        <url>https://www.tudelft.nl</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License v2.0</name>
            <url>https://spdx.org/licenses/Apache-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Pouria Derakhshanfar</name>
        </developer>
        <developer>
            <name>Annibale Panichella</name>
        </developer>
        <developer>
            <name>Xavier Devroey</name>
            <url>https://www.xdevroey.be/</url>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/STAMP-project/botsing/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com:STAMP-project/botsing.git</connection>
        <developerConnection>scm:git:git@github.com:STAMP-project/botsing.git</developerConnection>
        <url>https://github.com/STAMP-project/botsing</url>
        <tag>botsing-1.0.1</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <license.licenseName>apache_v2</license.licenseName>
        <!-- Dependencies versions -->
        <!-- To ensure a proper management of dependencies, all versions have to be declared here -->
        <build-helper-maven-plugin.version>1.12</build-helper-maven-plugin.version>
        <commons-cli.version>1.4</commons-cli.version>
        <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
        <evosuite-client.version>1.0.6</evosuite-client.version>
        <hamcrest.version>2.0.0.0</hamcrest.version>
        <jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
        <junit.version>4.12</junit.version>
        <license-maven-plugin.version>1.16</license-maven-plugin.version>
        <maven-aether-provider.version>3.3.9</maven-aether-provider.version>
        <maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
        <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
        <maven-compat.version>3.5.4</maven-compat.version>
        <maven-core.version>3.5.4</maven-core.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
        <maven-model.version>3.5.4</maven-model.version>
        <maven-plugin-annotations.version>3.5.2</maven-plugin-annotations.version>
        <maven-plugin-api.version>3.5.4</maven-plugin-api.version>
        <maven-plugin-testing-harness.version>3.3.0</maven-plugin-testing-harness.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-source-plugin.version>2.4</maven-source-plugin.version>
        <mockito.version>2.23.0</mockito.version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <slf4j.version>1.7.25</slf4j.version>
        <wagon-ssh.version>2.12</wagon-ssh.version>
    </properties>

    <profiles>
        <profile>
            <!-- Define a profile for releases of the application -->
            <!-- mvn release:prepare release:perform -P release -DskipTests=true -->
            <id>release</id>
            <build>
                <plugins>
                    <!-- Add licenses to source code and project -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>${license-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>update-file-header</id>
                                <goals>
                                    <goal>update-file-header</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>download-licenses</id>
                                <goals>
                                    <goal>download-licenses</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>update-project-license</id>
                                <goals>
                                    <goal>update-project-license</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Create source code jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Create javadoc jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Sign files -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.wagon</groupId>
                                <artifactId>wagon-ssh</artifactId>
                                <version>${wagon-ssh.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven-release-plugin.version}</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <build>
        <plugins>
            <!-- Check code style -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <failOnViolation>true</failOnViolation>
                    <sourceDirectories>
                        <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                        <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
                    </sourceDirectories>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Compute test code coverage -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
                <!--<configuration>
                    <excludes>
                        <exclude>**/eu/stamp_project/dspot/amplifier/ObjectGenerator.*</exclude>
                    </excludes>
                </configuration>-->
            </plugin>
            <!-- Report code coverage trough coveralls -->
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>${coveralls-maven-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>botsing-examples</module>
        <module>botsing-reproduction</module>
        <module>botsing-maven</module>
        <module>botsing-preprocessing</module>
    </modules>

</project>
