<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright (c) 2011 Danish Maritime Authority.
   
   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">
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>net.maritimecloud</groupId>
  <artifactId>mc-root-pom</artifactId>
  
  <!-- Versions here is just a single incremental number no '.' -->
  <version>8</version>
  <packaging>pom</packaging>
  <name>MaritimeCloud Root Pom</name>
  <description>The root pom for all maven projects under maritimecloud.net</description>
  <url>https://github.com/MaritimeCloud</url>
  
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <organization>
    <name>Danish Maritime Authority</name>
    <url>http://http://www.dma.dk/</url>
  </organization>
  
  <inceptionYear>2012</inceptionYear>
  
  <ciManagement>
    <system>Jenkins</system>
    <url>https://dma.ci.cloudbees.com/</url>
  </ciManagement>
  
  <mailingLists>
    <mailingList>
      <name>MaritimeCloud group</name>
      <subscribe>http://groups.google.com/group/maritimecloud/subscribe</subscribe>
      <archive>http://groups.google.com/group/maritimecloud</archive>
    </mailingList>
  </mailingLists>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <dependencies.guava.version>18.0</dependencies.guava.version>
    <dependencies.slf4j.version>1.7.7</dependencies.slf4j.version>
    <dependencies.jetty.version>9.2.3.v20140905</dependencies.jetty.version>
    <dependencies.servlet.version>3.1.0</dependencies.servlet.version>
    <dependencies.jersey.version>2.13</dependencies.jersey.version>
  </properties>
  
  
  <prerequisites>
    <maven>3.0.4</maven>
  </prerequisites>
  
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>2.2</version>
      </extension>
    </extensions>
    <plugins>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <encoding>UTF-8</encoding>
          <optimize>false</optimize>
          <debug>true</debug>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.16</version>
        <!-- <configuration> <parallel>methods</parallel> <threadCount>8</threadCount> </configuration>
          -->
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.3</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.3.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-install-plugin</artifactId>
        <version>2.5.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-deploy-plugin</artifactId>
        <version>2.8.1</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-jar-plugin</artifactId>
        <version>2.4</version>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.13</version>
        <dependencies>
          <dependency>
            <groupId>net.maritimecloud.tools</groupId>
            <artifactId>mc-build-tool</artifactId>
            <version>1</version>
          </dependency>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>6.0</version>
            <exclusions>
              <exclusion>
                <groupId>com.sun</groupId>
                <artifactId>tools</artifactId>
              </exclusion>
           </exclusions>
         </dependency>
        </dependencies>
       
        <configuration>
          <configLocation>mc-build-tool/checkstyle.xml</configLocation>
          <suppressionsLocation>mc-build-tool/checkstyle-suppressions.xml</suppressionsLocation>
          <headerLocation>mc-build-tool/LICENSE.txt</headerLocation>
          <failsOnError>true</failsOnError>
          <enableRulesSummary>true</enableRulesSummary>
          <consoleOutput>true</consoleOutput>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <testSourceDirectory>src/test/java</testSourceDirectory>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <excludePackageNames>*.internal.*:*.deprecated.*:*.tck.*:*.test.*:*.jcip.*:*.examples.*:</excludePackageNames>
          <aggregate>true</aggregate>
          <showPackage>false</showPackage>
          <showProtected>true</showProtected>
          <additionalparam>-link http://docs.oracle.com/javase/8/docs/api/</additionalparam>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>com.googlecode.maven-overview-plugin</groupId>
        <artifactId>maven-overview-plugin</artifactId>
        <version>1.6</version>
      </plugin>
      
    </plugins>
  </build>
  
  <reporting>
    <plugins>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <excludePackageNames>*.internal.*:*.tck.*:*.test.*:*.jcip.*:*.examples.*:*.testcases.*:</excludePackageNames>
          <aggregate>true</aggregate>
          <showPackage>false</showPackage>
          <showProtected>true</showProtected>
          <additionalparam>-link http://docs.oracle.com/javase/8/docs/api/</additionalparam>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.11</version>
        <configuration>
          <configLocation>mc-build-tool/checkstyle.xml</configLocation>
          <suppressionsLocation>mc-build-tool/checkstyle-suppressions.xml</suppressionsLocation>
          <headerLocation>mc-build-tool/LICENSE.txt</headerLocation>
          
          <failsOnError>true</failsOnError>
          <enableRulesSummary>true</enableRulesSummary>
          <consoleOutput>true</consoleOutput>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <testSourceDirectory>src/test/java</testSourceDirectory>
        </configuration>
      </plugin>
      
    </plugins>
  </reporting>
  
  
  <profiles>
    
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
  </profiles>
</project>
