<?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>net.sourceforge.cobertura</groupId>
  <artifactId>cobertura</artifactId>
  <version>2.0.3</version>
  <packaging>jar</packaging>
  <name>Cobertura code coverage</name>
  
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  
  <description>
    Cobertura is a free Java tool that calculates the percentage of
    code accessed by tests. It can be used to identify which parts of
    your Java program are lacking test coverage. It is based on jcoverage.
  </description>
  
  <url>http://cobertura.sourceforge.net</url>
  
  <pluginRepositories>
    <pluginRepository>
      <id>sonatype-releases</id>
      <url>http://oss.sonatype.org/content/repositories/releases</url>
    </pluginRepository>
    <pluginRepository>
      <id>clojars.org</id>
      <url>http://clojars.org/repo</url>
    </pluginRepository>
  </pluginRepositories>

  <properties>
    <asmVersion>4.1</asmVersion>
    <xercesVersion>2.6.2</xercesVersion>
    <xalanVersion>2.6.0</xalanVersion>
    <oroVersion>2.0.8</oroVersion>
    <jaxenVersion>1.1-beta-8</jaxenVersion>
    <commonsioVersion>2.4</commonsioVersion>
    <antVersion>1.8.3</antVersion>
    <jettyVersion>6.1.14</jettyVersion>
    <simplexmlVersion>2.6.2</simplexmlVersion>
    <guavaVersion>13.0.1</guavaVersion>
    <groovyVersion>1.6-RC-1</groovyVersion>
    <jsr305Version>1.3.2</jsr305Version>
    <javaccVersion>5.0</javaccVersion>
    <log4jVersion>1.2.9</log4jVersion>
    <junitVersion>4.11</junitVersion>
    <jdkVersion>1.5</jdkVersion>
    <surefireVersion>2.12.3</surefireVersion>
    <plugin.java.formatter.version>0.3.1</plugin.java.formatter.version>
    <plugin.mvn.compiler.version>2.3.2</plugin.mvn.compiler.version>
    <plugin.mvn.jar.version>2.3.2</plugin.mvn.jar.version>
    <plugin.pmd.version>3.0.1</plugin.pmd.version>
    <plugin.jdoc.version>2.9</plugin.jdoc.version>
    <plugin.findbugs.version>2.5.2</plugin.findbugs.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
      <version>${asmVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-tree</artifactId>
      <version>${asmVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-commons</artifactId>
      <version>${asmVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-util</artifactId>
      <version>${asmVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-analysis</artifactId>
      <version>${asmVersion}</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>${xercesVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>${xalanVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>oro</groupId>
      <artifactId>oro</artifactId>
      <version>${oroVersion}</version>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>${jaxenVersion}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commonsioVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>${antVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant-junit</artifactId>
      <version>${antVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>servlet-api-2.5</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-util</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-servlet-tester</artifactId>
      <version>${jettyVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <version>${groovyVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.java.dev.javacc</groupId>
      <artifactId>javacc</artifactId>
      <version>${javaccVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun</groupId>
      <artifactId>tools</artifactId>
      <version>0</version>
      <scope>system</scope>
      <systemPath>${toolsjar}</systemPath>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4jVersion}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junitVersion}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <profiles>
    <profile>
      <id>WindowsProfile</id>
      <activation>
        <os>
          <family>Windows</family>
        </os>
      </activation>
      <properties>
        <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
      </properties>
    </profile>
    <profile>
      <id>UnixProfile</id>
      <activation>
        <os>
          <family>unix</family>
          <name>Linux</name>
        </os>
      </activation>
      <properties>
        <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
      </properties>
    </profile>
    <profile>
      <id>OSXProfile</id>
      <activation>
        <os>
          <family>mac</family>
        </os>
      </activation>
      <properties>
        <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
      </properties>
    </profile>
  </profiles>

  <build>
    <plugins>
      <!--
        https://code.google.com/p/maven-java-formatter-plugin/
        https://github.com/treymarc/maven-java-formatter-plugin
      -->
      <plugin>
        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
        <artifactId>maven-java-formatter-plugin</artifactId>
        <version>${plugin.java.formatter.version}</version>
        <configuration>
          <lineEnding>LF</lineEnding>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <!-- Cobertura requires custom jdk version for providing the support for the latest jdk. -->
      <plugin>
        <groupId>com.code54.mojo</groupId>
        <artifactId>buildversion-plugin</artifactId>
        <version>1.0.2</version>
        <executions>
          <execution>
            <goals>
              <goal>set-properties</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${plugin.mvn.compiler.version}</version>
        <configuration>
          <fork>true</fork>
          <source>${jdkVersion}</source>
          <target>${jdkVersion}</target>
          <excludes>
            <exclude>**/test/*.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${plugin.mvn.jar.version}</version>
          <configuration>
            <archive>
              <index />
              <manifest>
                <addDefaultImplementationEntries />
		<addDefaultSpecificationEntries />
              </manifest>
                <manifestEntries>
                  <Specification-Title>A code coverage analysis tool.</Specification-Title>
                  <Specification-Version>${project.version}</Specification-Version>
                  <Specification-Vendor>Cobertura</Specification-Vendor>
                  <Implementation-Title>A code coverage analysis tool.</Implementation-Title>
                  <Implementation-Version>${project.version}</Implementation-Version>
                  <Implementation-Vendor>Cobertura</Implementation-Vendor>
                  <Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
                </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefireVersion}</version>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <excludes>
            <exclude>**/test/condition/**</exclude>
	    <exclude>**/examples/functionaltest1/**</exclude>
          </excludes>
        </configuration>
      </plugin>

      <!-- This is required to assemble all of the binary files. -->
      <!-- The descriptor has more detailed information about what is included/excluded. -->
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/assembly.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>packageBins</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${plugin.pmd.version}</version>
        <configuration>
          <failOnViolation>false</failOnViolation>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
              <goal>cpd-check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${plugin.findbugs.version}</version>
        <configuration>
          <failOnError>false</failOnError>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <!-- This is to build the coberturaFlush.war file necessary for servlets. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <warName>coberturaFlush</warName>
          <webXml>src/main/resources/net/sourceforge/cobertura/webapp/web.xml</webXml>
          <packagingIncludes>WEB-INF/classes/net/sourceforge/cobertura/webapp/FlushCoberturaServlet.class</packagingIncludes>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <classpathPrefix>lib/</classpathPrefix>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>prepare-war</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>war</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <localCheckout>true</localCheckout>
          <pushChanges>false</pushChanges>
       </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>javacc</id>
            <phase>initialize</phase>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <outputDirectory>src/main/java</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>src/main/java/net/sourceforge/cobertura/javancss/parser</directory>
              <includes>
                <include>**/*</include>
              </includes>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.15</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${plugin.jdoc.version}</version>
      </plugin>
    </plugins>
  </reporting>
  
  <scm>
    <connection>scm:git:git://github.com/cobertura/cobertura</connection>
    <developerConnection>scm:git:git@github.com:cobertura/cobertura.git</developerConnection>
    <url>http://github.com/cobertura/cobertura</url>
    <tag>cobertura-runtime-2.0.3</tag>
  </scm>
  
  <developers>
    <developer>
      <id>schristou88</id>
      <name>Steven Christou</name>
      <email>schristou88@gmail.com</email>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+6</timezone>
    </developer>
  </developers>
  
  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
</project>
