<?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.api</groupId>
    <artifactId>nazgul-tools-validation-api</artifactId>    
    <name>${project.artifactId}</name>
    <url>${url.prefix}/${path.in.reactor}</url>

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

    <!--
    ################################################
    # Section 2:  Dependency (management) settings
    ################################################
    -->
    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!--
    ################################################
    # Section 3:  Build settings
    ################################################
    -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${cobertura.plugin.version}</version>
                <configuration>
                    <instrumentation>
                        <includes>
                            <include>se/jguru/nazgul/tools/validation/**/*.class</include>
                        </includes>
                        <excludes>

                            <!-- Don't check Exception classes -->
                            <exclude>se/jguru/nazgul/**/*Exception.class</exclude>

                            <!-- Don't weave aspects already woven by AspectJ. -->
                            <exclude>se/jguru/nazgul/tools/validation/aspect/**/*Aspect.class</exclude>

                        </excludes>
                    </instrumentation>
                    <check>
                        <branchRate>65</branchRate>
                        <lineRate>80</lineRate>
                        <haltOnFailure>${cobertura.haltOnFailure}</haltOnFailure>
                    </check>
                </configuration>
            </plugin>

            <!--
                Note! AspectJ and Cobertura plugins clash WRT instrumentation of test classes.
                Therefore, one must remove the overall test-compile goal from this (global)
                AspectJ plugin definition, and overwrite this plugin definition (using the
                here commented-out test-compile goal) in projects where weaving is required in
                the testcases.

                When overriding this plugin definition in subprojects, you should likely be
                required to override Cobertura's exclude definitions for certain inner classes
                as well.

                // Lennart, 2011-06-27
            -->
            <!-- plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <configuration>
                    <XaddSerialVersionUID>true</XaddSerialVersionUID>
                    <showWeaveInfo>true</showWeaveInfo>
                </configuration>
            </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>

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