<?xml version="1.0" encoding="UTF-8"?>
<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>
        <relativePath>../../</relativePath>
        <groupId>net.sf.qualitycheck</groupId>
        <artifactId>quality-parent</artifactId>
        <version>1.3</version>
    </parent>

    <artifactId>quality-test</artifactId>

    <name>Quality-Test</name>
    <description><![CDATA[
The goal of quality-test is to provide a small Java library for
basic code quality checks within unit tests. 

It is discouraged to use quality-test in production code. The checks
provided in this library are designed to be used in unit-tests.

The checks and utilities provided in this package check static properties
of classes, for example whether classes are marked final or constructors are private.
Additionally, there are utils to give additional code coverage for private constructors.

Quality-Test often can be used together with Google Reflections (http://code.google.com/p/reflections/)
to perform checks such as, assure that every class in package *.dto.* is final 
or make sure that no class in the package *.controller.* contains any non-final static variables. 
]]></description>
    <url>http://qualitycheck.sourceforge.net/modules/quality-test/</url>

    <packaging>jar</packaging>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <dependencies>

        <!-- internal module -->
        <dependency>
            <groupId>net.sf.qualitycheck</groupId>
            <artifactId>quality-check</artifactId>
            <version>1.3</version>
        </dependency>

        <!-- JSR-305 annotations -->
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>

        <!-- Utilities -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <!-- Unit testing -->
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-easymock</artifactId>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
            <resource>
                <directory>${basedir}</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>LICENSE*.txt</include>
                    <include>NOTICE.txt</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*Test*.java</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-project-info-reports-plugin</artifactId>
                            <reports>
                                <report>dependencies</report>
                                <report>index</report>
                                <report>issue-tracking</report>
                                <report>license</report>
                                <report>plugins</report>
                                <report>project-team</report>
                                <report>scm</report>
                                <report>summary</report>
                            </reports>
                            <configuration>
                                <dependencyDetailsEnabled>true</dependencyDetailsEnabled>
                                <dependencyLocationsEnabled>true</dependencyLocationsEnabled>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-jxr-plugin</artifactId>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-pmd-plugin</artifactId>
                            <configuration>
                                <targetJdk>${java.version}</targetJdk>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>findbugs-maven-plugin</artifactId>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule>
									<element>BUNDLE</element>
									<limits>
										<limit>
											<counter>BRANCH</counter>
											<value>MISSEDCOUNT</value>
											<minimum>0</minimum>
										</limit>
										<limit>
											<counter>CLASS</counter>
											<value>MISSEDCOUNT</value>
											<minimum>0</minimum>
										</limit>
										<limit>
											<counter>COMPLEXITY</counter>
											<value>MISSEDCOUNT</value>
											<maximum>0</maximum>
										</limit>
										<limit>
											<counter>INSTRUCTION</counter>
											<value>COVEREDRATIO</value>
											<minimum>0.98</minimum>
										</limit>
										<limit>
											<counter>METHOD</counter>
											<value>MISSEDRATIO</value>
											<maximum>0.01</maximum>
										</limit>
										<limit>
											<counter>LINE</counter>
											<value>MISSEDRATIO</value>
											<maximum>0.05</maximum>
										</limit>
									</limits>
								</rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <configuration>
                    <targetClasses>
                        <param>net.sf.qualitycheck.*</param>
                    </targetClasses>
                    <targetTests>
                        <param>net.sf.qualitycheck.*</param>
                    </targetTests>
                    <outputFormats>
                        <outputFormat>XML</outputFormat>
                        <outputFormat>HTML</outputFormat>
                    </outputFormats>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
