<?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>
  <packaging>pom</packaging>

  <artifactId>parent</artifactId>
  <groupId>de.cubeisland.engine</groupId>
  <version>1</version>

  <name>CubeEngine Parent</name>
  <description>Minecraft module framework.</description>
  <url>http://engine.cubeisland.de</url>
  <inceptionYear>2012</inceptionYear>

  <prerequisites>
    <maven>3.0.0</maven>
  </prerequisites>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZ</maven.build.timestamp.format>
    <timestamp>${maven.build.timestamp}</timestamp>
    <minecraftVersion>1.7.2</minecraftVersion>
    <bukkitVersion>${minecraftVersion}-R0.4-SNAPSHOT</bukkitVersion>
    <jdkVersion>1.7</jdkVersion>
    <projectBase>${basedir}/..</projectBase>
    <externalPackage>${project.groupId}.external</externalPackage>
  </properties>

  <distributionManagement>
    <repository>
      <id>cubeisland-repo</id>
      <name>Release</name>
      <url>http://nexus.cubeisland.de/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
      <id>cubeisland-repo</id>
      <name>Snapshot</name>
      <url>http://nexus.cubeisland.de/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <organization>
    <name>Cube Island</name>
    <url>https://cubeisland.de</url>
  </organization>

  <scm>
    <url>scm:git:https://github.com/CubeEngineDev/parent</url>
    <connection>scm:git:https://github.com/CubeEngineDev/parent.git</connection>
    <developerConnection>scm:git:https://github.com/CubeEngineDev/parent.git</developerConnection>
  </scm>

  <developers>
    <developer>
      <id>pschichtel</id>
      <name>Phillip Schichtel</name>
      <email>phillip.public@schich.tel</email>
      <roles>
        <role>Development Lead</role>
      </roles>
    </developer>
    <developer>
      <id>faithcaio</id>
      <name>Anselm Brehme</name>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>boeserwolf91</id>
      <name>Stefan Wolf</name>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>totokaka</id>
      <name>Tobias Laundal</name>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>GNU General Public License Version 3</name>
      <url>http://www.gnu.org/licenses/gpl.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <ciManagement>
    <system>jenkins</system>
    <url>http://ci.cubeisland.de/job/CubeEngine</url>
  </ciManagement>

  <repositories>
    <repository>
      <id>cubeisland-repo</id>
      <name>Cube Island Nexus</name>
      <url>http://repo.cubeisland.de/</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>cubeisland-repo</id>
      <name>Cube Island Nexus</name>
      <url>http://repo.cubeisland.de/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>cubeengine</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <type>jar</type>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.ocpsoft.prettytime</groupId>
            <artifactId>prettytime</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.mcstats.bukkit</groupId>
            <artifactId>metrics</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>net.sf.trove4j</groupId>
        <artifactId>trove4j</artifactId>
        <version>3.0.3</version>
        <type>jar</type>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.3.1</version>
        <type>jar</type>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.3</version>
      </dependency>
      <dependency>
        <groupId>org.bukkit</groupId>
        <artifactId>bukkit</artifactId>
        <version>${bukkitVersion}</version>
        <type>jar</type>
        <scope>compile</scope>
        <exclusions>
          <exclusion>
            <groupId>org.yaml</groupId>
            <artifactId>yaml</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Test dependencies -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <type>jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-api-mockito</artifactId>
        <version>1.5.3</version>
        <type>jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-module-junit4</artifactId>
        <version>1.5.3</version>
        <type>jar</type>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <finalName>${project.artifactId}</finalName>
    <defaultGoal>clean install</defaultGoal>

    <resources>
      <resource>
        <targetPath>.</targetPath>
        <directory>${basedir}/src/main/resources/</directory>
        <filtering>true</filtering>
        <includes>
          <include>module.yml</include>
        </includes>
      </resource>
      <resource>
        <targetPath>.</targetPath>
        <directory>${basedir}/src/main/resources/</directory>
        <filtering>false</filtering>
      </resource>
      <resource>
        <targetPath>./resources</targetPath>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>de.cubeisland.maven.plugins</groupId>
        <artifactId>githead-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <executions>
          <execution>
            <id>add-license-headers</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>de.cubeisland.maven.plugins</groupId>
        <artifactId>messageextractor-maven-plugin</artifactId>
      </plugin>

    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.4.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.11</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-reactor-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
          <configuration>
            <charset>${project.build.sourceEncoding}</charset>
            <docencoding>${project.build.sourceEncoding}</docencoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <includeEmptyDirs>false</includeEmptyDirs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>de.cubeisland.maven.plugins</groupId>
          <artifactId>githead-maven-plugin</artifactId>
          <version>1.0.2-SNAPSHOT</version>
          <executions>
            <execution>
              <goals>
                <goal>head</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.16</version>
          <configuration>
            <useSystemClassLoader>false</useSystemClassLoader>
            <printSummary>true</printSummary>
            <!-- Move the working directory up to the modules -->
            <workingDirectory>${project.build.directory}/test-data</workingDirectory>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.16</version>
          <configuration>
            <showSuccess>true</showSuccess>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <encoding>${project.build.sourceEncoding}</encoding>
            <source>${jdkVersion}</source>
            <target>${jdkVersion}</target>
            <optimize>true</optimize>
            <showDeprecation>true</showDeprecation>
            <showWarnings>true</showWarnings>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.mycila.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>1.10.b1</version>
          <configuration>
            <header>https://raw.githubusercontent.com/CubeEngineDev/CubeEngine/master/header.txt</header>
            <strictCheck>true</strictCheck>
            <includes>
              <include>**/*.java</include>
            </includes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>de.cubeisland.maven.plugins</groupId>
          <artifactId>messageextractor-maven-plugin</artifactId>
          <version>1.0.0-SNAPSHOT</version>
          <configuration>
            <configurations>
              <configuration>${basedir}/extractor.xml</configuration>
              <configuration>${basedir}/../extractor.xml</configuration>
              <configuration>https://raw.github.com/CubeEngineDev/CubeEngine/master/extractor.xml</configuration>
            </configurations>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>development</id>

      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <executions>
              <execution>
                <id>add-license-headers</id>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
              <failOnError>false</failOnError>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>

      <build>
        <plugins>
          <!--
              Checks style
          -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <configuration>
              <consoleOutput>true</consoleOutput>
              <logViolationsToConsole>true</logViolationsToConsole>
              <failsOnError>true</failsOnError>
              <failsOnError>true</failsOnError>
              <configLocation>${projectBase}/checkstyle.xml</configLocation>
            </configuration>
            <!--
            <executions>
                <execution>
                    <id>checkstyle</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
            -->
          </plugin>

          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <executions>
              <execution>
                <id>add-license-headers</id>
                <phase>none</phase>
              </execution>
              <execution>
                <id>check-license-headers</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
