<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>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>5</version>
  </parent>

  <groupId>com.github.cwilper</groupId>
  <artifactId>ttff</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>
  <name>The Tiny Filtering Framework</name>
  <description>
    Useful abstractions for working with object sequences.
  </description>
  <url>http://cwilper.github.com/ttff/</url>

  <organization>                                                                    
    <name>DuraSpace</name>                                                          
    <url>http://duraspace.org/</url>                                                                               
  </organization>
  
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/cwilper/ttff</url>
    <connection>
      scm:git:git://github.com/cwilper/ttff.git
    </connection>
    <developerConnection>
      scm:git:git@github.com:cwilper/ttff.git
    </developerConnection>
  </scm>

  <developers>
    <developer>
      <id>cwilper</id>
      <name>Chris Wilper</name>
      <email>cwilper@gmail.com</email>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- deploy site locally by default; override with -P release-site -->
    <site.id>local-site</site.id>
    <site.url>file:///tmp/ttff-site</site.url>

    <!-- for use in site/apt/*.apt.vm docs -->
    <groupId>${project.groupId}</groupId>
    <artifactId>${project.artifactId}</artifactId>
    <currentVersion>${project.version}</currentVersion>

  </properties>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.1</version>
        <configuration>
          <debug>true</debug>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.0-beta-1</version>
        <executions>
          <execution>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
                  <message>
                    Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures
                    and checksums respectively, and therefore must be avoided.
                  </message>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <source>1.6</source>
          <encoding>UTF-8</encoding>
          <maxmemory>1g</maxmemory>
          <links>
            <link>http://download.oracle.com/javase/6/docs/api/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>verify</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <!-- need this for gpg plugin to work correctly -->
          <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>2.2</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>

    <extensions>

      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-manager-plexus</artifactId>
        <version>1.3</version>
      </extension>

      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-provider-gitexe</artifactId>
        <version>1.3</version>
      </extension>

      <extension>
        <groupId>org.kathrynhuxtable.maven.wagon</groupId>
        <artifactId>wagon-gitsite</artifactId>
        <version>0.3.1</version>
      </extension>
    </extensions>

  </build>

  <reporting>
    <plugins>

      <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>
        <configuration>
          <inputEncoding>UTF-8</inputEncoding>
          <outputEncoding>UTF-8</outputEncoding>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <configuration>
          <sourceEncoding>UTF-8</sourceEncoding>
          <targetJdk>1.6</targetJdk>
          <failOnViolation>false</failOnViolation>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>report-only</report>
            </reports>
          </reportSet>                                                              
        </reportSets>                                                               
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <configuration>
          <instrumentation>
            <excludes>
              <exclude>**/Constants.class</exclude>
              <exclude>**/Util.class</exclude>
            </excludes>
          </instrumentation>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>

    </plugins>
  </reporting>

  <distributionManagement>
    <site>
      <id>${site.id}</id>
      <url>${site.url}</url>
    </site>
  </distributionManagement> 

  <profiles>

    <profile>
      <id>release-site</id>
      <properties>
        <site.id>gh-pages</site.id>
        <site.url>gitsite:git@github.com/cwilper/ttff.git</site.url>
      </properties>
    </profile>

    <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.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
  
</project>
