<!--
 ************************************************************************
 * Copyright (c) Crater Dog Technologies(TM).  All Rights Reserved.     *
 ************************************************************************
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.        *
 *                                                                      *
 * This code is free software; you can redistribute it and/or modify it *
 * under the terms of The MIT License (MIT), as published by the Open   *
 * Source Initiative. (See https://opensource.org/licenses/MIT)          *
 ************************************************************************
-->
<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>com.craterdog.maven-parent-poms</groupId>
        <artifactId>java-api</artifactId>
        <version>3.22</version>
        <relativePath>../java-api/pom.xml</relativePath>
    </parent>

    <organization>
        <name>Crater Dog Technologies(TM)</name>
        <url>https://craterdog.com</url>
    </organization>

    <name>Crater Dog Java POJO Parent POM</name>
    <description>The parent POM for all general Java POJOs.</description>
    <url>https://github.com/craterdog/maven-parent-poms/wiki</url>

    <groupId>com.craterdog.maven-parent-poms</groupId>
    <artifactId>java-pojo</artifactId>
    <version>3.22</version>
    <packaging>pom</packaging>

    <licenses>
        <license>
            <name>The MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Derk Norton</name>
            <email>derk.norton@gmail.com</email>
            <organization>Crater Dog Technologies(TM)</organization>
            <organizationUrl>https://craterdog.com</organizationUrl>
        </developer>
    </developers>

    <properties>
        <commons-lang3-version>3.12.0</commons-lang3-version>
        <commons-io-version>2.11.0</commons-io-version>
        <commons-codec-version>1.15</commons-codec-version>
        <slf4j-version>1.7.36</slf4j-version>
        <junit-version>4.13.2</junit-version>
        <easymock-version>4.3</easymock-version>
        <mockito-version>1.10.19</mockito-version>
        <maven-failsafe-plugin-version>2.22.2</maven-failsafe-plugin-version>
    </properties>

    <dependencies>

        <!-- Add in General Utilities -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3-version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io-version}</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commons-codec-version}</version>
        </dependency>

        <!-- Use the Simple Logging Facade for Java (SLF4J) and slf4j-simple instead of default commons-logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-ext</artifactId>
            <version>${slf4j-version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j-version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j-version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Include all the standard unit test suites. -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit-version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>${easymock-version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito-version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <!--
    This plugin allows the developer to create integration tests with files that end in IT.java and which
    will only be run using the following command: "mvn failsafe:integration-test".
    -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven-failsafe-plugin-version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!--
        This profile should be used when doing final verification prior to releasing a maven
        project.  This profile can be activated by including "-P verify" on the commandline.
        -->
        <profile>
            <id>verify</id>
            <properties>
                <findbugs-plugin-version>3.0.5</findbugs-plugin-version>
                <jacoco-plugin-version>0.8.8</jacoco-plugin-version>
                <!-- these values can be reset in the child pom.xml file. -->
                <jacoco-maximum-classes-missed>0</jacoco-maximum-classes-missed>
                <jacoco-minimum-methods-covered-ratio>0.80</jacoco-minimum-methods-covered-ratio>
                <jacoco-minimum-branches-covered-ratio>0.80</jacoco-minimum-branches-covered-ratio>
                <jacoco-minimum-instructions-covered-ratio>0.80</jacoco-minimum-instructions-covered-ratio>
                <jacoco-minimum-complexity-covered-ratio>0.80</jacoco-minimum-complexity-covered-ratio>
            </properties>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <version>${findbugs-plugin-version}</version>
                    </plugin>
                </plugins>
            </reporting>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <version>${findbugs-plugin-version}</version>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>default-prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>default-check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <haltOnFailure>false</haltOnFailure>
                                    <rules>
                                        <rule>
                                            <element>BUNDLE</element>
                                            <excludes>
                                                <exclude>*Test</exclude>
                                                <exclude>*IT</exclude>
                                            </excludes>
                                            <limits>
                                                <limit>
                                                    <counter>CLASS</counter>
                                                    <value>MISSEDCOUNT</value>
                                                    <maximum>${jacoco-maximum-classes-missed}</maximum>
                                                </limit>
                                                <limit>
                                                    <counter>METHOD</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>${jacoco-minimum-methods-covered-ratio}</minimum>
                                                </limit>
                                                <limit>
                                                    <counter>BRANCH</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>${jacoco-minimum-branches-covered-ratio}</minimum>
                                                </limit>
                                                <limit>
                                                    <counter>INSTRUCTION</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>${jacoco-minimum-instructions-covered-ratio}</minimum>
                                                </limit>
                                                <limit>
                                                    <counter>COMPLEXITY</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>${jacoco-minimum-complexity-covered-ratio}</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                    </rules>
                                </configuration>
                            </execution>
                         </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:git@github.com:craterdog/maven-parent-poms.git</connection>
        <developerConnection>scm:git:git@github.com:craterdog/maven-parent-poms.git</developerConnection>
        <url>https://github.com/craterdog/maven-parent-poms</url>
        <tag>aggregator-3.22</tag>
    </scm>

</project>
