<!--

    Copyright (C) 2009 eXo Platform SAS.

    This is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation; either version 2.1 of
    the License, or (at your option) any later version.

    This software is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this software; if not, write to the Free
    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA, or see the FSF site: http://www.fsf.org.

-->
<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.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>5-beta-1</version>
  </parent>

  <!-- ****************** -->
  <!-- Project Definition -->
  <!-- ****************** -->

  <groupId>org.gatein.mop</groupId>
  <artifactId>mop-parent</artifactId>
  <version>1.0.0-Beta07</version>
  <packaging>pom</packaging>

  <name>MOP</name>
  <description>Model Object for Portal</description>
  <url>http://www.exoplatform.com</url>

  <organization>
    <name>eXo Platform SAS</name>
    <url>http://www.exoplatform.com</url>
  </organization>

  <licenses>
    <license>
      <name>LGPL, version 2.1</name>
      <url>http://www.opensource.org/licenses/lgpl-license.php</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/mop/tags/1.0.0-Beta07</connection>
    <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/tags/1.0.0-Beta07</developerConnection>
    <url>http://fisheye.jboss.org/browse/gatein/components/mop/tags/1.0.0-Beta07</url>
  </scm>

  <!-- Required to download Parent -->
  <repositories>
    <repository>
      <id>repository.jboss.org</id>
      <url>http://repository.jboss.org/maven2</url>
    </repository>
  </repositories>

  <properties>
    <!-- Dependencies versions -->
    <chromattic.version>1.0.0-beta3</chromattic.version>
    
    <!-- Plugins settings -->

    <!-- Cross plugins settings -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- maven-compiler-plugin -->
    <maven.compiler.target>1.5</maven.compiler.target>
    <maven.compiler.source>1.5</maven.compiler.source>

    <!-- maven-release-plugin -->
    <useReleaseProfile>false</useReleaseProfile>
    <arguments>-Prelease</arguments>
    <autoVersionSubmodules>true</autoVersionSubmodules>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- Internal dependencies -->
      <dependency>
         <groupId>org.gatein.mop</groupId>
         <artifactId>mop-api</artifactId>
         <version>1.0.0-Beta07</version>
      </dependency>
      <dependency>
         <groupId>org.gatein.mop</groupId>
         <artifactId>mop-spi</artifactId>
         <version>1.0.0-Beta07</version>
      </dependency>
      <!-- External dependencies -->
      <dependency>
         <groupId>javax.jcr</groupId>
         <artifactId>jcr</artifactId>
         <version>1.0</version>
      </dependency>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8</version>
      </dependency>
      <dependency>
         <groupId>org.chromattic</groupId>
         <artifactId>chromattic.api</artifactId>
         <version>${chromattic.version}</version>
      </dependency>
      <dependency>
         <groupId>org.chromattic</groupId>
         <artifactId>chromattic.core</artifactId>
         <version>${chromattic.version}</version>
      </dependency>
      <dependency>
         <groupId>org.chromattic</groupId>
         <artifactId>chromattic.apt</artifactId>
         <version>${chromattic.version}</version>
      </dependency>
      <dependency>
         <groupId>org.chromattic</groupId>
         <artifactId>chromattic.exo</artifactId>
         <version>${chromattic.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.8</version>
      </dependency>
    </dependencies>

  </dependencyManagement>

  <dependencies>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <!-- **************** -->
  <!-- Build Definition -->
  <!-- **************** -->

  <build>
    <pluginManagement>
      <!-- All plugins versions have to be set -->
      <!-- Plugins are sorted by shortname : clean, deploy, ... -->
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>1.0-beta-3</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.0-beta-1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.2</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.0-beta-9</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>2.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.4.3</version>
        </plugin>

      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <message>Even if deliveries are checked to be compatible with Java 5, MOP requires Java 6 to build.</message>
                  <version>1.6</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforce-maven-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <message>To build this project Maven 2.2.1 (or upper) is required. Please install it.</message>
                  <version>2.2.1</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <repositories>
        <!--  Used by animal-sniffer -->
        <repository>
          <id>maven2-repository.dev.java.net</id>
          <name>Java.net Repository for Maven</name>
          <url>http://download.java.net/maven/2/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <!--  Used by animal-sniffer -->
        <pluginRepository>
          <id>maven2-repository.dev.java.net</id>
          <name>Java.net Repository for Maven</name>
          <url>http://download.java.net/maven/2/</url>
        </pluginRepository>
      </pluginRepositories>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <configuration>
                <archive>
                  <!-- Additional entries in Manifest -->
                  <manifestEntries>
                    <SCM-Revision>${buildNumber}</SCM-Revision>
                  </manifestEntries>
                </archive>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <archive>
                  <!-- Additional entries in Manifest -->
                  <manifestEntries>
                    <SCM-Revision>${buildNumber}</SCM-Revision>
                  </manifestEntries>
                </archive>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-source-plugin</artifactId>
              <configuration>
                <archive>
                  <!-- Additional entries in Manifest -->
                  <manifestEntries>
                    <SCM-Revision>${buildNumber}</SCM-Revision>
                  </manifestEntries>
                </archive>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <executions>
              <execution>
                <!-- Requires Maven 2.1+ -->
                <phase>prepare-package</phase>
                <goals>
                  <goal>create</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.jvnet</groupId>
            <artifactId>animal-sniffer</artifactId>
            <version>1.2</version>
            <executions>
              <execution>
                <id>check-java-compatibility</id>
                <phase>compile</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <signature>
                    <groupId>org.jvnet.animal-sniffer</groupId>
                    <artifactId>java1.5</artifactId>
                    <version>1.0</version>
                  </signature>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <modules>
    <module>api</module>
    <module>spi</module>
    <module>core</module>
  </modules>

</project>
