<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2014 TU Berlin (peel@dima.tu-berlin.de)

    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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.peelframework</groupId>
    <artifactId>peel-parent</artifactId>
    <version>1.1.3</version>
    <packaging>pom</packaging>

    <name>peel</name>
    <description>Peel is a framework for automatic large-scale experiments for massively-parallel systems
        and algorithms. It enables the conduction of fully automated and higly configurable experiments
        that can be executed from a simple command line interface.</description>
    <inceptionYear>2014</inceptionYear>
    <url>https://github.com/stratosphere/peel</url>

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

    <developers>
        <developer>
            <name>Alexander Alexandrov</name>
            <email>alexander.alexandrov@tu-berlin.de</email>
            <organization>TU Berlin</organization>
            <organizationUrl>https://www.tu-berlin.de</organizationUrl>
        </developer>
        <developer>
            <name>Andreas Kunft</name>
            <email>andreas.kunft@tu-berlin.de</email>
            <organization>TU Berlin</organization>
            <organizationUrl>https://www.tu-berlin.de</organizationUrl>
        </developer>
        <developer>
            <name>Felix Schüler</name>
            <email>felix.schueler@campus.tu-berlin.de</email>
            <organization>TU Berlin</organization>
            <organizationUrl>https://www.tu-berlin.de</organizationUrl>
        </developer>
        <developer>
            <name>Christoph Brücke</name>
            <email>christoph.bruecke@campus.tu-berlin.de</email>
            <organization>TU Berlin</organization>
            <organizationUrl>https://www.tu-berlin.de</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:stratosphere/peel.git</connection>
        <developerConnection>scm:git:git@github.com:stratosphere/peel.git</developerConnection>
        <url>git@github.com:stratosphere/peel.git</url>
    </scm>

    <properties>
        <!-- Common -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <encoding>UTF-8</encoding>
        <!-- Maven Plugins -->
        <maven-eclipse-plugin.version>2.9</maven-eclipse-plugin.version>
        <scala-maven-plugin.version>3.2.1</scala-maven-plugin.version>
        <build-helper-maven-plugin.version>1.7</build-helper-maven-plugin.version>
        <maven-surefire-plugin.version>2.7</maven-surefire-plugin.version>
        <scalatest-maven-plugin.version>1.0-RC2</scalatest-maven-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
        <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.3</nexus-staging-maven-plugin.version>
        <maven-site-plugin.version>3.3</maven-site-plugin.version>
        <maven-project-info-reports.version>2.7</maven-project-info-reports.version>
        <!-- Java -->
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <!-- Scala -->
        <scala.version>2.10.5</scala.version>
        <scala.tools.version>2.10</scala.tools.version>
        <!-- Spring -->
        <spring-beans.version>4.0.5.RELEASE</spring-beans.version>
        <!-- Akka -->
        <akka.version>2.3.12</akka.version>
        <!-- Auto-Resource Management -->
        <scala-arm.version>1.4</scala-arm.version>
        <!-- Testing -->
        <junit.version>4.11</junit.version>
        <scalatest.version>2.1.7</scalatest.version>
        <specs2.version>2.3.10</specs2.version>
        <scalacheck.version>1.12.2</scalacheck.version>
        <!-- Config -->
        <config.version>1.2.1</config.version>
        <!-- Database -->
        <com.h2database.version>1.4.187</com.h2database.version>
        <anorm.version>2.4.0</anorm.version>
        <!-- JSON support -->
        <spray.version>1.2.6</spray.version>
        <!-- Apache Commons -->
        <commons-compress.version>1.9</commons-compress.version>
        <commons-io.version>1.3.2</commons-io.version>
        <commons-lang.version>3.4</commons-lang.version>
        <!-- Templating -->
        <jmustache.version>1.9</jmustache.version>
        <!-- Arguments parsing -->
        <argparse4j.version>0.6.0</argparse4j.version>
    </properties>

    <!-- Sonatype distribution management -->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>
        <!-- Scala -->
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-compiler</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-reflect</artifactId>
            <version>${scala.version}</version>
        </dependency>

        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring-beans.version}</version>
        </dependency>

        <!-- Akka -->
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-actor_${scala.tools.version}</artifactId>
            <version>${akka.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-slf4j_${scala.tools.version}</artifactId>
            <version>${akka.version}</version>
        </dependency>

        <!-- Auto-Resource Management -->
        <dependency>
            <groupId>com.jsuereth</groupId>
            <artifactId>scala-arm_${scala.tools.version}</artifactId>
            <version>${scala-arm.version}</version>
        </dependency>

        <!-- Config -->
        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>${config.version}</version>
        </dependency>

        <!-- Arguments parsing -->
        <dependency>
            <groupId>net.sourceforge.argparse4j</groupId>
            <artifactId>argparse4j</artifactId>
            <version>${argparse4j.version}</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.5</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.specs2</groupId>
            <artifactId>specs2_${scala.tools.version}</artifactId>
            <version>${specs2.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.tools.version}</artifactId>
            <version>${scalatest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalacheck</groupId>
            <artifactId>scalacheck_${scala.tools.version}</artifactId>
            <version>${scalacheck.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- Peel -->
            <dependency>
                <groupId>org.peelframework</groupId>
                <artifactId>peel-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.peelframework</groupId>
                <artifactId>peel-extensions</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Database -->
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${com.h2database.version}</version>
            </dependency>
            <dependency>
                <groupId>com.typesafe.play</groupId>
                <artifactId>anorm_${scala.tools.version}</artifactId>
                <version>${anorm.version}</version>
            </dependency>

            <!-- JSON support -->
            <dependency>
                <groupId>io.spray</groupId>
                <artifactId>spray-json_${scala.tools.version}</artifactId>
                <version>${spray.version}</version>
            </dependency>

            <!-- Apache Commons -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${commons-compress.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang.version}</version>
            </dependency>

            <!-- Templating -->
            <dependency>
                <groupId>com.samskivert</groupId>
                <artifactId>jmustache</artifactId>
                <version>${jmustache.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Maven Deploy (disabled) -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>

                <!-- Nexus Staging -->
                <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>false</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <!-- Maven Site Plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Scala compiler -->
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${scala-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scalaCompatVersion>${scala.tools.version}</scalaCompatVersion>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <recompileMode>incremental</recompileMode>
                    <useZincServer>true</useZincServer>
                    <jvmArgs>
                        <jvmArg>-Xms128m</jvmArg>
                        <jvmArg>-Xmx512m</jvmArg>
                        <!--javacArg>-Xlint:unchecked</javacArg-->
                        <!--javacArg>-Xlint:deprecation</javacArg-->
                    </jvmArgs>
                    <args>
                        <arg>-deprecation</arg>
                        <arg>-feature</arg>
                    </args>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>

            <!-- Java compiler -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>

            <!-- Eclipse integration -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>${maven-eclipse-plugin.version}</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <projectnatures>
                        <projectnature>org.scala-ide.sdt.core.scalanature</projectnature>
                        <projectnature>org.eclipse.jdt.core.javanature</projectnature>
                    </projectnatures>
                    <buildcommands>
                        <buildcommand>org.scala-ide.sdt.core.scalabuilder</buildcommand>
                    </buildcommands>
                    <classpathContainers>
                        <classpathContainer>org.scala-ide.sdt.launching.SCALA_CONTAINER</classpathContainer>
                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
                    </classpathContainers>
                    <excludes>
                        <exclude>org.scala-lang:scala-library</exclude>
                        <exclude>org.scala-lang:scala-compiler</exclude>
                    </excludes>
                    <sourceIncludes>
                        <sourceInclude>**/*.scala</sourceInclude>
                        <sourceInclude>**/*.java</sourceInclude>
                    </sourceIncludes>
                </configuration>
            </plugin>

            <!-- Adding Scala source directories to build path -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build-helper-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/scala</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/test/scala</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Check for proper LICENSE header -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <executions>
                    <execution>
                        <id>check-license</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
                    <properties>
                        <owner>TU Berlin</owner>
                        <email>peel@dima.tu-berlin.de</email>
                    </properties>
                    <excludes>
                        <exclude>**/LICENSE</exclude>
                        <exclude>**/NOTICE</exclude>
                        <exclude>**/README.md</exclude>
                        <exclude>**/CONTRIBUTORS.md</exclude>
                        <exclude>**/settings.xml.dist</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <!-- Generate NOTICE file -->
            <plugin>
                <groupId>org.jasig.maven</groupId>
                <artifactId>maven-notice-plugin</artifactId>
                <version>1.0.4</version>
                <executions>
                    <execution>
                        <id>check-notice</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <noticeTemplate>https://gist.githubusercontent.com/aalexandrov/25a931c7d106415c8af7/raw/04e7a3d5534194929f1864d0535b8cc1c5f9cddb/NOTICE.template</noticeTemplate>
                    <licenseMapping>
                        <param>https://source.jasig.org/licenses/license-mappings.xml</param>
                        <param>file://${project.basedir}/.license-mappings.xml</param>
                    </licenseMapping>
                    <generateChildNotices>false</generateChildNotices>
                </configuration>
            </plugin>

            <!-- Maven Deploy (disabled) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>

            <!-- Deploy via Nexus Staging -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <!-- profile for Sonatype releases -->
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version><!--$NO-MVN-MAN-VER$-->
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>scala-maven-plugin</artifactId>
                        <version>${scala-maven-plugin.version}</version>
                        <configuration>
                            <finalName>${project.build.finalName}-scaladoc</finalName>
                            <displayCmd>true</displayCmd>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>doc-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version><!--$NO-MVN-MAN-VER$-->
                        <configuration>
                            <quiet>true</quiet>
                            <skip>false</skip>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <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>
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>peel-archetypes</module>
        <module>peel-core</module>
        <module>peel-extensions</module>
        <module>peel-empty-bundle</module>
    </modules>

</project>
