<?xml version="1.0" encoding="UTF-8"?>
<!--
 |  Copyright 2013 The Trudeau Project
 |
 |  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.99soft.trudeau</groupId>
  <artifactId>trudeau-parent</artifactId>
  <version>2</version>
  <packaging>pom</packaging>

  <name>Trudeau - Parent POM</name>
  <description>The Trudeau Project parent POM.</description>
  <url>https://github.com/trudeau/</url>
  <inceptionYear>2013</inceptionYear>
  <organization>
    <name>The Trudeau Project</name>
    <url>https://github.com/trudeau/</url>
  </organization>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>hyperboreans</id>
      <name>Claudio Squarcella aka Orbio</name>
      <email>claudio.squarcella@gmail.com</email>
      <url>http://claudiosquarcella.com/</url>
      <timezone>+1</timezone>
    </developer>

    <developer>
      <id>dpalmisano</id>
      <name>Davide Palmisano aka Deviz</name>
      <email>dpalmisano@gmail.com</email>
      <url>http://davidepalmisano.com/</url>
      <timezone>+1</timezone>
    </developer>

    <developer>
      <id>marcosperanza</id>
      <name>Marco Speranza</name>
      <email>marco.speranza79@gmail.com</email>
      <url>http://www.marcosperanza.org/</url>
      <timezone>+1</timezone>
    </developer>

    <developer>
      <id>mox601</id>
      <name>Matteo Moci aka Mox</name>
      <email>mox601@gmail.com</email>
      <timezone>+1</timezone>
    </developer>

    <developer>
      <id>simonetripodi</id>
      <name>Simone Tripodi aka 3pod</name>
      <email>simone.tripodi@gmail.com</email>
      <url>http://people.apache.org/~simonetripodi</url>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>trudeau-user</name>
      <archive>http://groups.google.com/group/trudeau-user/topics</archive>
      <subscribe>http://groups.google.com/group/trudeau-user/subscribe</subscribe>
      <unsubscribe>http://groups.google.com/group/trudeau-user/subscribe</unsubscribe>
      <post>trudeau-user@googlegroups.com</post>
    </mailingList>

    <mailingList>
      <name>trudeau-dev</name>
      <archive>http://groups.google.com/group/trudeau-dev/topics</archive>
      <subscribe>http://groups.google.com/group/trudeau-dev/subscribe</subscribe>
      <unsubscribe>http://groups.google.com/group/trudeau-dev/subscribe</unsubscribe>
      <post>trudeau-dev@googlegroups.com</post>
    </mailingList>

    <mailingList>
      <name>trudeau-private</name>
      <archive>http://groups.google.com/group/trudeau-private/topics</archive>
      <subscribe>http://groups.google.com/group/trudeau-private/subscribe</subscribe>
      <unsubscribe>http://groups.google.com/group/trudeau-private/subscribe</unsubscribe>
      <post>trudeau-private@googlegroups.com</post>
    </mailingList>
  </mailingLists>

  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <scm>
    <url>http://github.com/trudeau/parent</url>
    <connection>scm:git:ssh://github.com/trudeau/parent.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/trudeau/parent.git</developerConnection>
    <tag>trudeau-parent-2</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issue Management</system>
    <url>https://github.com/trudeau/parent/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Trevis CI</system>
    <url>https://travis-ci.org/trudeau/parent/</url>
  </ciManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <javac.src.version>1.6</javac.src.version>
    <javac.target.version>1.6</javac.target.version>
    <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZ</maven.build.timestamp.format>
    <!--
     | plugins configuration
    -->
    <surefire.version>2.16</surefire.version>
    <javadoc.version>2.9.1</javadoc.version>
    <!--
     | OSGi configuration properties
    -->
    <osgi.symbolicName>${project.artifactId}</osgi.symbolicName>
    <osgi.export>org.nnsoft.trudeau.*;version=${project.version};-noimport:=true</osgi.export>
    <osgi.import>*</osgi.import>
    <osgi.dynamicImport />
    <osgi.private />
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</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-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>-Prelease</arguments>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.5.1</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce-java</id>
            <phase>validate</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[1.6,)</version>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>[3.0,)</version>
                </requireMavenVersion>
                <requirePluginVersions>
                  <message>[ERROR] Best Practice is to always define plugin versions!</message>
                  <banLatest>true</banLatest>
                  <banRelease>true</banRelease>
                  <banSnapshots>true</banSnapshots>
                  <phases>clean,deploy,site</phases>
                </requirePluginVersions>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludeDependencies>true</excludeDependencies>
          <manifestLocation>${project.build.directory}/osgi</manifestLocation>
          <instructions>
            <!--
             | stops the "uses" clauses being added to "Export-Package" manifest entry
            -->
            <_nouses>true</_nouses>
            <!--
             | Stop the JAVA_1_n_HOME variables from being treated as headers by Bnd
            -->
            <_removeheaders>JAVA_1_3_HOME,JAVA_1_4_HOME,JAVA_1_5_HOME,JAVA_1_6_HOME</_removeheaders>
            <Bundle-SymbolicName>${osgi.symbolicName}</Bundle-SymbolicName>
            <Export-Package>${osgi.export}</Export-Package>
            <Private-Package>${osgi.private}</Private-Package>
            <Import-Package>${osgi.import}</Import-Package>
            <DynamicImport-Package>${osgi.dynamicImport}</DynamicImport-Package>
            <Bundle-DocURL>${project.url}</Bundle-DocURL>
          </instructions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.directory}/osgi/MANIFEST.MF</manifestFile>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
            <manifestEntries>
              <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
              <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
              <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>${javac.src.version}</source>
          <target>${javac.target.version}</target>
          <encoding>${project.build.sourceEncoding}</encoding>
          <optimize>true</optimize>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <inputDirectory>${project.reporting.outputDirectory}/apidocs</inputDirectory>
        </configuration>
      </plugin>
    </plugins>

    <extensions>
      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-provider-gitexe</artifactId>
        <version>1.9.4</version>
      </extension>

      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-manager-plexus</artifactId>
        <version>1.9.4</version>
      </extension>

      <extension>
        <groupId>com.github.stephenc.wagon</groupId>
        <artifactId>wagon-gitsite</artifactId>
        <version>0.5</version>
      </extension>
    </extensions>

    <resources>
      <resource>
        <directory>${basedir}</directory>
        <targetPath>META-INF</targetPath>
        <includes>
          <include>LICENSE</include>
          <include>NOTICE</include>
        </includes>
      </resource>
    </resources>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.3</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <xmlOutputDirectory>target/findbugs-reports</xmlOutputDirectory>
          <findbugsXmlOutput>target/findbugs-reports</findbugsXmlOutput>
          <threshold>High</threshold>
          <effort>Max</effort>
          <visitors>FindDeadLocalStores,UnreadFields</visitors>
          <onlyAnalyze>${findbugs.onlyAnalyze}</onlyAnalyze>
          <relaxed>true</relaxed>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${surefire.version}</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.6</version>
        <configuration>
          <linkXref>true</linkXref>
          <minimumTokens>100</minimumTokens>
          <targetJdk>${javac.target.version}</targetJdk>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <tagListOptions>
            <tagClasses>
              <tagClass>
                <displayName>Todo Work</displayName>
                <tags>
                  <tag>
                    <matchString>TODO</matchString>
                    <matchType>ignoreCase</matchType>
                  </tag>
                  <tag>
                    <matchString>FIXME</matchString>
                    <matchType>ignoreCase</matchType>
                  </tag>
                </tags>
              </tagClass>
            </tagClasses>
          </tagListOptions>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
                <configuration>
                  <archive>
                    <manifest>
                      <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                      <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                    </manifest>
                    <manifestEntries>
                      <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
                      <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
                      <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
                    </manifestEntries>
                  </archive>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadoc.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <archive>
                    <manifest>
                      <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                      <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                    </manifest>
                    <manifestEntries>
                      <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
                      <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
                      <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
                    </manifestEntries>
                  </archive>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadoc.version}</version>
            <configuration>
              <bootclasspath>${sun.boot.class.path}</bootclasspath>
              <doclet>com.google.doclava.Doclava</doclet>
              <useStandardDocletOptions>false</useStandardDocletOptions>
              <additionalJOption>-J-Xmx1024m</additionalJOption>
              <docletArtifact>
                <groupId>com.google.doclava</groupId>
                <artifactId>doclava</artifactId>
                <version>1.0.3</version>
              </docletArtifact>
              <additionalparam>
                -hdf project.name "${project.name}"
                -d ${project.reporting.outputDirectory}/apidocs/${project.version}
              </additionalparam>
            </configuration>
            <reportSets>
              <reportSet>
                <id>default</id>
                <reports>
                  <report>javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>
  </profiles>

</project>
