<?xml version="1.0" encoding="UTF-8"?>
<!--                                                                           -->
<!--  Copyright 2013 Xebia and Séven Le Mesle                                  -->
<!--                                                                           -->
<!--  Licensed under the Apache License, Version 2.0 (the "License");          -->
<!--  you may not use this file except in compliance with the License.         -->
<!--  You may obtain a copy of the License at                                  -->
<!--                                                                           -->
<!--           http://www.apache.org/licenses/LICENSE-2.0                      -->
<!--                                                                           -->
<!--  Unless required by applicable law or agreed to in writing, software      -->
<!--  distributed under the License is distributed on an "AS IS" BASIS,        -->
<!--  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!--  See the License for the specific language governing permissions and      -->
<!--  limitations under the License.                                           -->
<!--                                                                           -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>fr.xebia.extras</groupId>
    <artifactId>selma-parent</artifactId>
    <packaging>pom</packaging>
    <version>0.13</version>
    <description>Mapping converter utility</description>
    <scm>
        <connection>scm:git:git@github.com:xebia-france/selma.git</connection>
        <developerConnection>scm:git:git@github.com:xebia-france/selma.git</developerConnection>
        <url>https://github.com/xebia-france/selma</url>
    </scm>
    <developers>
        <developer>
            <id>1</id>
            <name>Séven Le Mesle</name>
            <email>slemesle@xebia.fr</email>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <modules>
        <module>processor</module>
        <module>selma</module>
        <module>examples</module>
        <module>examples-common</module>
    </modules>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.10</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.9.5</version>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <testSource>6</testSource>
                    <testTarget>6</testTarget>
                    <source>6</source>
                    <target>6</target>
                    <encoding>UTF-8</encoding>
                    <!--<compilerArgument>-Xlint:unchecked</compilerArgument>-->
                    <showWarnings>true</showWarnings>
                    <optimize>true</optimize>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.16</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- Sets the VM argument line used when unit tests are run. -->
                    <argLine>${failsafeArgLine}</argLine>
                    <forkMode>${failsafe.fork.mode}</forkMode>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.0.201403182114</version>
                <executions>
                    <!-- The Executions required by unit tests are omitted. -->
                    <!--
                       Prepares the property pointing to the JaCoCo runtime agent which
                       is passed as VM argument when Maven the Failsafe plugin is executed.
                   -->
                    <execution>
                        <id>pre-integration-test</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->
                            <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
                            <!--
                               Sets the name of the property containing the settings
                               for JaCoCo runtime agent.
                           -->
                            <propertyName>failsafeArgLine</propertyName>
                        </configuration>
                    </execution>
                    <!--
                       Ensures that the code coverage report for integration tests after
                       integration tests have been run.
                   -->
                    <execution>
                        <id>post-integration-test</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->
                            <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
                            <!-- Sets the output directory for the code coverage report. -->
                            <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>debug</id>
            <properties>
                <failsafe.fork.mode>never</failsafe.fork.mode>
            </properties>
        </profile>
    </profiles>
    <properties>
        <failsafe.fork.mode>once</failsafe.fork.mode>
    </properties>
</project>