<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ #%L
  ~ nazgul-tools-validation-api
  ~ %%
  ~ Copyright (C) 2010 - 2014 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>se.jguru.nazgul.tools.poms</groupId>
        <artifactId>nazgul-tools-parent</artifactId>
        <version>4.0.2</version>
        <relativePath>../../poms/tools-parent</relativePath>
    </parent>

    <groupId>se.jguru.nazgul.tools.validation.aspect</groupId>
    <artifactId>nazgul-tools-validation-aspect</artifactId>
    <name>${project.artifactId}</name>
    <url>${url.prefix}/${path.in.reactor}</url>

    <properties>
        <path.in.reactor>validation/validation-aspect</path.in.reactor>
    </properties>

    <!--
    ################################################
    # Section 2:  Dependencies
    ################################################
    -->
    <dependencies>

        <!--
            Internal dependencies
        -->
        <dependency>
            <groupId>se.jguru.nazgul.tools.validation.api</groupId>
            <artifactId>nazgul-tools-validation-api</artifactId>
            <version>4.0.2</version>
        </dependency>

        <!--
            External dependencies
        -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

            <!-- Cobertura cannot weave classes woven with AspectJ -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${cobertura.plugin.version}</version>
                <configuration>
                    <instrumentation>
                        <includes>
                            <include>some/nonexistent/**/*.class</include>
                        </includes>
                    </instrumentation>
                    <check>
                        <branchRate>65</branchRate>
                        <lineRate>80</lineRate>
                        <haltOnFailure>${cobertura.haltOnFailure}</haltOnFailure>
                    </check>
                </configuration>
            </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>
                    <!--
                       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>
                </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>aspectjrt</artifactId>
                        <version>${aspectj.runtime.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>${aspectj.runtime.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>{local-packages}</Export-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>${aspectj-maven-plugin.version}</version>
                <configuration>
                    <verbose>true</verbose>
                    <privateScope>true</privateScope>
                    <detail>true</detail>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>aspectj-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

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

    <!--
        Define settings for Maven's site plugin.
    -->
    <distributionManagement>
        <site>
            <id>jGuru_NazgulToolsSite</id>
            <name>jGuru_NazgulToolsSite</name>
            <url>${distro.url.prefix}/${path.in.reactor}</url>
        </site>
    </distributionManagement>

    <!--
       Define connections for Maven's Mercurial integration.
    -->
    <scm>
        <connection>${scm.url.prefix}/${reactor.name}</connection>
        <developerConnection>${scm.url.prefix}/${reactor.name}</developerConnection>
        <url>${reactor.url.remote.prefix}/${reactor.name}</url>
        <tag>nazgul-tools-4.0.2</tag>
    </scm>
</project>
