<?xml version="1.0" encoding="UTF-8"?>

<!--
  Copyright 2012 Bull S.A.S.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<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.ow2</groupId>
    <artifactId>ow2</artifactId>
    <version>1.5</version>
  </parent>

  <groupId>org.ow2.util</groupId>
  <artifactId>parent</artifactId>
  <packaging>pom</packaging>

  <name>OW2 Utilities Parent POM</name>
  <description>Utilities for OW2 Projects</description>
  <version>2.0.0</version>
  <inceptionYear>2012</inceptionYear>
  <url>${siteUrl}/</url>

  <properties>
    <!-- Overridable property for TestNG version -->
    <testng.version>6.5.1</testng.version>
    <maven-source-assemblies.version>1.0.1</maven-source-assemblies.version>
    <legal-asl-resources.version>1.0.0</legal-asl-resources.version>

    <!-- Site generation related properties -->
    <jira.component>${project.artifactId}</jira.component>
    <maven-fluido-skin.version>1.2.2</maven-fluido-skin.version>
    <wagon-webdav-jackrabbit.version>2.2</wagon-webdav-jackrabbit.version>

    <siteUrl>http://repository.ow2.org/nexus/content/sites/ow2-utilities</siteUrl>
    <baseDistributionManagementSiteUrl>dav:${siteUrl}</baseDistributionManagementSiteUrl>

    <!-- Defaults version for reporting plugins -->
    <maven-project-info-reports-plugin.version>2.4</maven-project-info-reports-plugin.version>
    <maven-javadoc-plugin.version>2.8.1</maven-javadoc-plugin.version>
    <maven-changes-plugin.version>2.7.1</maven-changes-plugin.version>
    <maven-plugin-plugin.version>3.1</maven-plugin-plugin.version>
    <maven-surefire-report-plugin.version>2.12</maven-surefire-report-plugin.version>
    <maven-changelog-plugin.version>2.2</maven-changelog-plugin.version>
    <maven-jxr-plugin.version>2.3</maven-jxr-plugin.version>
  </properties>

  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.ow2.org/browse/UTIL</url>
  </issueManagement>

  <ciManagement>
    <system>bamboo</system>
    <url>http://bamboo.ow2.org/browse/UTIL</url>
  </ciManagement>

  <scm>
    <connection>scm:git:git://gitorious.ow2.org/ow2-utilities/parent.git</connection>
    <developerConnection>scm:git:git@gitorious.ow2.org:ow2-utilities/parent.git</developerConnection>
    <url>http://gitorious.ow2.org/ow2-utilities/parent</url>
    <tag>parent-2.0.0</tag>
  </scm>

  <distributionManagement>
    <site>
      <id>nexus-utilities-sites</id>
      <url>${baseDistributionManagementSiteUrl}/parent/</url>
    </site>
  </distributionManagement>

  <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>

  <organization>
    <name>Bull S.A.S.</name>
    <url>http://www.bull.com</url>
  </organization>
  
  <developers />

  <mailingLists>
    <mailingList>
      <name>utilities-dev</name>
      <archive>http://mail.ow2.org/wws/arc/utilities-dev</archive>
      <subscribe>http://mail.ow2.org/wws/subscribe/utilities-dev</subscribe>
      <unsubscribe>http://mail.ow2.org/wws/signoff/utilities-dev</unsubscribe>
      <post>utilities-dev@ow2.org</post>
    </mailingList>
    <mailingList>
      <name>utilities-commits</name>
      <archive>http://mail.ow2.org/wws/arc/utilities-commits</archive>
      <subscribe>http://mail.ow2.org/wws/subscribe/utilities-commits</subscribe>
      <unsubscribe>http://mail.ow2.org/wws/signoff/utilities-commits</unsubscribe>
      <post>utilities-commits@ow2.org</post>
    </mailingList>
    <mailingList>
      <name>utilities-issues</name>
      <archive>http://mail.ow2.org/wws/arc/utilities-issues</archive>
      <subscribe>http://mail.ow2.org/wws/subscribe/utilities-issues</subscribe>
      <unsubscribe>http://mail.ow2.org/wws/signoff/utilities-issues</unsubscribe>
      <post>utilities-issues@ow2.org</post>
    </mailingList>
  </mailingLists>

 <prerequisites>
   <maven>3.0</maven>
 </prerequisites>

  <build>
    <defaultGoal>install</defaultGoal>

    <!-- Enable dav: URL support for site deployment -->
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>${wagon-webdav-jackrabbit.version}</version>
      </extension>
    </extensions>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <addSchema>false</addSchema>
        </configuration>
      </plugin>

      <!-- Do not trim stack trace -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <_include>-target/classes/META-INF/instructions.bnd</_include>
          </instructions>
          <!-- By default, deactivate OBR's repository.xml modifications
               during maven's install phase -->
          <obrRepository>NONE</obrRepository>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <executions>
          <execution>
            <id>legal</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <includes>
                <include>src/**</include>
                <include>pom.xml</include>
              </includes>
              <useMavenDefaultExcludes>true</useMavenDefaultExcludes>
              <licenses>
                <license implementation="org.apache.rat.analysis.license.ApacheSoftwareLicense20" />
              </licenses>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>ianal-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>legal</id>
            <phase>verify</phase>
            <goals>
              <goal>verify-legal-files</goal>
            </goals>
            <configuration>
              <strict>true</strict>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.3</version>
        <configuration>
          <resourceBundles>
            <resourceBundle>org.ow2.legal:legal-asl-resources:${legal-asl-resources.version}</resourceBundle>
          </resourceBundles>
        </configuration>
        <executions>
          <execution>
            <!-- Force validate phase so that MRRP get executed for pom projects -->
            <phase>validate</phase>
            <goals>
              <goal>process</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <dependencies>
          <!-- Enable support of markdown syntax -->
          <dependency>
            <groupId>org.kohsuke</groupId>
            <artifactId>doxia-module-markdown</artifactId>
            <version>1.0</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <!-- Preferred dependencies version of plugins -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>ianal-maven-plugin</artifactId>
          <version>1.0-alpha-1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.3</version>
          <configuration>
            <!-- Use GNU Tar -->
            <tarLongFileMode>gnu</tarLongFileMode>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>2.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-one-plugin</artifactId>
          <version>1.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.3.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven-plugin-plugin.version}</version>
          <configuration>
            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
          </configuration>
          <executions>
            <!-- Force mojo descriptor generation.
                 Otherwise, the plugin:descriptor goal gets invoked before
                 any classes compilation, making it hard to search annotations
                 in compiled bytecode :) -->
            <execution>
              <id>mojo-descriptor</id>
              <goals>
                <goal>descriptor</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-repository-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.12</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-verifier-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.3.7</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencyManagement>
    <dependencies>
      <!-- Force a recent TestNG version (can be overridden by sub-modules) -->
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>${testng.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <reporting>
    <plugins>

      <!-- By default, we enable some useful reports (pre-configuring them when necessary),
           each inheriting project can override that pre-defined set of reports with its
           own selected list of reports -->

      <!-- Generates the Project Information pages -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven-project-info-reports-plugin.version}</version>
      </plugin>

      <!-- Generates the Javadoc pages -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
      </plugin>

      <!-- JIRA report -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>${maven-changes-plugin.version}</version>
        <configuration>
          <component>${jira.component}</component>
          <onlyCurrentVersion>true</onlyCurrentVersion>
          <versionPrefix>${jira.component}-</versionPrefix>
          <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
        </configuration>
        <reportSets>
          <reportSet />
        </reportSets>
      </plugin>

      <!-- Test results pages -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${maven-surefire-report-plugin.version}</version>
      </plugin>

      <!-- Generates change-log/SCM activity pages -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changelog-plugin</artifactId>
        <version>${maven-changelog-plugin.version}</version>
        <configuration>
          <displayFileDetailUrl>http://gitorious.ow2.org/ow2-utilities/${project.artifactId}/blobs/master/%FILE%</displayFileDetailUrl>
        </configuration>
      </plugin>

      <!-- Source XRef pages -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${maven-jxr-plugin.version}</version>
      </plugin>
    </plugins>
  </reporting>

</project>
