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

   <!-- ********************************************** -->
   <!-- ****************** BASE POM ****************** -->
   <!-- ********************************************** -->

   <parent>
      <groupId>com.bernardomg.maven</groupId>
      <artifactId>base-pom</artifactId>
      <version>1.2.0</version>
   </parent>

   <!-- ********************************************** -->
   <!-- **************** PROJECT INFO **************** -->
   <!-- ********************************************** -->

   <groupId>com.bernardomg.tabletop.dreadball</groupId>
   <artifactId>dreadball-model-api</artifactId>
   <version>0.8.0</version>
   <packaging>jar</packaging>

   <name>Dreadball Model API</name>
   <description>Model API library for the game Dreadball, part of the Tabletop project.</description>
   <url>https://github.com/Bernardo-MG/dreadball-model-api</url>
   <inceptionYear>2015</inceptionYear>

   <licenses>
      <license>
         <name>Apache v2 License</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
         <distribution>repo</distribution>
      </license>
   </licenses>

   <!-- ********************************************** -->
   <!-- ********* INFRASTRUCTURE AND SERVICES ******** -->
   <!-- ********************************************** -->

   <scm>
      <connection>scm:git:https://github.com/bernardo-mg/dreadball-model-api.git</connection>
      <developerConnection>scm:git:https://github.com/bernardo-mg/dreadball-model-api.git</developerConnection>
      <tag>head</tag>
      <url>https://github.com/bernardo-mg/dreadball-model-api</url>
   </scm>

   <issueManagement>
      <system>GitHub</system>
      <url>https://github.com/bernardo-mg/dreadball-model-api/issues</url>
   </issueManagement>

   <ciManagement>
      <system>Travis CI</system>
      <url>https://travis-ci.org/Bernardo-MG/dreadball-model-api</url>
      <notifiers />
   </ciManagement>

   <distributionManagement>
      <relocation>
         <groupId>com.bernardomg.tabletop.dreadball</groupId>
      </relocation>
      <repository>
         <uniqueVersion>false</uniqueVersion>
         <id>releases</id>
         <name>Releases Repository</name>
         <url>https://api.bintray.com/maven/bernardo-mg/tabletop-toolkits/dreadball-model-api</url>
      </repository>
      <snapshotRepository>
         <uniqueVersion>false</uniqueVersion>
         <id>snapshots</id>
         <name>Snapshots Repository</name>
         <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      </snapshotRepository>
   </distributionManagement>

   <!-- ********************************************** -->
   <!-- ****************** PROFILES ****************** -->
   <!-- ********************************************** -->

   <profiles>
      <profile>
         <!-- Profile for the Eclipse Maven plugin -->
         <!-- Sets the POM so this plugin does not give the usual unregistered goals 
            errors -->
         <!-- It will be activated automatically on Eclipse if this has the m2e plugin, 
            by detecting the version property -->
         <id>eclipse-maven</id>
         <activation>
            <property>
               <name>m2e.version</name>
            </property>
         </activation>
         <build>
            <pluginManagement>
               <plugins>
                  <plugin>
                     <!-- m2e lifecycle mapping -->
                     <!-- This is used to configure the Maven plugin for Eclipse. -->
                     <!-- Among other things, it allows registering goals, which 
                        Eclipse would otherwise reject. -->
                     <!-- It has no real effect on Maven. -->
                     <groupId>org.eclipse.m2e</groupId>
                     <artifactId>lifecycle-mapping</artifactId>
                     <version>${plugin.lifecycle.version}</version>
                     <configuration>
                        <downloadSources>true</downloadSources>
                        <downloadJavadocs>true</downloadJavadocs>
                     </configuration>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
      <profile>
         <!-- Release site deployment profile -->
         <!-- Sets the site repository to point to the releases repo -->
         <id>deployment-release</id>
         <activation>
            <!-- Active by default so the repository appears in the reports -->
            <activeByDefault>true</activeByDefault>
         </activation>
         <distributionManagement>
            <site>
               <id>site</id>
               <name>Project Documentation Site</name>
               <!-- The URL should be set externally -->
               <url>${site.release.url}</url>
            </site>
         </distributionManagement>
      </profile>
      <profile>
         <!-- Development site deployment profile -->
         <!-- Sets the site repository to point to the development repo -->
         <id>deployment-development</id>
         <distributionManagement>
            <site>
               <id>site-development</id>
               <name>Project Development Documentation Site</name>
               <!-- The URL should be set externally -->
               <url>${site.develop.url}</url>
            </site>
         </distributionManagement>
      </profile>
      <profile>
         <!-- Deployment profile -->
         <!-- Sets ups the environment for deployment -->
         <id>deployment</id>
         <properties>
            <!-- Tests are skipped -->
            <maven.test.skip>true</maven.test.skip>
         </properties>
      </profile>
   </profiles>

   <!-- ********************************************** -->
   <!-- *********** ORGANIZATION AND MEMBERS ********* -->
   <!-- ********************************************** -->

   <organization>
      <name>Bernardo Martínez Garrido</name>
      <url>https://github.com/Bernardo-MG</url>
   </organization>

   <developers>
      <developer>
         <id>bmg</id>
         <name>Bernardo Martínez Garrido</name>
         <email>programming@bernardomg.com</email>
         <url>https://github.com/Bernardo-MG</url>
         <organization>Bernardo Martínez Garrido</organization>
         <organizationUrl>https://github.com/Bernardo-MG</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
         <properties />
      </developer>
   </developers>

   <!-- ********************************************** -->
   <!-- **************** PROPERTIES ****************** -->
   <!-- ********************************************** -->

   <properties>
      <!-- Manifest data -->
      <manifest.name>com/bernardomg/tabletop/dreadball/model/api</manifest.name>
      <!-- Maven Site -->
      <site.skin.version>1.2.0</site.skin.version>
      <bintrayURL>https://bintray.com/bernardo-mg/tabletop-toolkits/dreadball-model-api/view</bintrayURL>
      <mavenURL>http://mvnrepository.com/artifact/com.bernardomg.tabletop.dreadball/dreadball-model-api</mavenURL>
   </properties>

   <!-- ********************************************** -->
   <!-- ******************* BUILD ******************** -->
   <!-- ********************************************** -->

   <build>
      <defaultGoal>clean package install</defaultGoal>
      <plugins>
         <plugin>
            <!-- Changes -->
            <!-- Takes care of the changes log -->
            <!-- It is set to also validate the changes log file -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-changes-plugin</artifactId>
            <executions>
               <!-- Changes plugin is bound to the pre-site phase -->
               <execution>
                  <id>check-changes</id>
                  <phase>pre-site</phase>
                  <goals>
                     <goal>changes-check</goal>
                  </goals>
               </execution>
               <execution>
                  <id>validate-changes</id>
                  <phase>pre-site</phase>
                  <goals>
                     <goal>changes-validate</goal>
                  </goals>
                  <configuration>
                     <failOnError>true</failOnError>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <!-- Site -->
            <!-- Generates the Maven Site -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <dependencies>
               <dependency>
                  <!-- Docs Maven Skin -->
                  <groupId>com.bernardomg.maven.skins</groupId>
                  <artifactId>docs-maven-skin</artifactId>
                  <version>${site.skin.version}</version>
               </dependency>
            </dependencies>
         </plugin>
      </plugins>
   </build>

   <!-- ********************************************** -->
   <!-- ****************** REPORTS ******************* -->
   <!-- ********************************************** -->

   <reporting>
      <plugins>
         <plugin>
            <!-- Checkstyle -->
            <!-- Checks that the source files comply with style standards -->
            <!-- It is using a customized rules file -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <configuration>
               <!-- The customized rules file -->
               <configLocation>${project.basedir}/src/config/checkstyle/checkstyle-rules.xml</configLocation>
            </configuration>
         </plugin>
         <plugin>
            <!-- PMD -->
            <!-- Checks that the code complies with a series of code quality rules -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <configuration>
               <rulesets>
                  <!-- The customized rules file -->
                  <ruleset>${project.basedir}/src/config/pmd/pmd-rules.xml</ruleset>
               </rulesets>
            </configuration>
         </plugin>
      </plugins>
   </reporting>

</project>
