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

    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.exoplatform.jcr</groupId>
    <artifactId>jcr-parent</artifactId>
    <version>7.2.x-experience-SNAPSHOT</version>
  </parent>
  <artifactId>exo.jcr.component.ext</artifactId>
  <name>eXo PLF:: JCR :: Component :: Extension Service</name>
  <description>Implementation of Extension Service of Exoplatform SAS 'eXo JCR' project.</description>
  <properties>
      <exo.test.coverage.ratio>0.34</exo.test.coverage.ratio>
      <jcr.test.configuration.file>/conf/standalone/test-configuration.xml</jcr.test.configuration.file>
      <properties.url.suffix>.properties</properties.url.suffix>
      <properties.url.prefix>classpath:/conf/standalone/default</properties.url.prefix>
      <batch.size>-1</batch.size>
      <use.sequence>auto</use.sequence>
      <debug.opts />
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.exoplatform.jcr</groupId>
      <artifactId>exo.jcr.component.core</artifactId>
      <exclusions>
        <exclusion>
          <groupId>xerces</groupId>
          <artifactId>xerces</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.meeds.ws</groupId>
      <artifactId>exo.ws.rest.ext</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.kernel</groupId>
      <artifactId>exo.kernel.commons.test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.meeds.portal</groupId>
      <artifactId>portal.component.identity</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <includes>
          <include>**/*.pdf</include>
          <include>**/*.xml</include>
          <include>**/*.xls</include>
          <include>**/*.doc</include>
          <include>**/*.groovy</include>
          <include>**/login.conf</include>
          <include>**/*.properties</include>
        </includes>
      </testResource>
    </testResources>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemProperties>
               <property>
                  <name>jcr.test.configuration.file</name>
                  <value>${jcr.test.configuration.file}</value>
               </property>
               <property>
                  <name>exo.properties.url</name>
                  <value>${properties.url.prefix}${properties.url.suffix}</value>
               </property>
               <property>
                  <name>use-sequence</name>
                  <value>${use.sequence}</value>
               </property>
            </systemProperties>
            <includes>
              <include>org/exoplatform/services/jcr/ext/**/Test*.java</include>
              <include>org/exoplatform/services/jcr/ext/**/*Test.java</include>
            </includes>
            <excludes>
              <exclude>**/BaseStandaloneTest.java</exclude>
              <exclude>**/backup/AbstractBackupTestCase.java</exclude>
              <exclude>**/backup/BaseRDBMSBackupTest.java</exclude>
              <exclude>**/backup/TestBackupRestart.java</exclude>
              <exclude>**/replication/**</exclude>
              <exclude>**/repository/creation/cluster/**</exclude>
            </excludes>
          </configuration>
        </plugin>
         <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>prepare-test-policy</id>
                  <phase>process-test-resources</phase>
                  <configuration>
                     <target>
                        <echo>Creating Access Policy for tests</echo>
                        <makeurl file="${settings.localRepository}" property="localRepositoryURL" />
                        <makeurl file="${project.build.outputDirectory}" property="outputDirectoryURL" />
                        <makeurl file="${project.build.testOutputDirectory}" property="testOutputDirectoryURL" />
                        <copy todir="${project.build.testOutputDirectory}" overwrite="true">
                           <fileset dir="${project.basedir}/src/test/resources/">
                              <include name="test.policy" />
                           </fileset>
                           <filterset>
                              <filter token="MAVEN_REPO" value="${localRepositoryURL}" />
                              <filter token="MAIN_CLASSES" value="${outputDirectoryURL}" />
                              <filter token="TEST_CLASSES" value="${testOutputDirectoryURL}" />
                           </filterset>
                        </copy>
                     </target>
                  </configuration>
                  <goals>
                     <goal>run</goal>
                  </goals>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>ant</groupId>
                  <artifactId>ant-optional</artifactId>
                  <version>1.5.3-1</version>
               </dependency>
            </dependencies>
         </plugin>
      </plugins>
  </build>
  <profiles>
     <profile>
         <id>backup</id>
           <properties>
              <jcr.test.configuration.file>/conf/standalone/test-configuration-backup.xml</jcr.test.configuration.file>
           </properties>
           <build>
              <plugins>
                <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-jar-plugin</artifactId>
                   <configuration>
                     <archive>
                       <manifest>
                         <addClasspath>true</addClasspath>
                       </manifest>
                     </archive>
                   </configuration>
                 </plugin>
                 <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-surefire-plugin</artifactId>
                   <configuration>
                     <systemProperties>
                        <property>
                           <name>jcr.test.configuration.file</name>
                           <value>${jcr.test.configuration.file}</value>
                        </property>
                        <property>
                           <name>exo.properties.url</name>
                           <value>${properties.url.prefix}${properties.url.suffix}</value>
                       </property>
                       <property>
                         <name>exo.jcr.config.default.all.container.batch-size</name>
                         <value>1000</value>
                       </property>
                        <property>
                           <name>exo.jcr.config.default.all.container.batch-size</name>
                           <value>${batch.size}</value>
                        </property>
                        <property>
                           <name>use-sequence</name>
                           <value>${use.sequence}</value>
                        </property>
                     </systemProperties>
                     <includes>
                       <include>org/exoplatform/services/jcr/ext/backup/usecase/TestBackupRestore.java</include>
                     </includes>
                   </configuration>
                 </plugin>
                  <plugin>
                     <artifactId>maven-antrun-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>prepare-test-policy</id>
                           <phase>process-test-resources</phase>
                           <configuration>
                              <target>
                                 <echo>Creating Access Policy for tests</echo>
                                 <makeurl file="${settings.localRepository}" property="localRepositoryURL" />
                                 <makeurl file="${project.build.outputDirectory}" property="outputDirectoryURL" />
                                 <makeurl file="${project.build.testOutputDirectory}" property="testOutputDirectoryURL" />
                                 <copy todir="${project.build.testOutputDirectory}" overwrite="true">
                                    <fileset dir="${project.basedir}/src/test/resources/">
                                       <include name="test.policy" />
                                    </fileset>
                                    <filterset>
                                       <filter token="MAVEN_REPO" value="${localRepositoryURL}" />
                                       <filter token="MAIN_CLASSES" value="${outputDirectoryURL}" />
                                       <filter token="TEST_CLASSES" value="${testOutputDirectoryURL}" />
                                    </filterset>
                                 </copy>
                              </target>
                           </configuration>
                           <goals>
                              <goal>run</goal>
                           </goals>
                        </execution>
                     </executions>
                     <dependencies>
                        <dependency>
                           <groupId>ant</groupId>
                           <artifactId>ant-optional</artifactId>
                           <version>1.5.3-1</version>
                        </dependency>
                     </dependencies>
                  </plugin>
               </plugins>
           </build>
     </profile>
     <profile>
         <id>oracle-10G-R2</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/oracle</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>ojdbc</artifactId>
               <version>10.2.0.4</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>orai18n</artifactId>
               <version>10.2.0.4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>oracle-11G-R1</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/oracle</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>ojdbc</artifactId>
               <version>11.1.0.6.0</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>orai18n</artifactId>
               <version>11.1.0.6.0</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>oracle-11G-R2</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/oracle</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>ojdbc</artifactId>
               <version>11.2.0.1.0</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>orai18n</artifactId>
               <version>11.2.0.1.0</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>oracle-12C</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/oracle</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>ojdbc</artifactId>
               <version>12.1.0.1</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>ojdbc</groupId>
               <artifactId>orai18n</artifactId>
               <version>12.1.0.1</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>mysql-5.0</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/mysql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>mysql</groupId>
               <artifactId>mysql-connector-java</artifactId>
               <version>5.0.8</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>mysql-5.1</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/mysql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>mysql</groupId>
               <artifactId>mysql-connector-java</artifactId>
               <version>5.1.14</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>mysql-5.5</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/mysql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>mysql</groupId>
               <artifactId>mysql-connector-java</artifactId>
               <version>5.1.18</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>mysql-5.6</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/mysql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>mysql</groupId>
               <artifactId>mysql-connector-java</artifactId>
               <version>5.1.30</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>mssql</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/mssql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>com.microsoft</groupId>
               <artifactId>sqljdbc</artifactId>
               <version>4.0.2206.100</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>db2-9.7</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/db2</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>com.ibm.db2</groupId>
               <artifactId>db2jcc4</artifactId>
               <version>9.7</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>com.ibm.db2</groupId>
               <artifactId>db2jcc_license_cu</artifactId>
               <version>9.7</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>db2-10.1</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/db2</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>com.ibm.db2</groupId>
               <artifactId>db2jcc4</artifactId>
               <version>10.1</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>com.ibm.db2</groupId>
               <artifactId>db2jcc_license_cu</artifactId>
               <version>10.1</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>sybase</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/sybase</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>com.sybase.jdbc4.jdbc</groupId>
               <artifactId>jconn4</artifactId>
               <version>7.0.7</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgsql-8.2</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <version>8.2-507.jdbc4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgsql-8.3</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <version>8.3-606.jdbc4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgsql-8.4</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <version>8.4-702.jdbc4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgsql-9.1</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <version>9.1-902.jdbc4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgsql-9.2</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>org.postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <version>9.2-1003-jdbc4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgsql-9.3</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>org.postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <version>9.3-1102-jdbc4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgsql-9.4</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>org.postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <version>9.4-1203-jdbc4</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgpls-9.2</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgpls</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>com.edb</groupId>
               <artifactId>edb</artifactId>
               <version>9.2.1.3</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgpls-9.3</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgpls</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>com.edb</groupId>
               <artifactId>edb</artifactId>
               <version>9.3.1.3</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>pgpls-9.4</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/pgpls</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
               <groupId>com.edb</groupId>
               <artifactId>edb</artifactId>
               <version>9.4.1.3</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>h2</id>
         <properties>
            <properties.url.prefix>classpath:/conf/standalone/h2</properties.url.prefix>
         </properties>
         <dependencies>
            <dependency>
              <groupId>com.h2database</groupId>
              <artifactId>h2</artifactId>
              <version>1.3.174</version>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>batch-update</id>
         <properties>
            <batch.size>1000</batch.size>
         </properties>
      </profile>
      <profile>
         <id>use-sequence-enabled</id>
         <properties>
            <use.sequence>true</use.sequence>
         </properties>
      </profile>
      <profile>
         <id>use-sequence-disabled</id>
         <properties>
            <use.sequence>false</use.sequence>
         </properties>
      </profile>
  </profiles>
</project>
