<?xml version='1.0' encoding='UTF-8'?>
<!--
  ~ #%L
  ~ Nazgul Project: nazgul-tools-parent
  ~ %%
  ~ Copyright (C) 2010 - 2015 jGuru Europe AB
  ~ %%
  ~ Licensed under the jGuru Europe AB license (the "License"), based
  ~ on Apache License, Version 2.0; you may not use this file except
  ~ in compliance with the License.
  ~
  ~ You may obtain a copy of the License at
  ~
  ~        http://www.jguru.se/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.
  ~ #L%
  -->

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

    <!--
    ################################################
    # Section 1:  Project information
    ################################################
    -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>se.jguru.nazgul.tools.poms</groupId>
    <artifactId>nazgul-tools-parent</artifactId>
    <version>6.0.2</version>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <url>${site.top.url}/${path.in.reactor}</url>
    <inceptionYear>2010</inceptionYear>
    <description>Nazgul Tools: Parent (POM, version ${project.version})</description>

    <organization>
        <name>jGuru Europe AB</name>
        <url>http://www.jguru.se/</url>
    </organization>

    <prerequisites>
        <maven>${maven.version}</maven>
    </prerequisites>

    <licenses>
        <license>
            <name>jGuru Europe Corporate Source License, based on The Apache Software License, Version 2.0</name>
            <url>http://www.jguru.se/licenses/jguruCorporateSourceLicense-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>lj</id>
            <name>Lennart Jörelid</name>
            <email>lj@jguru.se</email>
            <roles>
                <role>Committer</role>
            </roles>
            <organization>jGuru Europe AB</organization>
            <organizationUrl>http://www.jguru.se</organizationUrl>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <properties>
        <!-- Build-controlling properties -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <build.number />
        <artifact.distribution.directory>${project.build.outputDirectory}</artifact.distribution.directory>
        <check.plugins.phase>package</check.plugins.phase>
        <jdk.version>1.8</jdk.version>

        <!--
            Define the URL prefixes for Site Deployment and DistributionManagement.
            These can be overridden in sub-reactors to tailor releases to other locations.
        -->
        <reactor.name>nazgul_tools</reactor.name>
        <path.in.reactor>poms/tools-parent</path.in.reactor>

        <!--
            Define URL prefixes used in the various URL settings of the POM.
        -->
        <github.global.server>nazgul_github</github.global.server>
        <git.repo.owner>lennartj</git.repo.owner>
        <git.repo.url.prefix>https://github.com/${git.repo.owner}</git.repo.url.prefix>
        <git.scm.url.prefix>scm:git:ssh://git@github.com/${git.repo.owner}</git.scm.url.prefix>
        <site.url.prefix>http://${git.repo.owner}.github.io</site.url.prefix>
        <site.top.url>${site.url.prefix}/${reactor.name}/Documentation/${project.version}</site.top.url>

        <scm.connection.url>scm:git:${git.repo.url.prefix}/${reactor.name}.git</scm.connection.url>
        <scm.devConnection.url>${git.scm.url.prefix}/${reactor.name}.git</scm.devConnection.url>
        <distroManagement.url>${site.top.url}/${path.in.reactor}</distroManagement.url>
        <scm.url>${git.repo.url.prefix}/${reactor.name}.git</scm.url>
        <site.staging.localDirectory>/tmp/${reactor.name}</site.staging.localDirectory>
        <!-- site.staging.localDirectory>/tmp/${reactor.name}/${project.version}</site.staging.localDirectory -->

        <!-- Version number properties -->
        <maven.version>3.3.1</maven.version>
        <openjpa.version>2.4.0</openjpa.version>
        <aspectj.runtime.version>1.8.9</aspectj.runtime.version>
        <maven.release.plugin.version>2.5.3</maven.release.plugin.version>
        <maven.compiler.plugin.version>3.5.1</maven.compiler.plugin.version>
        <aspectj-maven-plugin.version>1.8</aspectj-maven-plugin.version>
        <osgiVersion>5.0.0</osgiVersion>
        <slf4j.version>1.7.20</slf4j.version>
        <logback.version>1.1.7</logback.version>
        <maven-project-info-reports-plugin.version>2.9</maven-project-info-reports-plugin.version>
        <dependency.plugin.version>2.10</dependency.plugin.version>
        <versions-maven-plugin.version>2.1.4</versions-maven-plugin.version>

        <!-- Code style properties -->
        <wtp.version>2.0</wtp.version>
        <skip.verify.code>false</skip.verify.code>

        <!-- Enforcer configuration parameters -->
        <enforcer.includedGroupIdPatterns>^se\\.jguru\\.nazgul\\..*</enforcer.includedGroupIdPatterns>
        <enforcer.excludedGroupIdPatterns>^se\\.jguru\\.nazgul\\..*\\.generated\\..*,^se\\.jguru\\.nazgul\\.tools\\.codestyle\\..*</enforcer.excludedGroupIdPatterns>

        <!-- Checkstyle configuration parameters. -->
        <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
        <checkstyle.config.location>codestyle/checkstyle.xml</checkstyle.config.location>
        <checkstyle.suppressions.location>codestyle/checkstyle-suppressions.xml</checkstyle.suppressions.location>
        <checkstyle.violationSeverity>error</checkstyle.violationSeverity>
        <checkstyle.excludes>**/generated/**/*,**/grammars/**/*</checkstyle.excludes>

        <!-- PMD configuration parameters. -->
        <pmd.plugin.version>3.6</pmd.plugin.version>
        <pmd.ruleset>/codestyle/pmd-rules.xml</pmd.ruleset>

        <!-- Findbugs configuration parameters. -->
        <findbugs.plugin.version>3.0.3</findbugs.plugin.version>
        <findbugs.only.analyze>se.jguru.nazgul.*</findbugs.only.analyze>
        <findbugs.includeFilterFile>codestyle/findbugs.xml</findbugs.includeFilterFile>
        <findbugs.excludeFilterFile>codestyle/findbugs-excludes.xml</findbugs.excludeFilterFile>

        <!-- Surefire configuration parameters. -->
        <surefire.memconf>-Xmx1024m -XX:MaxPermSize=512m</surefire.memconf>
        <surefire.encoding>-Dfile.encoding=${project.build.sourceEncoding}</surefire.encoding>
        <surefire.argLine>${surefire.memconf} ${surefire.encoding}</surefire.argLine>

        <!-- License plugin configuration parameters. -->
        <license.id>jguru_apl_v2</license.id>
        <license.licenseResolver>classpath://codestyle/license</license.licenseResolver>

        <!-- Define code-breaking constants -->
        <breakOnFailure.checkstyle>true</breakOnFailure.checkstyle>
        <breakOnFailure.pmd>true</breakOnFailure.pmd>
        <breakOnFailure.enforcer>true</breakOnFailure.enforcer>
        <breakOnFailure.license>true</breakOnFailure.license>

        <!-- Site plugin properties -->
        <maven-site-plugin.version>3.4</maven-site-plugin.version>
        <doxia-modules.version>1.6</doxia-modules.version>
        <wagon-modules.version>2.10</wagon-modules.version>

        <!-- Resource-controlling properties -->
        <maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
        <maven-resources-plugin.includeEmptyDirs>true</maven-resources-plugin.includeEmptyDirs>
        <apiviz.version>1.3.3</apiviz.version>
    </properties>

    <!--
    ################################################
    # Section 2:  Dependency (management) settings
    ################################################
    -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>test</scope>
            </dependency>

            <!--
                JavaEE specification.
            -->
            <dependency>
                <groupId>javax</groupId>
                <artifactId>javaee-api</artifactId>
                <version>7.0</version>
                <scope>provided</scope>
            </dependency>

            <!--
                AOP dependencies.
            -->
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjrt</artifactId>
                <version>${aspectj.runtime.version}</version>
            </dependency>
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjtools</artifactId>
                <version>${aspectj.runtime.version}</version>
            </dependency>

            <!--
                OSGi dependencies
            -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>${osgiVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.compendium</artifactId>
                <version>${osgiVersion}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.4</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.9.4</version>
            </dependency>

            <!--
               Test framework dependencies
            -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <scope>test</scope>
                <version>4.12</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <!--
    ################################################
    # Section 3:  Build settings
    ################################################
    -->
    <build>
        <pluginManagement>
            <plugins>

                <!--
                    Provides Plantuml integration into site deployments.

                    Why:  Convert Plantuml documents to png images.
                    Used: Site lifecycle, mvn site.
                -->
                <plugin>
                    <groupId>com.github.jeluard</groupId>
                    <artifactId>plantuml-maven-plugin</artifactId>
                    <version>7954</version>
                    <configuration>
                        <sourceFiles>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>src/site/**/*.puml</include>
                            </includes>
                        </sourceFiles>
                        <outputDirectory>${project.build.directory}/site/images/plantuml</outputDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <id>generate-plantuml-diagrams</id>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                            <phase>pre-site</phase>
                        </execution>
                    </executions>
                    <dependencies>
                        <!--
                            NOTE!

                            Do not upgrade the plantuml dependency above version 8030, as those plantuml releases
                            are not binary compatible with the plugin version 7954.
                        -->
                        <dependency>
                            <groupId>net.sourceforge.plantuml</groupId>
                            <artifactId>plantuml</artifactId>
                            <version>8030</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Use the latest maven-clean-plugin.

                    Why:  Override the version in Maven's super pom.xml.
                    Used: Clean lifecycle
                -->
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <excludeDefaultDirectories>true</excludeDefaultDirectories>
                        <filesets>
                            <fileset>
                                <directory>${project.build.directory}</directory>
                                <excludes>
                                    <exclude>generated-resources/eclipse/**</exclude>
                                </excludes>
                            </fileset>
                        </filesets>
                    </configuration>
                </plugin>

                <!--
                    This is not a proper maven plugin configuration, but instead Eclipse metadata for M2E.

                    Why:  Eclipse metadata for M2E lifecycle mappings
                    Used: Only by Eclipse; neither used by Maven nor any other IDE.
                -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>license-maven-plugin</artifactId>
                                        <goals>
                                            <goal>check-file-header</goal>
                                            <goal>update-project-license</goal>
                                        </goals>
                                        <versionRange>[1.4,2)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnConfiguration>true</runOnConfiguration>
                                            <runOnIncremental>false</runOnIncremental>
                                        </execute>
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-ear-plugin</artifactId>
                                        <goals>
                                            <goal>ear</goal>
                                            <goal>generate-application-xml</goal>
                                        </goals>
                                        <versionRange>2.5</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>buildnumber-maven-plugin</artifactId>
                                        <goals>
                                            <goal>create-timestamp</goal>
                                        </goals>
                                        <versionRange>[0.0,)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>build-helper-maven-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>add-source</goal>
                                            <goal>add-test-source</goal>
                                            <goal>add-resource</goal>
                                            <goal>add-test-resource</goal>
                                            <goal>maven-version</goal>
                                            <goal>parse-version</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnConfiguration>true</runOnConfiguration>
                                            <runOnIncremental>true</runOnIncremental>
                                        </execute>
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <goals>
                                            <goal>list</goal>
                                            <goal>copy</goal>
                                            <goal>copy-dependencies</goal>
                                            <goal>unpack</goal>
                                        </goals>
                                        <versionRange>[0.0,)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.zeroturnaround</groupId>
                                        <artifactId>jrebel-maven-plugin</artifactId>
                                        <goals>
                                            <goal>generate</goal>
                                        </goals>
                                        <versionRange>[0.0,)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>gwt-maven-plugin</artifactId>
                                        <goals>
                                            <goal>resources</goal>
                                            <goal>compile</goal>
                                            <goal>i18n</goal>
                                            <goal>generateAsync</goal>
                                        </goals>
                                        <versionRange>[0.0,)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>aspectj-maven-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>test-compile</goal>
                                            <goal>compile</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-war-plugin</artifactId>
                                        <versionRange>[2.4,)</versionRange>
                                        <goals>
                                            <goal>exploded</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-enforcer-plugin</artifactId>
                                        <goals>
                                            <goal>enforce</goal>
                                        </goals>
                                        <versionRange>[1.0.0,)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.servicemix.tooling</groupId>
                                        <artifactId>depends-maven-plugin</artifactId>
                                        <goals>
                                            <goal>generate-depends-file</goal>
                                        </goals>
                                        <versionRange>[1.2,)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.openjpa</groupId>
                                        <artifactId>openjpa-maven-plugin</artifactId>
                                        <goals>
                                            <goal>enhance</goal>
                                            <goal>test-enhance</goal>
                                        </goals>
                                        <versionRange>[1.2,)</versionRange>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>

                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>

                <!--
                    Define OSGi bundle plugin version.

                    Why:  Plugin used to generate OSGi Manifest headers in JARs.
                    Used: As included in [sub]projects.
                -->
                <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>
                        <supportedProjectTypes>
                            <supportedProjectType>ejb</supportedProjectType>
                            <supportedProjectType>jar</supportedProjectType>
                            <supportedProjectType>bundle</supportedProjectType>
                            <supportedProjectType>war</supportedProjectType>
                            <supportedProjectType>ear</supportedProjectType>
                        </supportedProjectTypes>
                        <instructions>
                            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        </instructions>
                    </configuration>
                </plugin>

                <!--

                    Configures the release plugin to use a custom release profile.

                    Why:  Release artifacts
                    Used: Normal lifecycle, release goal
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven.release.plugin.version}</version>
                    <configuration>
                        <arguments>-Pnazgul-release</arguments>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <useReleaseProfile>false</useReleaseProfile>
                        <tagNameFormat>${reactor.name}-@{project.version}</tagNameFormat>
                        <goals>deploy</goals>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>1.9.4</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Configures the WAR plugin to properly use the generated OSGi-compliant manifest.

                    Why:  Assigns some manifest data within the WARs in WAR projects. Reads bundle-generated manifest.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                            <manifestEntries>
                                <name>${project.name}</name>
                                <description>${project.description}</description>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <!--
                    Configure EAR plugin, directs all normal dependencies in the /lib directory.

                    Why:  Assigns some manifest data within JARs.
                          Reads bundle-generated manifest. Uses JEE 6 style EARs.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>2.10.1</version>
                    <executions>
                        <execution>
                            <id>packageEar</id>
                            <goals>
                                <goal>generate-application-xml</goal>
                                <goal>ear</goal>
                            </goals>
                            <configuration>
                                <!-- defaultJavaBundleDir>lib</defaultJavaBundleDir -->
                                <defaultLibBundleDir>lib</defaultLibBundleDir>
                                <version>6</version>
                                <archive>
                                    <manifest>
                                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                    </manifest>
                                    <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                                    <manifestEntries>
                                        <name>${project.name}</name>
                                        <description>${project.description}</description>
                                        <groupId>${project.groupId}</groupId>
                                        <artifactId>${project.artifactId}</artifactId>
                                    </manifestEntries>
                                </archive>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!--
                    Configure EJB plugin, uses EJB version 3.1 by default.

                    Why:  Assigns some manifest data within JARs. Reads bundle-generated manifest.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ejb-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <generateClient>false</generateClient>
                        <ejbVersion>3.1</ejbVersion>
                        <detail>true</detail>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                            <manifestEntries>
                                <description>${project.description}</description>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <!--
                    Configure JAR plugin.

                    Why:  Assigns some manifest data within JARs. Reads bundle-generated manifest.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                            <manifestEntries>
                                <name>${project.name}</name>
                                <description>${project.description}</description>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <!--
                    Configure Compiler plugin.

                    Why:  Ensures source and target Java versions, as well as source encoding (UTF-8).
                    Used: Standard lifecycle, mvn compile.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin.version}</version>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>

                <!--
                    Define deploy plugin version.

                    Why:  Version definition only.
                    Used: Standard lifecycle, mvn deploy
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <!--
                    Define project-info-reports plugin version, and reduce the time taken to run it.

                    Why:  Version definition only.
                    Used: Standard lifecycle, mvn site.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin.version}</version>
                    <configuration>
                        <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                        <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                    </configuration>
                </plugin>

                <!--
                    Configures the maven resources plugin.

                    Why:  Ensures that all resources are handled using the standard source encoding.
                    Used: Standard lifecycle, mvn process-resources.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <escapeString>\</escapeString>
                        <includeEmptyDirs>${maven-resources-plugin.includeEmptyDirs}</includeEmptyDirs>
                    </configuration>
                </plugin>

                <!--
                    Analyzes imported dependencies.

                    Why:  Provide warnings when imported dependencies are not used within the project.
                    Used: Standard lifecycle.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${dependency.plugin.version}</version>
                </plugin>

                <!--
                    Configures the maven surefire plugin, which runs the unit tests invoking JUnit.
                    Surefire's argument line is overridable in subprojects using the property "surefire.argLine".

                    Why:  Supply required encoding (UTF-8), as well as memory sizing definitions.
                    Used: Standard lifecycle, mvn test.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19.1</version>
                    <configuration>
                        <argLine>${surefire.argLine}</argLine>
                        <trimStackTrace>false</trimStackTrace>
                    </configuration>
                </plugin>

                <!--
                    Define source plugin version, which generates source:jars.

                    Why:  Version definition only.
                    Used: Standard lifecyle, mvn source:jar.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>

                <!--
                    Configures the site plugin to properly cope with link relativization, staging and deployment
                    in a controlled and extensible manner.

                    Why:  Generates site documentation. Adds wagon remote deployment capability.
                    Used: Standard lifecycle, mvn site, mvn site:stage.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                    <executions combine.self="override">
                        <execution>
                            <id>attach-descriptor</id>
                            <goals>
                                <goal>attach-descriptor</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-deploy</id>
                            <phase>site-deploy</phase>
                            <goals>
                                <goal />
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <topSiteURL>${site.url.prefix}/${reactor.name}</topSiteURL>
                        <stagingSiteURL>${site.url.prefix}/${reactor.name}</stagingSiteURL>
                        <stagingDirectory>${site.staging.localDirectory}</stagingDirectory>
                        <generateSitemap>true</generateSitemap>
                        <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
                        <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-ssh</artifactId>
                            <version>${wagon-modules.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-file</artifactId>
                            <version>${wagon-modules.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-markdown</artifactId>
                            <version>${doxia-modules.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-xhtml</artifactId>
                            <version>${doxia-modules.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>se.jguru.nazgul.tools.codestyle</groupId>
                            <artifactId>nazgul-codestyle</artifactId>
                            <version>6.0.2</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Provides PMD code-style checking integration into the project.

                    Why:  Validates the codestyle.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${pmd.plugin.version}</version>
                    <configuration>
                        <skip>${skip.verify.code}</skip>
                        <excludes>
                            <exclude>**/generated/**/*</exclude>
                            <exclude>**/grammars/**/*</exclude>
                        </excludes>
                        <targetJdk>${jdk.version}</targetJdk>
                        <rulesets>
                            <ruleset>${pmd.ruleset}</ruleset>
                        </rulesets>
                        <printFailingErrors>true</printFailingErrors>
                        <failOnViolation>${breakOnFailure.pmd}</failOnViolation>
                        <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                                <goal>cpd-check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>se.jguru.nazgul.tools.codestyle</groupId>
                            <artifactId>nazgul-codestyle</artifactId>
                            <version>6.0.2</version>
                        </dependency>
                        <dependency>
                            <groupId>log4j</groupId>
                            <artifactId>log4j</artifactId>
                            <version>1.2.17</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Enforces the defined code style, as provided within the codestyle project.

                    Why:  Validates the codestyle.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <!-- groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${checkstyle.plugin.version}</version -->
                    <groupId>se.jguru.nazgul.tools.plugin.checkstyle</groupId>
                    <artifactId>nazgul-tools-checkstyle-maven-plugin</artifactId>
                    <version>6.0.2</version>
                    <configuration>
                        <skip>${skip.verify.code}</skip>
                        <configLocation>${checkstyle.config.location}</configLocation>
                        <excludes>${checkstyle.excludes}</excludes>
                        <suppressionsFile>${checkstyle.suppressions.location}</suppressionsFile>
                        <failOnViolation>${breakOnFailure.checkstyle}</failOnViolation>
                        <violationSeverity>${checkstyle.violationSeverity}</violationSeverity>
                    </configuration>
                    <executions>
                        <execution>
                            <id>verify</id>
                            <phase>${check.plugins.phase}</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <goals>
                                <goal>checkstyle</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>se.jguru.nazgul.tools.codestyle</groupId>
                            <artifactId>nazgul-codestyle</artifactId>
                            <version>6.0.2</version>
                        </dependency>
                        <!--
                            Workaround https://github.com/jcgay/maven-color/issues/8
                            i.e. Maven 2 to 3 incompatibilities.
                         -->
                        <dependency>
                            <groupId>org.slf4j</groupId>
                            <artifactId>jcl-over-slf4j</artifactId>
                            <version>${slf4j.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-jdk14</artifactId>
                            <version>${slf4j.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Finds bugs in the code, as configured within the codestyle project.

                    Why:  Finds bugs in the local project.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugs.plugin.version}</version>
                    <configuration>
                        <skip>${skip.verify.code}</skip>
                        <threshold>High</threshold>
                        <effort>Default</effort>
                        <onlyAnalyze>${findbugs.only.analyze}</onlyAnalyze>
                        <includeFilterFile>${findbugs.includeFilterFile}</includeFilterFile>
                        <excludeFilterFile>${findbugs.excludeFilterFile}</excludeFilterFile>
                        <relaxed>false</relaxed>
                        <findbugsXmlOutput>true</findbugsXmlOutput>
                        <xmlOutput>true</xmlOutput>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>se.jguru.nazgul.tools.codestyle</groupId>
                            <artifactId>nazgul-codestyle</artifactId>
                            <version>6.0.2</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    The license plugin is quite inflexible about the format for the injected/detected file header
                    in terms of license structure. Use it as intended, but provide a variable

                    Why:  Ensures that all files contain a license header.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.9</version>
                    <configuration>
                        <descriptionTemplate>/codestyle/license/${license.id}/licenseDescriptionTemplate.ftl
                        </descriptionTemplate>
                        <failOnMissingHeader>${breakOnFailure.license}</failOnMissingHeader>
                        <licenseName>${license.id}</licenseName>
                        <licenseResolver>${license.licenseResolver}</licenseResolver>
                        <canUpdateDescription>true</canUpdateDescription>
                        <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                        <licenseFile>${project.build.directory}/LICENSE.TXT</licenseFile>
                        <roots>
                            <root>${project.basedir}/src/main</root>
                            <root>${project.basedir}/src/test</root>
                            <root>${project.basedir}/src/site</root>
                        </roots>
                        <excludes>
                            <!-- Custom excludes -->
                            <param>**/*.json</param>
                            <!-- Modelling filetypes -->
                            <param>**/*.zargo</param>
                            <param>**/*.uml</param>
                            <param>**/*.umldi</param>
                            <param>**/*.umldi</param>
                            <param>**/*.xmi</param>
                            <!-- Image filetypes -->
                            <param>**/*.img</param>
                            <param>**/*.png</param>
                            <param>**/*.jpg</param>
                            <param>**/*.jpeg</param>
                            <param>**/*.gif</param>
                            <!-- Archives -->
                            <param>**/*.zip</param>
                            <param>**/*.jar</param>
                            <param>**/*.war</param>
                            <param>**/*.ear</param>
                            <param>**/*.tgz</param>
                            <param>**/*.gz</param>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-file-header</id>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>check-file-header</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>add-license</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>update-project-license</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>se.jguru.nazgul.tools.codestyle</groupId>
                            <artifactId>nazgul-codestyle</artifactId>
                            <version>6.0.2</version>
                        </dependency>
                    </dependencies>
                </plugin>


                <!--
                    Use a working version of the Maven versions plugin.

                    Why:  Workaround for https://jira.codehaus.org/browse/MVERSIONS-236
                    Used: Only when called.
                -->
                <plugin>
                    <groupId>de.lgohlke.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin.version}</version>
                </plugin>

                <!--
                    Define the version of the maven-gpg-plugina
                -->
                <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>

                <!--
                    Generate maven dependencies listing file
                 -->
                <plugin>
                    <groupId>org.apache.servicemix.tooling</groupId>
                    <artifactId>depends-maven-plugin</artifactId>
                    <version>1.3.1</version>
                </plugin>

                <!--
                    Use the site-maven-plugin which works with GitHub site deployments.

                    Why:  GitHub-based site deployment is done by committing into the branch gh-pages.
                    Used: Only at release time.
                -->
                <plugin>
                    <groupId>com.github.github</groupId>
                    <artifactId>site-maven-plugin</artifactId>
                    <version>0.12</version>
                    <configuration>
                        <message>Creating site for version ${project.version}</message>
                        <noJekyll>true</noJekyll>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>

            <!-- Attach a source jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Check codestyle, part 1: Checkstyle -->
            <plugin>
                <!-- groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId -->
                <groupId>se.jguru.nazgul.tools.plugin.checkstyle</groupId>
                <artifactId>nazgul-tools-checkstyle-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>verify</id>
                        <phase>${check.plugins.phase}</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Check codestyle, part 2: PMD -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Check codestyle, part 3: Findbugs -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Fix project license documents -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-file-header</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>update-file-header</goal>
                            <goal>update-project-license</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Compile the code -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <!-- Enforce not importing incorrect projects. -->
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                    <execution>
                        <id>enforce-imports</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <fail>${breakOnFailure.enforcer}</fail>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.0.5,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${jdk.version}</version>
                                </requireJavaVersion>
                                <requireUpperBoundDeps />

                                <!--
                                    Enforce the ProjectType structure, implying that all projects
                                    must comply with the project template definitions.
                                -->
                                <validateProjectTypes implementation="se.jguru.nazgul.tools.codestyle.enforcer.rules.ValidateProjectType" />

                                <!--
                                    Enforce the implementation rules for dependencies, to enforce that
                                    the level of dependency tanglement is not increased. This implies that
                                    implementation projects cannot import other implementation projects (but
                                    instead should import APIs).

                                    While the configuration below reflect the default settings, it is
                                    reproduced her to serve as an example of how to configure this enforcement rule
                                    in child reactors - where needs are likely different than here.
                                -->
                                <restrictImplDependencies implementation="se.jguru.nazgul.tools.codestyle.enforcer.rules.RestrictImplDependencies">
                                    <includedGroupIdPatterns>${enforcer.includedGroupIdPatterns}
                                    </includedGroupIdPatterns>
                                    <excludedGroupIdPatterns>${enforcer.excludedGroupIdPatterns}
                                    </excludedGroupIdPatterns>
                                </restrictImplDependencies>

                                <!--
                                    Enforce using correct packages for classes within a NSC project.
                                    The root package of any project should be identical to its groupId.
                                    Any package below the root package can safely be used - so ...

                                    if the groupId of a project is "com.acme.foobar",
                                    then all code within that project must reside within the "com.acme.foobar" package,
                                    or in any subpackage thereof.
                                -->
                                <correctPackaging implementation="se.jguru.nazgul.tools.codestyle.enforcer.rules.CorrectPackagingRule" />
                            </rules>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>se.jguru.nazgul.tools.codestyle</groupId>
                        <artifactId>nazgul-codestyle</artifactId>
                        <version>6.0.2</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Generate maven dependencies listing file -->
            <plugin>
                <groupId>org.apache.servicemix.tooling</groupId>
                <artifactId>depends-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-depends-file</id>
                        <goals>
                            <goal>generate-depends-file</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--
                Define the version of the Build-Helper maven plugin.
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.10</version>
            </plugin>

            <!-- Analyze dependencies for usage within the project -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <!--
                                Don't break the build if we have unused dependencies.
                                Since we cannot exclude the global Aspect libraries from
                                breaking the build (they should be available as a compile-
                                scope dependency), we can only provide a warning about
                                unused dependencies.
                             -->
                            <failOnWarning>false</failOnWarning>

                            <!-- Only deal with compile-scope dependencies -->
                            <ignoreNonCompile>true</ignoreNonCompile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Produce an OSGi-compliant MANIFEST.MF file. -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Generate png images from Plantuml source files. -->
            <plugin>
                <groupId>com.github.jeluard</groupId>
                <artifactId>plantuml-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-plantuml-diagrams</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <phase>pre-site</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <outputDirectory>${project.build.directory}/site</outputDirectory>

        <plugins>

            <!--
                 Due to problems in the Maven 3 site plugin you must enter the configuration twice,
                 once for the pluginManagement section and once for site reporting.
            -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven-project-info-reports-plugin.version}</version>
                <configuration>
                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>

            <!--
                Configure the javadoc plugin not to fail on standard HTML
                constructs when building using JDK 8.

                Typical standard constructs include empty tags, like: <p />
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <stylesheet>java</stylesheet>
                    <groups>
                        <group>
                            <title>Nazgul Framework: Tools Packages</title>
                            <packages>se.jguru.nazgul.tools.*</packages>
                        </group>
                        <group>
                            <title>Nazgul Framework: Core Packages</title>
                            <packages>se.jguru.nazgul.core.*</packages>
                        </group>
                        <group>
                            <title>Nazgul Framework: Test Artifact Packages</title>
                            <packages>se.jguru.nazgul.test.*</packages>
                        </group>
                    </groups>
                    <!-- doclet>org.jboss.apiviz.APIviz</doclet>
                    <docletArtifact>
                        <groupId>com.grahamedgecombe.apiviz</groupId>
                        <artifactId>apiviz</artifactId>
                        <version>${apiviz.version}</version>
                    </docletArtifact -->
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                    <charset>${project.build.sourceEncoding}</charset>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <docencoding>${project.build.sourceEncoding}</docencoding>
                    <breakiterator>true</breakiterator>
                    <version>true</version>
                    <author>true</author>
                    <keywords>true</keywords>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.5</version>
            </plugin>

            <!--
                 Due to problems in the Maven 3 site plugin you must enter the configuration twice,
                 once for the pluginManagement section and once for the site, see
                 http://jira.codehaus.org/browse/MSITE-516 and http://jira.codehaus.org/browse/MSITE-523
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${pmd.plugin.version}</version>
                <reportSets>
                    <reportSet>
                        <id>pmd-reports</id>
                        <reports>
                            <report>pmd</report>
                            <report>cpd</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <excludes>
                        <exclude>**/generated/**/*</exclude>
                        <exclude>**/grammars/**/*</exclude>
                    </excludes>
                    <rulesets>
                        <ruleset>${pmd.ruleset}</ruleset>
                    </rulesets>
                    <targetJdk>${jdk.version}</targetJdk>
                    <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                </configuration>
            </plugin>

            <!--
                 Due to problems in the Maven 3 site plugin you must enter the configuration twice,
                 once for the pluginManagement section and once for the site, see
                 http://jira.codehaus.org/browse/MSITE-516 and http://jira.codehaus.org/browse/MSITE-523

                 Cannot use checkstyle reports until https://github.com/apache/maven-plugins/pull/88
                 is merged into the maven-checkstyle-plugin codebase. (Or until we publish a stable-version
                 clone with changed GroupID for internal use).
            -->
            <plugin>
                <!-- groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.plugin.version}</version -->
                <groupId>se.jguru.nazgul.tools.plugin.checkstyle</groupId>
                <artifactId>nazgul-tools-checkstyle-maven-plugin</artifactId>
                <version>6.0.2</version>
                <configuration>
                    <configLocation>${checkstyle.config.location}</configLocation>
                    <suppressionsFile>${checkstyle.suppressions.location}</suppressionsFile>
                    <failOnViolation>${breakOnFailure.checkstyle}</failOnViolation>
                    <violationSeverity>${checkstyle.violationSeverity}</violationSeverity>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>checkstyle-report</id>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <!--
                 Due to problems in the Maven 3 site plugin you must enter the configuration twice,
                 once for the pluginManagement section and once for the site, see
                 http://jira.codehaus.org/browse/MSITE-516 and http://jira.codehaus.org/browse/MSITE-523
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.plugin.version}</version>
                <configuration>
                    <threshold>High</threshold>
                    <effort>Default</effort>
                    <onlyAnalyze>${findbugs.only.analyze}</onlyAnalyze>
                    <includeFilterFile>${findbugs.includeFilterFile}</includeFilterFile>
                    <excludeFilterFile>${findbugs.excludeFilterFile}</excludeFilterFile>
                    <relaxed>false</relaxed>
                    <findbugsXmlOutput>true</findbugsXmlOutput>
                    <xmlOutput>true</xmlOutput>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>findbugs</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>de.lgohlke.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>${versions-maven-plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>

    <!--
    ################################################
    # Section 4:  External systems
    ################################################
    -->

    <!--
        Define the Continuous Build server address.
    -->
    <ciManagement>
        <system>TravisCI</system>
        <url>https://travis-ci.org/lennartj/nazgul_tools</url>
    </ciManagement>

    <!--
        Define the issue management system.
    -->
    <issueManagement>
        <system>github</system>
        <url>https://github.com/lennartj/nazgul_tools/issues</url>
    </issueManagement>

    <!--
        Define repository settings for Maven's deploy and release plugins.
        Move parts to settings.xml, as per recommendation within Maven specs.
    -->
    <distributionManagement>
        <repository>
            <id>ossrh-staging</id>
            <name>Sonatype OSS Nexus: Releases</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>ossrh-snapshots</id>
            <name>Sonatype OSS Nexus: Snapshots</name>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <site>
            <id>github_site</id>
            <name>GitHub Site for Nazgul Tools</name>
            <url>${site.top.url}/${path.in.reactor}</url>
        </site>
    </distributionManagement>

    <!--
        Define connections for Maven's VCS integration.
    -->
    <scm>
        <connection>${scm.connection.url}</connection>
        <developerConnection>${scm.devConnection.url}</developerConnection>
        <url>${scm.url}</url>
        <tag>nazgul-tools-6.0.2</tag>
    </scm>

    <!--
    ################################################
    # Section 5:  Profiles
    ################################################
    -->
    <profiles>

        <!--
            Release profile for Nazgul Reactors.
        -->
        <profile>
            <id>nazgul-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <updateReleaseInfo>true</updateReleaseInfo>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-jar-no-fork</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <failOnError>false</failOnError>
                        </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>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <configuration>
                            <message>Creating site for version ${project.version}</message>
                            <noJekyll>true</noJekyll>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                        </executions>
                    </plugin -->
                </plugins>
            </build>
        </profile>

        <!--
            Purpose:    Skip deploy step for dryRun
        -->
        <profile>
            <id>release.dryRun</id>
            <activation>
                <property>
                    <name>dryRun</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven.release.plugin.version}</version>
                        <configuration>
                            <mavenExecutorId>forked-path</mavenExecutorId>
                            <preparationGoals>-B clean install</preparationGoals>
                            <localCheckout>true</localCheckout>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!--
            Purpose:    Turn off the checks of the code quality plugins [findbugs, checkstyle, pmd].
        -->
        <profile>
            <id>skipVerifyCode</id>
            <activation>
                <property>
                    <name>skipVerifyCode</name>
                </property>
            </activation>
            <properties>
                <skip.verify.code>true</skip.verify.code>
            </properties>
        </profile>
    </profiles>
</project>
