<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!-- +=============================================== -->
    <!-- | Section 1:  Project information                -->
    <!-- +=============================================== -->
    <parent>
        <groupId>se.jguru.nazgul.core.poms.core-parent</groupId>
        <artifactId>nazgul-core-parent</artifactId>
        <version>3.0.0</version>
        <relativePath />
    </parent>

    <groupId>se.mithlond.codestyle.poms</groupId>
    <artifactId>mithlond-codestyle-parent</artifactId>
    <version>2.1.0</version>
    <name>${project.artifactId}</name>
    <packaging>pom</packaging>
    <url>${site.top.url}/${path.in.reactor}</url>
    <description>Mithlond Codestyle: Artifact POM Parent.</description>

    <organization>
        <name>Mithlond</name>
        <url>http://www.mithlond.se</url>
    </organization>
    <inceptionYear>2015</inceptionYear>

    <developers>
        <developer>
            <id>lj</id>
            <name>Lennart Jörelid</name>
            <email>lennart.jorelid@gmail.com</email>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
    </developers>

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

    <properties>
        <!--
            Define the name and type of this reactor
        -->
        <path.in.reactor>poms/mithlond-codestyle-parent</path.in.reactor>
        <reactor.name>mithlond-codestyle</reactor.name>
        <organisation.name>Mithlond</organisation.name>

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

        <!--
            Define the URL prefixes for Site Deployment and DistributionManagement.
            These can be overridden in sub-reactors to tailor releases to other locations.
        -->
        <issue.mgmnt.url>${organisation.url.prefix}/${reactor.name}/issues</issue.mgmnt.url>
        <scm.connection.url>scm:git:${organisation.url.prefix}/${reactor.name}.git</scm.connection.url>
        <scm.devConnection.url>${git.url.prefix}/${reactor.name}.git</scm.devConnection.url>
        <distroManagement.url>${site.top.url}/${path.in.reactor}</distroManagement.url>
        <scm.url>${organisation.url.prefix}/${reactor.name}.git</scm.url>
        <site.staging.localDirectory>/tmp/${reactor.name}/${project.version}</site.staging.localDirectory>

        <!-- Build controlling constants -->
        <checkstyle.config.location>codestyle/mithlond-checkstyle.xml</checkstyle.config.location>
        <checkstyle.suppressions.location>codestyle/mithlond-checkstyle-suppressions.xml</checkstyle.suppressions.location>

        <!-- Version constants -->
        <nazgul-core.version>3.0.0</nazgul-core.version>
        <logback.version>1.2.3</logback.version>
        <aspectj-maven-plugin.version>1.11</aspectj-maven-plugin.version>
        <aspectj.runtime.version>1.9.2</aspectj.runtime.version>
        <findbugs.plugin.version>3.0.0</findbugs.plugin.version>
        <cobertura.plugin.version>2.7</cobertura.plugin.version>
        <checkstyle.version>7.0</checkstyle.version>
        <pmd.plugin.version>3.6</pmd.plugin.version>
        <maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>
        <eclipselink.version>2.7.3</eclipselink.version>
        <doxia-module.version>1.8</doxia-module.version>
        <wagon.version>3.2.0</wagon.version>

        <!-- Build time constants -->
        <timestamp>${maven.build.timestamp}</timestamp>
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss.sssZ</maven.build.timestamp.format>
    </properties>

    <!-- +=============================================== -->
    <!-- | Section 2:  Dependency (management) settings   -->
    <!-- +=============================================== -->
    <dependencyManagement>
        <dependencies>
            <!-- Java EE API dependencies -->
            <dependency>
                <groupId>javax</groupId>
                <artifactId>javaee-api</artifactId>
                <version>8.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>2.0.1.Final</version>
                <scope>provided</scope>
            </dependency>

            <!-- Nazgul Core dependencies -->
            <dependency>
                <groupId>se.jguru.nazgul.core.algorithms.api</groupId>
                <artifactId>nazgul-core-algorithms-api</artifactId>
                <version>${nazgul-core.version}</version>
            </dependency>
            <dependency>
                <groupId>se.jguru.nazgul.core.algorithms.launcher.api</groupId>
                <artifactId>nazgul-core-launcher-api</artifactId>
                <version>${nazgul-core.version}</version>
            </dependency>
            <dependency>
                <groupId>se.jguru.nazgul.core.reflection.api</groupId>
                <artifactId>nazgul-core-reflection-api</artifactId>
                <version>${nazgul-core.version}</version>
            </dependency>
            <dependency>
                <groupId>se.jguru.nazgul.core.persistence.model</groupId>
                <artifactId>nazgul-core-persistence-model</artifactId>
                <version>${nazgul-core.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>se.jguru.nazgul.core.persistence.api</groupId>
                <artifactId>nazgul-core-persistence-api</artifactId>
                <version>${nazgul-core.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.ejb</groupId>
                        <artifactId>javax.ejb-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>se.jguru.nazgul.core.xmlbinding.spi.jaxb</groupId>
                <artifactId>nazgul-core-xmlbinding-spi-jaxb</artifactId>
                <version>${nazgul-core.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.xml.bind</groupId>
                        <artifactId>jaxb-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-impl</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.glassfish.jaxb</groupId>
                        <artifactId>jaxb-runtime</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>se.jguru.nazgul.test.xmlbinding</groupId>
                <artifactId>nazgul-core-xmlbinding-test</artifactId>
                <version>${nazgul-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>se.jguru.nazgul.test.persistence</groupId>
                <artifactId>nazgul-core-persistence-test</artifactId>
                <version>${nazgul-core.version}</version>
                <scope>test</scope>
            </dependency>

            <!--
                Logback dependencies.
            -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
                <scope>runtime</scope>
            </dependency>

            <!--
                Db Drivers
            -->
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.2.5</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>2.4.1</version>
                <scope>test</scope>
            </dependency>

            <!--
                AspectJ Dependencies
            -->
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjweaver</artifactId>
                <version>${aspectj.runtime.version}</version>
            </dependency>
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjrt</artifactId>
                <version>${aspectj.runtime.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>eclipselink</artifactId>
                <version>${eclipselink.version}</version>
                <scope>provided</scope>
                <!-- exclusions>
                    <exclusion>
                        <groupId>org.eclipse.persistence</groupId>
                        <artifactId>javax.persistence</artifactId>
                    </exclusion>
                </exclusions -->
            </dependency>

            <dependency>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>javax.persistence</artifactId>
                <version>2.2.1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- +=============================================== -->
    <!-- | Section 3:  Build settings                     -->
    <!-- +=============================================== -->
    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
            </resource>
            <resource>
                <directory>${project.build.directory}/jaxb2/transformed</directory>
                <includes>
                    <include>**/*.xsd</include>
                </includes>
            </resource>
        </resources>

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

                    Why:  Validates the codestyle.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>se.jguru.nazgul.tools.plugin.checkstyle</groupId>
                    <artifactId>nazgul-tools-checkstyle-maven-plugin</artifactId>
                    <version>6.0.3</version>
                    <configuration>
                        <skip>${skip.verify.code}</skip>
                        <configLocation>${checkstyle.config.location}</configLocation>
                        <excludes>${checkstyle.excludes}</excludes>
                        <suppressionsLocation>${checkstyle.suppressions.location}</suppressionsLocation>
                        <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.mithlond.codestyle.codestyle</groupId>
                            <artifactId>mithlond-codestyle</artifactId>
                            <version>2.1.0</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Configures the release plugin version.
                    Also ensures that the default release profile is not used.
                    (The mithlond-release profile should be used instead).

                    Why:  Release artifacts
                    Used: Normal lifecycle, release goal
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <!--
                            Do not perform site deployment when releasing.
                         -->
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <goals>deploy</goals>
                        <useReleaseProfile>false</useReleaseProfile>
                        <arguments>-Pmithlond-release</arguments>
                    </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>3.5.1</version>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </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 defining the license
                    specifics.

                    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>
                        <detail>true</detail>
                        <roots>
                            <root>${project.basedir}/src/main</root>
                            <root>${project.basedir}/src/test</root>
                            <root>${project.basedir}/src/site</root>
                        </roots>
                        <excludes>
                            <exclude>*.png</exclude>
                            <exclude>*.js</exclude>
                            <exclude>*.json</exclude>
                            <exclude>**/*.json</exclude>
                            <exclude>*.min.js</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-file-header</id>
                            <phase />
                            <goals>
                                <goal>check-file-header</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>add-license</id>
                            <phase />
                            <goals>
                                <goal>update-project-license</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>se.jguru.nazgul.tools.codestyle</groupId>
                            <artifactId>nazgul-codestyle</artifactId>
                            <version>${nazgul.tools.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    The assembly plugin is used to create a jar-with-dependencies for arbitrary projects.
                    The jar-with-dependencies is not automatically added as an artifact to the existing project.
                    If the jar-with-dependencies should be added, use the build-helper-maven-plugin.

                    Why:  Creates a jar-with-dependencies compound JAR.
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.6</version>
                    <executions>
                        <execution>
                            <id>make-assembly</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <useJvmChmod>true</useJvmChmod>
                                <descriptorRefs>
                                    <descriptorRef>jar-with-dependencies</descriptorRef>
                                </descriptorRefs>
                                <archive>
                                    <manifest>
                                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                        <addClasspath>false</addClasspath>
                                    </manifest>
                                </archive>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!--
                    The assembly plugin is used to create a jar-with-dependencies for arbitrary projects.
                    The jar-with-dependencies is not automatically added as an artifact to the existing project.
                    If the jar-with-dependencies should be added, use the build-helper-maven-plugin.

                    Why:  Creates a build timestamp property. Configure attaching a jar-with-dependencies
                          artifact to the project (but does not by default attach it).
                    Used: Standard lifecycle, mvn package.
                -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.12</version>
                    <executions>
                        <execution>
                            <id>attach-artifacts</id>
                            <phase />
                            <goals>
                                <goal>attach-artifact</goal>
                            </goals>
                            <configuration>
                                <artifacts>
                                    <artifact>
                                        <file>
                                            ${project.build.directory}/${project.build.finalName}-jar-with-dependencies.jar
                                        </file>
                                        <classifier>jar-with-dependencies</classifier>
                                        <type>jar</type>
                                    </artifact>
                                </artifacts>
                            </configuration>
                        </execution>
                        <execution>
                            <id>timestamp-property</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>timestamp-property</goal>
                            </goals>
                            <configuration>
                                <name>timestamp</name>
                                <pattern>${maven.build.timestamp.format}</pattern>
                                <locale>sv_SE</locale>
                                <timeZone>Europe/Stockholm</timeZone>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!--
                    Configures the Maven changes plugin to run only when executed from the project root directory.

                    Why:  Release artifacts
                    Used: Normal lifecycle, site goal
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-changes-plugin</artifactId>
                    <version>2.12</version>
                    <configuration>
                        <issueManagementSystems>
                            <issueManagementSystem>GitHub</issueManagementSystem>
                        </issueManagementSystems>
                        <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                    </configuration>
                </plugin>

                <!--
                    Configures the Maven changes plugin to publish the site to a
                    well-defined directory which includes its version.

                    Why:  Publish maven site documentation on GitHub Pages.
                    Used: Release lifecycle, site goal
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-publish-plugin</artifactId>
                    <version>1.1</version>
                    <configuration>
                        <pubScmUrl>${scm.devConnection.url}</pubScmUrl>
                        <scmBranch>gh-pages</scmBranch>
                    </configuration>
                </plugin>

                <!--
                   Configures the site plugin. Its use is further documented in the site documentation itself.

                   Why:  Make compile and publish the site documentation.
                   Used: Site lifecycle, mvn site.
               -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                    <executions>
                        <execution>
                            <id>attach-descriptor</id>
                            <goals>
                                <goal>attach-descriptor</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                    <configuration combine.self="override">
                        <topSiteURL>${site.top.url}</topSiteURL>
                        <stagingSiteURL>${project.url}</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.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-file</artifactId>
                            <version>${wagon.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-markdown</artifactId>
                            <version>${doxia-module.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-xhtml</artifactId>
                            <version>${doxia-module.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>

            <plugin>
                <groupId>org.codehaus.sonar</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>5.1</version>
            </plugin>

            <!--
                Configures the site plugin. Its use is further documented in the site documentation itself.

                Why:  Make compile and publish the site documentation.
                Used: Site lifecycle, mvn site.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </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.8</version>
                <executions>
                    <execution>
                        <id>check-file-header</id>
                        <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>${nazgul.tools.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!--
                Use the bundle plugin to create an OSGi-enabled Manifest.
            -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>4.1.0</version>
                <extensions>true</extensions>
            </plugin>

            <!--
                Use the dependency plugin to copy the OpenJPA runtime
                to the target directory.
            -->
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.openjpa</groupId>
                                    <artifactId>openjpa</artifactId>
                                    <version>${openjpa.version}</version>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>openjpa.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!--
                Configure the Surefire plugin to run all JPA unit tests
                with the OpenJPA javaagent enabled
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <disableXmlReport>false</disableXmlReport>
                    <forkMode>pertest</forkMode>
                    <!-- argLine>-javaagent:${basedir}/target/openjpa.jar -Dfile.encoding=UTF-8</argLine -->
                </configuration>
            </plugin>

            <!--
                Use the latest jaxb2-maven-plugin to provide XSD generation abilities
                for the model projects.
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <outputDirectory>${project.build.directory}/jaxb2/transformed/generated-schema</outputDirectory>
                    <transformSchemas>
                        <!--
                            Each schema element defines:

                            a) A <<namespace uri>> for one of your namespaces.
                               This namespace uri must be unique within the schemas element.

                            b) A <<toPrefix>> that you want to use for the namespace.
                               Should not contain whitespace or exotic characters.
                               This yields a namespace definition on the form
                               <xs:schema ... xmlns:[toPrefix]="[uri]" ... />

                               (I.e: <xs:schema ... xmlns:some="http://some/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"> )

                               ... and transforms relevant xml schema elements to use the provided namespace prefix:

                               <some:elementName ... />

                            c) The desired <<toFile>> name of the generated XML schema definition file,
                               excluding the ".xsd" suffix (which will be added automatically).
                        -->
                        <transformSchema>
                            <uri>http://www.jguru.se/nazgul/core</uri>
                            <!-- toPrefix>core</toPrefix -->
                            <toFile>NazgulCore.xsd</toFile>
                        </transformSchema>
                        <transformSchema>
                            <uri>http://www.mithlond.se/dataexchange</uri>
                            <!-- toPrefix>dataexchange</toPrefix -->
                            <toFile>dataexchange.xsd</toFile>
                        </transformSchema>
                    </transformSchemas>
                </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>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.0.4,)</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
                                    API, MODEL and SPI projects do not import projects of types
                                    APPLICATION, TEST, POC o IMPLEMENTATION.

                                    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>^se\\.mithlond\\..*</includedGroupIdPatterns>
                                    <excludedGroupIdPatterns>
                                        ^se\\.mithlond\\..*\\.generated\\..*,^se\\.mithlond\\.codestyle\\..*
                                    </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>${nazgul.tools.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>timestamp-property</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>timestamp-property</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>${aspectj-maven-plugin.version}</version>
                <configuration>
                    <complianceLevel>${jdk.version}</complianceLevel>
                    <includes>
                        <include>**/*.java</include>
                        <include>**/*.aj</include>
                    </includes>
                    <aspectDirectory>src/main/aspect</aspectDirectory>
                    <testAspectDirectory>src/test/aspect</testAspectDirectory>
                    <!--
                       This option causes the JoinPoint.getStaticPart() to
                       sometimes return null - which crashes all Aspects relying
                       on JoinPoint static information.... such as the ValidationAspect.

                       Yes - it is a bug in AspectJ.
                       // Lennart, 2011-07-23
                    -->
                    <XaddSerialVersionUID>true</XaddSerialVersionUID>
                    <showWeaveInfo>true</showWeaveInfo>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>se.jguru.nazgul.tools.validation.aspect</groupId>
                            <artifactId>nazgul-tools-validation-aspect</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                </configuration>
                <executions>
                    <execution>
                        <id>compile_with_aspectj</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile_with_aspectj</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>${aspectj.runtime.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>se.jguru.nazgul.tools.validation.aspect</groupId>
                        <artifactId>nazgul-tools-validation-aspect</artifactId>
                        <version>${nazgul.tools.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven-project-info-reports-plugin.version}</version>
                <!-- reportSets>
                    <reportSet>
                        <reports>
                            <report>cim</report>
                            <report>cobertura</report>
                            <report>dependency-info</report>
                            <report>index</report>
                            <report>issue-tracking</report>
                            <report>mailing-list</report>
                            <report>project-team</report>
                            <report>scm</report>
                            <report>summary</report>
                        </reports>
                    </reportSet>
                </reportSets -->
            </plugin>

            <!--
                Generate a Cobertura Report.
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${cobertura.plugin.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>cobertura</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <!--
                Generate a Surefire Report.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <!-- +=============================================== -->
    <!-- | Section 4:  External systems                   -->
    <!-- +=============================================== -->

    <!--
       Define connections for Maven's VCS integration.
    -->
    <scm>
        <connection>${scm.connection.url}</connection>
        <developerConnection>${scm.devConnection.url}</developerConnection>
        <url>${scm.url}</url>
        <tag>mithlond-codestyle-2.1.0</tag>
    </scm>

    <ciManagement>
        <system>Travis</system>
        <url>https://travis-ci.org/Mithlond/${reactor.name}</url>
    </ciManagement>

    <!--
        Define the issue management system.
    -->
    <issueManagement>
        <system>github</system>
        <url>${issue.mgmnt.url}</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>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>ossrh-snapshots</id>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <site>
            <id>github</id>
            <url>${distroManagement.url}</url>
        </site>
    </distributionManagement>

    <!-- +=============================================== -->
    <!-- | Section 5:  Profiles                           -->
    <!-- +=============================================== -->
    <profiles>
        <profile>
            <id>mithlond-release</id>
            <build>
                <plugins>
                    <!-- plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.apache.resources</groupId>
                                <artifactId>apache-source-release-assembly-descriptor</artifactId>
                                <version>1.0.4</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <id>attach-source-release-distro</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                                    <descriptorRefs>
                                        <descriptorRef>source-release</descriptorRef>
                                    </descriptorRefs>
                                    <tarLongFileFormat>gnu</tarLongFileFormat>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin -->
                    <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>
                        <version>3.0.1</version>
                        <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>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
