<?xml version="1.0"?>
<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>nz.net.osnz.parent</groupId>
    <artifactId>osnz-parent</artifactId>
    <version>2.4</version>
  </parent>  
  
  <groupId>nz.net.osnz.parent</groupId>
  <artifactId>java-parent</artifactId>
  <version>2.5</version>
  <packaging>pom</packaging>

  <name>Open Source New Zealand - Central Java Parent</name> 
  <description>This is the central java artifact for all java-based projects.</description>
  <url>https://github.com/OpenSourceNZ/osnz-java-parent</url>

  <properties>
    <sonar.language>java</sonar.language>
  </properties>

  <build>
    <plugins>

      <plugin>
        <groupId>com.bluetrainsoftware.maven</groupId>
        <artifactId>release-pom</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>generate-dep-list</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>release-pom</goal>
            </goals>
            <configuration>
              <useMaven2>false</useMaven2>
              <outputFile>${project.build.outputDirectory}/META-INF/maven/released-pom.xml</outputFile>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.6.5.201403032054</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!--
        Exclude integration and functional tests in the normal test phase.
        Integration tests are run in a separate surefire run in the test
        phase; functional tests are run later via the failsafe plugin.
      -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.16</version>
        <configuration>
            <useSystemClassLoader>true</useSystemClassLoader>
            <useManifestOnlyJar>false</useManifestOnlyJar>
            <failIfNoTests>false</failIfNoTests>
          <includes>
            <include>**/*Test.java</include>
            <include>**/*Tests.java</include>
          </includes>
          <excludes>
            <exclude>**/*$*</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.bluetrainsoftware.maven</groupId>
        <artifactId>groovydoc-maven-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <id>attach-docs</id>
            <goals>
              <goal>attach-docs</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <scm>
    <url>https://github.com/OpenSourceNZ/osnz-java-parent</url>
    <connection>scm:git:git@github.com/OpenSourceNZ/osnz-java-parent.git</connection>
    <developerConnection>scm:git:git@github.com:OpenSourceNZ/osnz-java-parent.git</developerConnection>
    <tag>java-parent-2.5</tag>
  </scm>

</project>
