<?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>
    <groupId>com.github.nikolavp</groupId>
    <artifactId>approval</artifactId>
    <version>0.3</version>
    <packaging>pom</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <url>https://github.com/nikolavp/approval</url>
    <description>Approval is a Java library which will make you look at your testing from a whole different angle</description>

    <modules>
        <module>approval-core</module>
        <module>approval-json</module>
    <module>approval-sesame</module>
  </modules>

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

    <issueManagement>
        <system>github</system>
        <url>http://github.com/nikolavp/approval/issues#issue/</url>
    </issueManagement>

    <developers>
        <developer>
            <name>Nikola Petrov</name>
            <email>nikolavp@gmail.com</email>
            <organization>nikolavp</organization>
            <organizationUrl>https://github.com/nikolavp</organizationUrl>
        </developer>
    </developers>

    <properties>
        <github.global.userName>nikolavp</github.global.userName>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdkTarget>1.7</jdkTarget>
        <coberturaCoverageRate>89</coberturaCoverageRate>
        <individual.coverage>70</individual.coverage>
        <guava.version>13.0.1</guava.version>
        <cobertura.format>xml</cobertura.format>
    </properties>

    <scm>
        <connection>scm:git:git@github.com:nikolavp/approval.git</connection>
        <developerConnection>scm:git:git@github.com:nikolavp/approval.git</developerConnection>
        <url>git@github.com:nikolavp/approval.git</url>
        <tag>approval-0.3</tag>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
                <executions>
                    <execution>
                        <id>checkstyle-verify</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>2.2.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <targetJdk>1.5</targetJdk>
                </configuration>
                <executions>
                    <execution>
                        <id>pmd-verify</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>cpd-check</goal>
                            <!-- this doesn't work with imports in package-info.java files -->
                            <!--<goal>check</goal>-->
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.5.2</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Default</threshold>
                    <xmlOutput>true</xmlOutput>
                </configuration>
                <executions>
                    <execution>
                        <id>findbugs-verify</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <format>${cobertura.format}</format>
                    <aggregate>true</aggregate>
                    <check>
                        <branchRate>${individual.coverage}</branchRate>
                        <lineRate>${individual.coverage}</lineRate>
                        <haltOnFailure>true</haltOnFailure>
                        <totalBranchRate>${coberturaCoverageRate}</totalBranchRate>
                        <totalLineRate>${coberturaCoverageRate}</totalLineRate>
                        <packageLineRate>${coberturaCoverageRate}</packageLineRate>
                        <packageBranchRate>${coberturaCoverageRate}</packageBranchRate>
                    </check>
                </configuration>
                <executions>
                    <execution>
                        <id>cobertura-verify</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <excludes>
                        <exclude>**/example/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.7</version>
                <configuration>
                    <verbose>false</verbose>
                    <addSvnKeyWords>false</addSvnKeyWords>
                    <organizationName>Nikolavp</organizationName>
                    <inceptionYear>2014</inceptionYear>
                </configuration>
                <executions>
                    <execution>
                        <id>first</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <licenseName>apache_v2</licenseName>
                            <excludes>
                                <exclude>**/*Example.java</exclude>
                                <exclude>**/example/**</exclude>
                                <exclude>src/test/resources/approval/**</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <source>${jdkTarget}</source>
                    <target>${jdkTarget}</target>
                    <showWarnings>true</showWarnings>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keyname>A16670BB</keyname>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>2.0.2</version>
            <!-- Those are not needed at runtime thanks to the way java works -->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <!-- Don't force it on our users -->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3.RC2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
            <version>1.9.0</version>
        </dependency>
    </dependencies>
</project>
