<?xml version="1.0"?>
<!--

    Copyright 2005-2017 Dozer Project

    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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.github.dozermapper</groupId>
        <artifactId>dozer-parent</artifactId>
        <version>6.0.0</version>
        <relativePath>../</relativePath>
    </parent>

    <artifactId>dozer-plugins-parent</artifactId>
    <packaging>pom</packaging>
    <name>Dozer :: Plugins Parent</name>

    <properties>
        <bom-dependencies-version>6.0.0</bom-dependencies-version>

        <!-- Maven Plugins versions; alphabetical order -->
        <alta-maven-plugin.version>0.5</alta-maven-plugin.version>
        <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
        <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
        <maven-pdf-plugin.version>1.3</maven-pdf-plugin.version>
        <maven-project-info-reports-plugin.version>2.9</maven-project-info-reports-plugin.version>
        <maven-scm-plugin.version>1.9.5</maven-scm-plugin.version>
        <maven-site-plugin.version>3.6</maven-site-plugin.version>
        <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
        <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
        <maven-surefire-report-plugin.version>2.19.1</maven-surefire-report-plugin.version>

        <!-- Codehaus Plugins versions; alphabetical order -->
        <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
        <cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
        <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
        <findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
        <jaxb2-maven-plugin.version>2.3.1</jaxb2-maven-plugin.version>
        <xmlbeans-maven-plugin.version>2.3.3</xmlbeans-maven-plugin.version>

        <!-- OSGi Plugins versions; alphabetical order -->
        <maven-bundle-plugin.version>3.2.0</maven-bundle-plugin.version>
        <depends-maven-plugin.version>1.3.1</depends-maven-plugin.version>

        <!-- Protobuf Plugins versions; alphabetical order -->
        <protobuf-maven-plugin.version>0.5.0</protobuf-maven-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.github.dozermapper</groupId>
                <artifactId>dozer-bom-dependencies</artifactId>
                <version>${bom-dependencies-version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Core Testing -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Maven Plugins; alphabetical order -->
                <plugin>
                    <groupId>com.github.veithen.alta</groupId>
                    <artifactId>alta-maven-plugin</artifactId>
                    <version>${alta-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven-checkstyle-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven-release-plugin.version}</version>
                    <configuration>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pdf-plugin</artifactId>
                    <version>${maven-pdf-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>${maven-scm-plugin.version}</version>
                    <configuration>
                        <tag>${project.artifactId}-${project.version}</tag>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>${maven-surefire-report-plugin.version}</version>
                </plugin>

                <!-- Codehaus Plugins; alphabetical order -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>${cobertura-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugs-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jaxb2-maven-plugin</artifactId>
                    <version>${jaxb2-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xmlbeans-maven-plugin</artifactId>
                    <version>${xmlbeans-maven-plugin.version}</version>
                </plugin>

                <!-- OSGi Plugins; alphabetical order -->
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven-bundle-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.servicemix.tooling</groupId>
                    <artifactId>depends-maven-plugin</artifactId>
                    <version>${depends-maven-plugin.version}</version>
                </plugin>

                <!-- Protobuf Plugins; alphabetical order -->
                <plugin>
                    <groupId>org.xolstice.maven.plugins</groupId>
                    <artifactId>protobuf-maven-plugin</artifactId>
                    <version>${protobuf-maven-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- Core Java Plugins; alphabetical order -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${project.java.version}</source>
                    <target>${project.java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <compilerArgs>
                        <compilerArg>-Xlint:all</compilerArg>
                        <compilerArg>-Xlint:-processing</compilerArg>
                        <compilerArg>-Xdoclint:all</compilerArg>
                        <!--<compilerArg>-Werror</compilerArg>-->
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <excludePackageNames>org.dozer.vo.jaxb.employee</excludePackageNames>
                    <failOnError>true</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-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Testing Plugins; alphabetical order -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <testClassesDirectory>target/test-classes</testClassesDirectory>
                    <excludes>
                        <exclude>**/Test*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <!-- Governance Plugins; alphabetical order -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                    <instrumentation>
                        <excludes>
                            <exclude>**/*Test.class</exclude>
                            <exclude>**/org/dozer/vo/*.class</exclude>
                        </excludes>
                    </instrumentation>
                    <formats>
                        <format>xml</format>
                        <format>html</format>
                    </formats>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.github.dozermapper</groupId>
                        <artifactId>building-tools</artifactId>
                        <version>${building-tools.version}</version>
                        <scope>compile</scope>
                    </dependency>
                </dependencies>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.github.dozermapper</groupId>
                        <artifactId>building-tools</artifactId>
                        <version>${building-tools.version}</version>
                        <scope>compile</scope>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>camel-checkstyle.xml</configLocation>
                            <suppressionsLocation>camel-checkstyle-suppressions.xml</suppressionsLocation>
                            <consoleOutput>true</consoleOutput>
                            <failOnViolation>true</failOnViolation>
                            <failsOnError>true</failsOnError>
                            <encoding>UTF-8</encoding>
                            <sourceDirectory>${basedir}/src</sourceDirectory>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <aggregate>true</aggregate>
                    <links>
                        <link>http://docs.oracle.com/javase/8/docs/api/index.html</link>
                    </links>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependencies</report>
                            <report>project-team</report>
                            <report>issue-tracking</report>
                            <report>license</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

</project>
