<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>9</version>
  </parent>

  <groupId>org.avaje</groupId>
  <artifactId>avaje-parent</artifactId>
  <version>2.1</version>
  <packaging>pom</packaging>
  <name>avaje-parent</name>
  
  <description>
    Packaging parent for Avaje projects.
	</description>

  <properties>
    <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
  </properties>

  <url>http://www.avaje.org</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>rbygrave</id>
      <name>Rob Bygrave</name>
      <email>robin.bygrave@gmail.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:avaje-common/avaje-parent-pom.git</connection>
    <developerConnection>scm:git:git@github.com:avaje-common/avaje-parent-pom.git</developerConnection>
    <url>git@github.com:avaje-common/avaje-parent-pom.git</url>
    <tag>avaje-parent-2.1</tag>
  </scm>

  <!-- make sure source and javadocs are included in artifacts on release -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-dep-list</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>list</goal>
            </goals>
            <configuration>
              <outputFile>${project.build.outputDirectory}/META-INF/maven/${project.groupId}/${project.artifactId}/dependency.list</outputFile>
            </configuration>
          </execution>
          <execution>
            <id>generate-dep-tree</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>tree</goal>
            </goals>
            <configuration>
              <outputFile>${project.build.outputDirectory}/META-INF/maven/${project.groupId}/${project.artifactId}/dependency.tree</outputFile>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.outputDirectory}/META-INF/maven/${project.groupId}/${project.artifactId}/dependency.tree</file>
                  <type>tree</type>
                  <classifier>dependency</classifier>
                </artifact>
                <artifact>
                  <file>${project.build.outputDirectory}/META-INF/maven/${project.groupId}/${project.artifactId}/dependency.list</file>
                  <type>list</type>
                  <classifier>dependency</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>

      </plugin>

    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>-Psonatype-oss-release</arguments>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.8</version>
        </plugin>
      </plugins>
    </pluginManagement>
    
  </build>
</project>	
