<!--
This file is part of dependency-check-utils.

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.

Copyright (c) 2014 - Jeremy Long. All Rights Reserved.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-parent</artifactId>
        <version>1.4.3</version>
    </parent>

    <artifactId>dependency-check-utils</artifactId>
    <name>Dependency-Check Utils</name>
    <description>dependency-check-utils is a collection of common utility classes used within dependency-check that might be useful in other projects.</description>
    <!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
    <distributionManagement>
        <site>
            <id>github-pages-site</id>
            <name>Deployment through GitHub's site deployment plugin</name>
            <url>${basedir}/../target/site/${project.version}/dependency-check-utils</url>
        </site>
    </distributionManagement>
    <!-- end copy -->

    <properties>
        <findbugs.onlyAnalyze>org.owasp.dependencycheck.utils.*</findbugs.onlyAnalyze>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                    <!--instrumentation>
                        <ignoreTrivial>true</ignoreTrivial>
                    </instrumentation-->
                    <check>
                        <branchRate>85</branchRate>
                        <lineRate>85</lineRate>
                        <haltOnFailure>false</haltOnFailure>
                        <totalBranchRate>85</totalBranchRate>
                        <totalLineRate>85</totalLineRate>
                        <packageLineRate>85</packageLineRate>
                        <packageBranchRate>85</packageBranchRate>
                        <regexes>
                            <regex>
                                <pattern>.*\$.*</pattern>
                                <branchRate>0</branchRate>
                                <lineRate>0</lineRate>
                            </regex>
                        </regexes>
                    </check>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <systemProperties>
                        <property>
                            <name>data.directory</name>
                            <value>${project.build.directory}/data</value>
                        </property>
                        <property>
                            <name>temp.directory</name>
                            <value>${project.build.directory}/temp</value>
                        </property>
                    </systemProperties>
                    <excludes>
                        <exclude>**/*IntegrationTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${reporting.checkstyle-plugin.version}</version>
                <configuration>
                    <enableRulesSummary>false</enableRulesSummary>
                    <enableFilesSummary>false</enableFilesSummary>
                    <configLocation>${basedir}/../src/main/config/checkstyle-checks.xml</configLocation>
                    <headerLocation>${basedir}/../src/main/config/checkstyle-header.txt</headerLocation>
                    <suppressionsLocation>${basedir}/../src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
                    <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${reporting.pmd-plugin.version}</version>
                <configuration>
                    <targetJdk>1.6</targetJdk>
                    <linkXref>true</linkXref>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <excludes>
                        <exclude>**/org/owasp/dependencycheck/org/apache/**/*.java</exclude>
                    </excludes>
                    <rulesets>
                        <ruleset>../src/main/config/dcrules.xml</ruleset>
                        <ruleset>/rulesets/java/basic.xml</ruleset>
                        <ruleset>/rulesets/java/imports.xml</ruleset>
                        <ruleset>/rulesets/java/unusedcode.xml</ruleset>
                    </rulesets>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    <dependencies>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
