<!--

    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-Beta02</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-Beta02</connection>
      <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/tags/1.0.0-Beta02</developerConnection>
      <url>http://fisheye.jboss.org/browse/gatein/components/mop/tags/1.0.0-Beta02</url>
   </scm>
  
   <!-- Required to download Parent -->
   <repositories>
      <repository>
         <id>repository.jboss.org</id>
         <url>http://repository.jboss.org/maven2</url>
      </repository>
   </repositories>

   <dependencies>

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

   </dependencies>

   <properties>
      <!-- Plugins versions are defined in properties to be reused in build and reporting parts if necessary -->
      <clean.plugin.version>2.3</clean.plugin.version>
      <buildnumber.plugin.version>1.0-beta-3</buildnumber.plugin.version>
      <compiler.plugin.version>2.0.2</compiler.plugin.version>
      <deploy.plugin.version>2.4</deploy.plugin.version>
      <enforcer.plugin.version>1.0-beta-1</enforcer.plugin.version>
      <install.plugin.version>2.3</install.plugin.version>
      <jar.plugin.version>2.2</jar.plugin.version>
      <javadoc.plugin.version>2.6</javadoc.plugin.version>
      <release.plugin.version>2.0-beta-9</release.plugin.version>
      <resources.plugin.version>2.4</resources.plugin.version>
      <site.plugin.version>2.0.1</site.plugin.version>
      <source.plugin.version>2.1</source.plugin.version>
      <surefire.plugin.version>2.4.3</surefire.plugin.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>

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

   <build>
      <pluginManagement>
         <!--  Plugins are sorted by shortname : clean, deploy, ... -->
         <plugins>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>buildnumber-maven-plugin</artifactId>
               <version>${buildnumber.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-clean-plugin</artifactId>
               <version>${clean.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>${compiler.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-deploy-plugin</artifactId>
               <version>${deploy.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-enforcer-plugin</artifactId>
               <version>${enforcer.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-install-plugin</artifactId>
               <version>${install.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jar-plugin</artifactId>
               <version>${jar.plugin.version}</version>
               <configuration>
                  <archive>
                     <manifest>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                     </manifest>
                  </archive>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <version>${javadoc.plugin.version}</version>
               <configuration>
                  <archive>
                     <manifest>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                     </manifest>
                  </archive>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-release-plugin</artifactId>
               <version>${release.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-resources-plugin</artifactId>
               <version>${resources.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-site-plugin</artifactId>
               <version>${site.plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-source-plugin</artifactId>
               <version>${source.plugin.version}</version>
               <configuration>
                  <archive>
                     <manifest>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                     </manifest>
                  </archive>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>${surefire.plugin.version}</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.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>attach-javadocs</id>
                        <goals>
                           <goal>jar</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>
