<!--
  ~ Copyright (C) 2003-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>
   
   <groupId>org.chromattic</groupId>
   <artifactId>chromattic.parent</artifactId>
   <version>1.1.0-beta2</version>
  <packaging>pom</packaging>

   <name>Chromattic Framework</name>
   <description>The Chromattic projects is an object mapper framework that use Java Content Repository as back end storage.</description>
   <url>http://chromattic.googlecode.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>

  <developers>
    <developer>
      <id>julien.viet</id>
      <name>Julien Viet</name>
      <email>julien.viet@exoplatform.com</email>
      <roles>
        <role>Owner</role>
      </roles>
    </developer>
    <developer>
      <id>aheritier</id>
      <name>Arnaud Heritier</name>
      <email>arnaud.heritier@exoplatform.com</email>
      <roles>
        <role>Committer</role>
      </roles>
    </developer>
  </developers>
  
  <scm>
    <connection>scm:svn:http://chromattic.googlecode.com/svn/tags/1.1.0-beta2</connection>
    <developerConnection>scm:svn:https://chromattic.googlecode.com/svn/tags/1.1.0-beta2</developerConnection>
    <url>http://code.google.com/p/chromattic/source/browse/tags/1.1.0-beta2</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>repository.exoplatform.org</id>
      <url>${chromattic.releases.repo.url}</url>
    </repository>
    <snapshotRepository>
      <id>repository.exoplatform.org</id>
      <url>${chromattic.snapshots.repo.url}</url>    
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <!-- Repositories URLs -->
    <chromattic.releases.repo.url>http://repository.exoplatform.org/service/local/staging/deploy/maven2/</chromattic.releases.repo.url>
    <chromattic.snapshots.repo.url>http://repository.exoplatform.org/content/repositories/chromattic-snapshots/</chromattic.snapshots.repo.url>
  
    <!-- Dependencies versions -->
    <reflext.version>1.1.0-beta12</reflext.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-surefire-plugin -->
    <!--<argLine>${env.MAVEN_OPTS}</argLine>-->
    <argLine>-Xshare:auto -Xms128m -Xmx512m -XX:MaxPermSize=256M</argLine>

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

  <dependencyManagement>

    <dependencies>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.test</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <!-- Internal dependencies -->
      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.api</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>
      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.api</artifactId>
        <version>1.1.0-beta2</version>
        <classifier>sources</classifier>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.query</artifactId>
        <version>1.1.0-beta2-SNAPSHOT</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.query.apiV1</artifactId>
        <version>1.1.0-beta2-SNAPSHOT</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.apt</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.cglib</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.common</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.metamodel</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.core</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.exo</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.spi</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.ext</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.groovy</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.testgenerator</artifactId>
        <version>1.1.0-beta2</version>
      </dependency>

      <!-- External dependencies -->

      <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>2.2</version>
      </dependency>

      <dependency>
        <groupId>javax.jcr</groupId>
        <artifactId>jcr</artifactId>
        <version>1.0</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.2</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.kernel</groupId>
        <artifactId>exo.kernel.container</artifactId>
        <version>2.3.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.kernel</groupId>
        <artifactId>exo.kernel.component.command</artifactId>
        <version>2.3.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.jcr</groupId>
        <artifactId>exo.jcr.component.core</artifactId>
        <version>1.14.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.jcr</groupId>
        <artifactId>exo.jcr.component.ext</artifactId>
        <version>1.14.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.ws</groupId>
        <artifactId>exo.ws.commons</artifactId>
        <version>2.2.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.ws</groupId>
        <artifactId>exo.ws.rest.core</artifactId>
        <version>2.2.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.ws</groupId>
        <artifactId>exo.ws.rest.ext</artifactId>
        <version>2.2.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.exoplatform.ws</groupId>
        <artifactId>exo.ws.testframework</artifactId>
        <version>2.2.0-CR1</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.5.8</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>0.9.17</version>
      </dependency>

      <dependency>
        <groupId>org.reflext</groupId>
        <artifactId>reflext.api</artifactId>
        <version>${reflext.version}</version>
      </dependency>

      <dependency>
        <groupId>org.reflext</groupId>
        <artifactId>reflext.apt</artifactId>
        <version>${reflext.version}</version>
      </dependency>

      <dependency>
        <groupId>org.reflext</groupId>
        <artifactId>reflext.core</artifactId>
        <version>${reflext.version}</version>
      </dependency>

      <dependency>
        <groupId>org.reflext</groupId>
        <artifactId>reflext.jlr</artifactId>
        <version>${reflext.version}</version>
      </dependency>

      <dependency>
        <groupId>org.reflext</groupId>
        <artifactId>reflext.spi</artifactId>
        <version>${reflext.version}</version>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.metamodel</artifactId>
        <version>${version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.chromattic</groupId>
        <artifactId>chromattic.core</artifactId>
        <version>${version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

    </dependencies>

  </dependencyManagement>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <pluginManagement>
      <!-- All plugins versions have to be set -->
      <!-- Plugins are sorted by shortname : clean, deploy, ... -->
      <plugins>
        <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-checkstyle-plugin</artifactId>		
          <version>2.4</version>		
        </plugin>		
        <plugin>		
          <groupId>com.atlassian.maven.plugins</groupId>		
          <artifactId>maven-clover2-plugin</artifactId>		
          <version>2.6.3</version>		
        </plugin>		
        <plugin>		
          <groupId>org.codehaus.mojo</groupId>		
          <artifactId>cobertura-maven-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.1</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-eclipse-plugin</artifactId>
          <version>2.7</version>
        </plugin>     
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.0-beta-1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>		
          <artifactId>findbugs-maven-plugin</artifactId>		
          <version>2.3</version>		
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.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.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <!-- Too many issues with 2.6 versions -->
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>		
          <artifactId>maven-pmd-plugin</artifactId>		
          <version>2.4</version>		
        </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.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>2.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>1.0-beta-1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.1</version>
        </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-surefire-plugin</artifactId>
        <configuration>
          <!-- export DYLD_LIBRARY_PATH=/Users/julien/java/jprofiler5/bin/macos -->
          <!--<argLine>-agentlib:jprofilerti=port=8849 -Xbootclasspath/a:/Users/julien/java/jprofiler5/bin/agent.jar</argLine>-->
          <systemProperties>
            <property>
              <name>com.arjuna.ats.arjuna.objectstore.objectStoreDir</name>
              <value>${project.build.directory}</value>
            </property>
            <property>
              <name>log.output.path</name>
              <value>${project.build.directory}</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>

     <profile>
        <id>Java5</id>
        <activation>
           <jdk>1.5</jdk>
        </activation>
        <modules>
           <module>test</module>
           <module>api</module>
           <module>spi</module>
           <module>common</module>
           <module>metamodel</module>
           <module>cglib</module>
           <module>exo</module>
           <module>core</module>
           <module>ext</module>
           <module>groovy</module>
           <module>dataobject</module>
           <module>testgenerator</module>
           <module>docs</module>
        </modules>
     </profile>
     
     <profile>
        <id>Java6</id>
        <activation>
           <jdk>1.6</jdk>
        </activation>
        <modules>
           <module>test</module>
           <module>api</module>
           <module>spi</module>
           <module>common</module>
           <module>metamodel</module>
           <module>apt</module>
           <module>cglib</module>
           <module>exo</module>
           <module>core</module>
           <module>ext</module>
           <module>groovy</module>
           <module>dataobject</module>
           <module>testgenerator</module>
           <module>docs</module>
        </modules>
     </profile>
     
    <profile>

      <!-- Generation of a jar containing the source code -->
      <!-- Generation can be inactivated by adding -P-sources or -Dskip-sources in the command line -->
      <id>sources</id>
      <activation>
        <property>
          <name>!skip-sources</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!-- This profile is used when we are doing a release -->
      <id>release</id>
      <build>
        <plugins>
          <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>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>sign-artifacts</id>
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>
