<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Copyright (c) 2006 - 2016, Stephan Pfab
     SPDX-License-Identifier: BSD-2-Clause   -->
<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>de.pfabulist</groupId>
        <artifactId>pfabulist-parent</artifactId>
        <version>1.1</version>
        <relativePath>../pfabulist-parent-v1/pom.xml</relativePath>
    </parent>

    <artifactId>pfabulist-parent</artifactId>
    <version>2.2.1</version>
    <packaging>pom</packaging>

    <name>pfabulist-parent</name>
    <description>the parent pom for all bigger pfabulist projects, with all checks but the license check</description>
    <url>http://www.github.com/openCage/pfabulist-1-parent</url>


    <scm>
        <url>https://github.com/openCage/pfabulist-parent/tree/v2</url>
        <connection>scm:git:https://github.com/openCage/pfabulist-parent/tree/v2</connection>
        <developerConnection>scm:git:https://github.com/openCage/pfabulist-parent/tree/v2</developerConnection>
    </scm>


    <dependencies>
        <dependency>
            <groupId>de.pfabulist.roast</groupId>
            <artifactId>roast</artifactId>
            <version>0.1    </version>
            <scope>compile</scope>
            <!--provided here would be good enough for some projects, those project needing compile scope-->
            <!--through transitive dependency would find provided first and thus fail without implicitly-->
            <!--depending on nonnullbydefault-->
            <!--i.e. maven bug-->
        </dependency>
    </dependencies>

    <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <!--get latest pmd-->
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-core</artifactId>
                        <version>5.4.1</version>
                    </dependency>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-java</artifactId>
                        <version>5.4.1</version>
                    </dependency>
                    <dependency>
                        <!--include squalix for the rules-->
                        <groupId>de.pfabulist</groupId>
                        <artifactId>squalix</artifactId>
                        <version>0.2.3</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <targetJdk>1.8</targetJdk>
                    <printFailingErrors>true</printFailingErrors>
                    <rulesets>
                        <ruleset>/de/pfabulist/squalix/pmd/pmd_rules.xml</ruleset>
                    </rulesets>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <!--
                        Enables analysis which takes more memory but finds more bugs.
                        If you run out of memory, changes the value of the effort element
                        to 'Low'.
                    -->
                    <effort>Max</effort>
                    <!-- Reports all bugs (other values are medium and max) -->
                    <threshold>low</threshold>
                    <!-- Produces XML report -->
                    <xmlOutput>true</xmlOutput>
                    <!-- Configures the directory in which the XML report is created -->
                    <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
                    <!--<omitVisitors>FindNullDeref</omitVisitors>-->

                    <includeTests>true</includeTests>
                </configuration>
                <executions>
                    <!--
                        Ensures that FindBugs inspects source code when project is compiled.
                    -->
                    <execution>
                        <id>analyze-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>analyze-test</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>



        </plugins>
    </build>

</project>