<?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-meeds-qaui-SNAPSHOT</version>
   </parent>
   <artifactId>exo.jcr.component.core</artifactId>
   <name>eXo PLF:: JCR :: Component :: Core Service</name>
   <description>Implementation of Core Service of Exoplatform SAS 'eXo Core' project.</description>
   <properties>
      <exo.test.coverage.ratio>0.51</exo.test.coverage.ratio>
      <jcr.test.configuration.file>/conf/standalone/test-configuration-ijdbc-ispn.xml</jcr.test.configuration.file>
      <cache.enabled>true</cache.enabled>
      <use.sequence>auto</use.sequence>
      <value.storage.enabled>true</value.storage.enabled>
      <statistics.enabled>false</statistics.enabled>
      <batch.size>-1</batch.size>
      <dialect>auto</dialect>
      <use.distributed.cache>false</use.distributed.cache>
      <properties.url.suffix>-sjdbc.properties</properties.url.suffix>
      <properties.url.prefix>classpath:/conf/standalone/default</properties.url.prefix>
      <test.cache.all>**/persistent/cache/**</test.cache.all>
      <test.cache.exclude>**/persistent/cache/foo/**</test.cache.exclude>
      <test.exclude>**/foo/foo/**</test.exclude>
      <debug.opts />
      <contiperf.version>2.4.3</contiperf.version>
   </properties>
   <dependencies>
      <dependency>
         <groupId>javax.jcr</groupId>
         <artifactId>jcr</artifactId>
      </dependency>
      <dependency>
         <groupId>io.meeds.kernel</groupId>
         <artifactId>exo.kernel.commons.test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.exoplatform.commons-exo</groupId>
         <artifactId>exo.kernel.component.command</artifactId>
      </dependency>
      <dependency>
         <groupId>io.meeds.kernel</groupId>
         <artifactId>exo.kernel.component.common</artifactId>
      </dependency>
      <dependency>
         <groupId>io.meeds.kernel</groupId>
         <artifactId>exo.kernel.commons</artifactId>
      </dependency>
      <dependency>
         <groupId>io.meeds.core</groupId>
         <artifactId>exo.core.component.organization.api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.exoplatform.commons-exo</groupId>
         <artifactId>exo.core.component.database</artifactId>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging</artifactId>
            </exclusion>
         </exclusions>
      </dependency>


      <dependency>
         <groupId>org.apache.pdfbox</groupId>
         <artifactId>pdfbox</artifactId>
         <exclusions>
            <exclusion>
               <groupId>commons-logging</groupId>
               <artifactId>commons-logging</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.htmlparser</groupId>
         <artifactId>htmlparser</artifactId>
         <exclusions>
            <exclusion>
               <groupId>com.sun</groupId>
               <artifactId>tools</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.apache.poi</groupId>
         <artifactId>poi</artifactId>
         <exclusions>
            <exclusion>
               <groupId>log4j</groupId>
               <artifactId>log4j</artifactId>
            </exclusion>
         </exclusions>
      </dependency>

      <dependency>
         <groupId>org.apache.poi</groupId>
         <artifactId>poi-ooxml</artifactId>
         <exclusions>
            <exclusion>
               <groupId>log4j</groupId>
               <artifactId>log4j</artifactId>
            </exclusion>
            <exclusion>
               <groupId>xml-apis</groupId>
               <artifactId>xml-apis</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.apache.poi</groupId>
         <artifactId>poi-ooxml-full</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.tika</groupId>
         <artifactId>tika-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.apache.tika</groupId>
         <artifactId>tika-parsers</artifactId>
         <exclusions>
            <exclusion>
               <groupId>javassist</groupId>
               <artifactId>javassist</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.tika</groupId>
               <artifactId>tika-core</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.cxf</groupId>
               <artifactId>cxf-rt-rs-client</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.geronimo.specs</groupId>
               <artifactId>geronimo-stax-api_1.0_spec</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.pdfbox</groupId>
               <artifactId>pdfbox</artifactId>
            </exclusion>
            <exclusion>
               <groupId>jdom</groupId>
               <artifactId>jdom</artifactId>
            </exclusion>
            <exclusion>
               <groupId>xml-apis</groupId>
               <artifactId>xml-apis</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-simple</artifactId>
            </exclusion>
            <!-- Not used by default in Tika 1.5 and make conflicts with nekohtml
            since it embed some of the nekohtml classes -->
            <exclusion>
               <groupId>de.l3s.boilerpipe</groupId>
               <artifactId>boilerpipe</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
      </dependency>

      <dependency>
         <groupId>io.meeds.portal</groupId>
         <artifactId>portal.component.identity</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.meeds.ws</groupId>
        <artifactId>exo.ws.rest.core</artifactId>
        <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>io.meeds.ws</groupId>
         <artifactId>exo.ws.rest.ext</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>io.meeds.ws</groupId>
         <artifactId>exo.ws.commons</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.lucene</groupId>
         <artifactId>lucene-core</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.lucene</groupId>
         <artifactId>lucene-spellchecker</artifactId>
      </dependency>
      <dependency>
         <groupId>oswego-concurrent</groupId>
         <artifactId>concurrent</artifactId>
      </dependency>
      <dependency>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
      </dependency>
      <dependency>
        <groupId>org.jgroups</groupId>
        <artifactId>jgroups</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.ws.commons</groupId>
         <artifactId>ws-commons-util</artifactId>
         <exclusions>
            <exclusion>
               <groupId>xml-apis</groupId>
               <artifactId>xml-apis</artifactId>
            </exclusion>
            <exclusion>
               <groupId>junit</groupId>
               <artifactId>junit</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
     	  <groupId>org.jboss</groupId>
     	  <artifactId>jboss-common-core</artifactId>
        <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
        </exclusions>
      </dependency>
      <dependency>
         <groupId>org.antlr</groupId>
         <artifactId>antlr</artifactId>
      </dependency>
      <dependency>
         <groupId>org.antlr</groupId>
         <artifactId>gunit</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>junit</groupId>
               <artifactId>junit</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.exoplatform.commons-exo</groupId>
         <artifactId>exo.kernel.component.ext.cache.impl.infinispan.v8</artifactId>
      </dependency>
      <!-- TCK binaries and deps for repo stub, some eXo API test -->
      <dependency>
         <groupId>org.apache.jackrabbit</groupId>
         <artifactId>jackrabbit-jcr-tests</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
               <groupId>junit</groupId>
               <artifactId>junit</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.apache.jackrabbit</groupId>
         <artifactId>jackrabbit-jcr-tests</artifactId>
         <classifier>sources</classifier>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
               <groupId>junit</groupId>
               <artifactId>junit</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <!-- TCK binaries and deps for repo stub, some eXo API test -->
      <dependency>
        <groupId>org.infinispan</groupId>
        <artifactId>infinispan-core</artifactId>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.spec.javax.transaction</groupId>
               <artifactId>jboss-transaction-api_1.1_spec</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
        <groupId>org.infinispan</groupId>
        <artifactId>infinispan-cachestore-jdbc</artifactId>
      </dependency>
      <!-- ===== Databases JDBC support for tests ===== -->
      <dependency>
         <groupId>org.hsqldb</groupId>
         <artifactId>hsqldb</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>com.github.javatlacati</groupId>
         <artifactId>contiperf</artifactId>
         <version>${contiperf.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.spec.javax.rmi</groupId>
         <artifactId>jboss-rmi-api_1.0_spec</artifactId>
      </dependency>
   </dependencies>
  <!-- ======================================================================= -->
   <build>
      <resources>
         <resource>
            <directory>src/main/resources</directory>
            <includes>
               <include>**/*.xml</include>
               <include>**/*.sql</include>
               <include>**/*.dtd</include>
            </includes>
         </resource>
      </resources>
      <testResources>
         <testResource>
            <directory>src/test/resources</directory>
            <includes>
               <include>**/*.properties</include>
               <include>login.conf</include>
               <include>**/*.xml</include>
               <include>**/*.drl</include>
               <include>**/*.vm</include>
               <include>**/*.doc</include>
               <include>**/*.xls</include>
               <include>**/*.ppt</include>
               <include>**/*.txt</include>
               <include>**/*.tiff</include>
               <include>**/*.pdf</include>
               <include>**/*.dtd</include>
               <include>**/*.policy</include>
               <include>**/*.cnd</include>
            </includes>
         </testResource>
      </testResources>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <argLine>@{surefire.argLine} -Djava.net.preferIPv4Stack=true</argLine>
               <systemProperties>
                  <property>
                     <name>jcr.test.configuration.file</name>
                     <value>${jcr.test.configuration.file}</value>
                  </property>
                  <property>
                     <name>emma.coverage.out.file</name>
                     <value>target/emma/coverage.ec</value>
                  </property>
                  <property>
                     <name>cache-enabled</name>
                     <value>${cache.enabled}</value>
                  </property>
                  <property>
                     <name>use-sequence</name>
                     <value>${use.sequence}</value>
                  </property>
                  <property>
                     <name>value-storage-enabled</name>
                     <value>${value.storage.enabled}</value>
                  </property>
                  <property>
                     <name>dialect</name>
                     <value>${dialect}</value>
                  </property>
                  <property>
                     <name>use-distributed-cache</name>
                     <value>${use.distributed.cache}</value>
                  </property>
                  <property>
                      <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
                      <value>${statistics.enabled}</value>
                  </property>
                  <property>
                      <name>exo.properties.url</name>
                      <value>${properties.url.prefix}${properties.url.suffix}</value>
                  </property>
                  <!-- Avoid the firewall -->
                  <property>
                     <name>jgroups.bind_addr</name>
                     <value>127.0.0.1</value>
                  </property>
                  <property>
                     <name>exo.jcr.config.default.all.container.batch-size</name>
                     <value>${batch.size}</value>
                  </property>
               </systemProperties>
               <includes>
                  <include>org/exoplatform/services/jcr/api/**/Test*.java</include>
                  <include>org/exoplatform/services/jcr/usecases/**/Test*.java</include>
                  <include>org/exoplatform/services/jcr/usecases/**/*Test.java</include>
                  <include>org/exoplatform/services/jcr/impl/**/Test*.java</include>
               </includes>
               <excludes>
                  <exclude>org/exoplatform/services/jcr/**/api/TestAll.java</exclude>
                  <exclude>org/exoplatform/services/jcr/**/impl/**/Base*.java</exclude>
                  <exclude>org/exoplatform/services/jcr/**/usecases/BaseUsecasesTest.java</exclude>
                  <exclude>org/exoplatform/services/jcr/usecases/common/RemoveSameNameSiblingUnfixedTest.java</exclude>
                  <exclude>org/exoplatform/services/jcr/**/impl/**/SQLBenchmarkTest.java</exclude>
                  <!-- Implementation Specific Excludes -->
                  <exclude>${test.cache.exclude}</exclude>
                  <exclude>${test.exclude}</exclude>
               </excludes>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.jibx</groupId>
            <artifactId>maven-jibx-plugin</artifactId>
            <configuration>
               <directory>src/main/resources</directory>
               <includes>
                  <includes>binding*.xml</includes>
               </includes>
            </configuration>
            <executions>
               <execution>
                  <goals>
                     <goal>bind</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>unpack</id>
                  <phase>generate-test-sources</phase>
                  <goals>
                     <goal>unpack</goal>
                  </goals>
                  <configuration>
                     <artifactItems>
                        <artifactItem>
                           <groupId>org.apache.jackrabbit</groupId>
                           <artifactId>jackrabbit-jcr-tests</artifactId>
                           <classifier>sources</classifier>
                           <type>jar</type>
                           <overWrite>false</overWrite>
                        </artifactItem>
                     </artifactItems>
                     <outputDirectory>${project.build.directory}/jackrabbit-jcr-tests</outputDirectory>
                  </configuration>
               </execution>
            </executions>
          </plugin> 
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>generate-sources</phase> 
                <goals>
                  <goal>test-jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>test-jar</goal>
                </goals>
              </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>add-test-resource</id>
                  <phase>generate-test-sources</phase>
                  <goals>
                     <goal>add-test-resource</goal>
                  </goals>
                  <configuration>
                     <resources>
                        <resource>
                           <directory>${project.build.directory}/jackrabbit-jcr-tests</directory>
                           <excludes>
                           </excludes>
                        </resource>
                     </resources>
                  </configuration>
               </execution> 
               <execution>
                  <id>add-test-source</id>
                  <phase>generate-test-sources</phase>
                  <goals>
                     <goal>add-test-source</goal>
                  </goals>
                  <configuration>
                     <sources>
                        <source>${project.build.directory}/jackrabbit-jcr-tests</source>
                     </sources>
                  </configuration>
               </execution>
            </executions>
         </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>delete-sources</id>
                  <phase>process-sources</phase>
                  <configuration>
                     <target>
                        <echo>Remove files that have been customized</echo>
                        <delete>
                           <fileset dir="${project.build.directory}/generated-sources/javacc/org/exoplatform/services/jcr/impl/core/query">
                              <include name="sql/ASTLiteral.java" />
                              <include name="sql/ASTContainsExpression.java" />
                              <include name="sql/ASTPredicate.java" />
                              <include name="sql/ASTIdentifier.java" />
                              <include name="xpath/SimpleNode.java" />
                           </fileset>
                        </delete>
                     </target>
                  </configuration>
                  <goals>
                     <goal>run</goal>
                  </goals>
               </execution>
               <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>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>javacc-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>fulltext</id>
                  <configuration>
                     <sourceDirectory>${basedir}/src/main/javacc/fulltext</sourceDirectory>
                  </configuration>
                  <goals>
                     <goal>jjtree-javacc</goal>
                  </goals>
               </execution>
               <execution>
                  <id>sql</id>
                  <configuration>
                     <sourceDirectory>${basedir}/src/main/javacc/sql</sourceDirectory>
                  </configuration>
                  <goals>
                     <goal>jjtree-javacc</goal>
                  </goals>
               </execution>
               <execution>
                  <id>xpath</id>
                  <configuration>
                     <sourceDirectory>${basedir}/src/main/javacc/xpath</sourceDirectory>
                  </configuration>
                  <goals>
                     <goal>jjtree-javacc</goal>
                  </goals>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>net.java.dev.javacc</groupId>
                  <artifactId>javacc</artifactId>
                  <version>6.1.2</version>
               </dependency>
            </dependencies>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>taglist-maven-plugin</artifactId>
            <version>2.4</version>
         </plugin>
         <!--  Generate java files from ANTLR grammar files
               in the 'target/generated-sources/antlr3' direcctory   
               Grammar files must be located in 'src/test/antlr3' directory
               Their names must me *.g -->
         <plugin>
            <groupId>org.antlr</groupId>
            <artifactId>antlr3-maven-plugin</artifactId>
            <version>3.5.2</version>
            <executions>
               <execution>
                  <goals>
                     <goal>antlr</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
               <execution>
                  <id>jar-with-dependencies</id>
                  <phase>package</phase>
                  <goals>
                     <goal>single</goal>
                  </goals>
                  <configuration>
                     <primaryArtifact>false</primaryArtifact>
                     <finalName>${project.artifactId}</finalName>
                     <descriptors>
                        <descriptor>${basedir}/src/main/assemblies/binary-assembly.xml</descriptor>
                     </descriptors>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
   <profiles>
    <!-- *** -->
    <!-- TCK -->
    <!-- *** -->
    <!-- Use "mvn -Prun-tck" to launch only them -->
      <profile>
         <id>run-tck</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                  <!-- TAKE CARE TO UPDATE ALSO run-all PROFILE -->
                     <systemProperties>
                        <property>
                           <name>jcr.test.configuration.file</name>
                           <value>${jcr.test.configuration.file}</value>
                        </property>
                        <property>
                           <name>emma.coverage.out.file</name>
                           <value>target/emma/coverage.ec</value>
                        </property>
                        <property>
                           <name>cache-enabled</name>
                           <value>${cache.enabled}</value>
                        </property>
                        <property>
                           <name>use-sequence</name>
                           <value>${use.sequence}</value>
                        </property>
                        <property>
                           <name>value-storage-enabled</name>
                           <value>${value.storage.enabled}</value>
                        </property>
                         <property>
                           <name>dialect</name>
                           <value>${dialect}</value>
                         </property>
                         <property>
                           <name>use-distributed-cache</name>
                           <value>${use.distributed.cache}</value>
                        </property>
                         <property>
                           <name>known.issues</name>
                           <value>org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreName
                              org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreOrder2
                              org.apache.jackrabbit.test.api.nodetype.PropertyDefTest#testIsRequiredType
                              org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersionable
                              org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersion</value>
                        </property>
                        <property>
                           <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
                           <value>${statistics.enabled}</value>
                        </property>
                        <property>
                           <name>exo.properties.url</name>
                           <value>${properties.url.prefix}${properties.url.suffix}</value>
                        </property>
                        <!-- Avoid the firewall -->
                        <property>
                           <name>jgroups.bind_addr</name>
                           <value>127.0.0.1</value>
                        </property>
                        <!-- Need for TCK tests -->
                        <property>
                           <name>exo.jcr.allow.closed.session.usage</name>
                           <value>true</value>
                        </property>
                        <property>
                           <name>exo.jcr.config.default.all.container.batch-size</name>
                           <value>${batch.size}</value>
                        </property>
                     </systemProperties>
                     <includes>
                        <include>org/apache/jackrabbit/test/api/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/observation/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/lock/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/nodetype/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/query/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/version/*Test.java</include>
                     </includes>
                     <excludes>
                        <exclude>org/apache/jackrabbit/test/api/TestAll.java</exclude>
                        <exclude>org/apache/jackrabbit/test/api/**/Abstract*.java</exclude>
                        <exclude>org/apache/jackrabbit/test/api/**/FrozenNodeTest.java</exclude>
                        <exclude>org/exoplatform/services/jcr/impl/core/security/Test*.java</exclude>
                        <!-- Implementation Specific Excludes -->
                        <exclude>${test.cache.exclude}</exclude>
                        <exclude>${test.exclude}</exclude>
                     </excludes>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
    <!-- *** -->
    <!-- ALL -->
    <!-- *** -->
    <!-- Use "mvn -Prun-all" to launch default tests and TCK -->
      <profile>
         <id>run-all</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <!-- TAKE CARE TO UPDATE ALSO run-tck PROFILE -->
                     <systemProperties>
                        <property>
                           <name>jcr.test.configuration.file</name>
                           <value>${jcr.test.configuration.file}</value>
                        </property>
                        <property>
                           <name>emma.coverage.out.file</name>
                           <value>target/emma/coverage.ec</value>
                        </property>
                        <property>
                            <name>cache-enabled</name>
                            <value>${cache.enabled}</value>
                        </property>
                        <property>
                            <name>use-sequence</name>
                            <value>${use.sequence}</value>
                        </property>
                        <property>
                            <name>value-storage-enabled</name>
                            <value>${value.storage.enabled}</value>
                        </property>
                        <property>
                            <name>dialect</name>
                            <value>${dialect}</value>
                        </property>
                        <property>
                           <name>use-distributed-cache</name>
                           <value>${use.distributed.cache}</value>
                        </property>
                        <property>
                           <name>known.issues</name>
                           <value>org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreName
                              org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreOrder2
                              org.apache.jackrabbit.test.api.nodetype.PropertyDefTest#testIsRequiredType
                              org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersionable
                              org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersion</value>
                        </property>
                        <property>
                           <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
                           <value>${statistics.enabled}</value>
                        </property>
                        <property>
                           <name>exo.properties.url</name>
                           <value>${properties.url.prefix}${properties.url.suffix}</value>
                        </property>
                        <!-- Avoid the firewall -->
                        <property>
                           <name>jgroups.bind_addr</name>
                           <value>127.0.0.1</value>
                        </property>
                        <!-- Need for TCK tests -->
                        <property>
                           <name>exo.jcr.allow.closed.session.usage</name>
                           <value>true</value>
                        </property>
                        <property>
                           <name>exo.jcr.config.default.all.container.batch-size</name>
                           <value>${batch.size}</value>
                       </property>
                     </systemProperties>
                     <includes>
                        <!-- From default tests -->
                        <include>org/exoplatform/services/jcr/api/**/Test*.java</include>
                        <include>org/exoplatform/services/jcr/usecases/**/Test*.java</include>
                        <include>org/exoplatform/services/jcr/usecases/**/*Test.java</include>
                        <include>org/exoplatform/services/jcr/impl/**/Test*.java</include>
                        <!-- From TCK -->
                        <include>org/apache/jackrabbit/test/api/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/observation/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/lock/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/nodetype/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/query/*Test.java</include>
                        <include>org/apache/jackrabbit/test/api/version/*Test.java</include>
                     </includes>
                     <excludes>
                        <exclude>org/exoplatform/services/jcr/**/api/TestAll.java</exclude>
                        <exclude>org/exoplatform/services/jcr/**/impl/**/Base*.java</exclude>
                        <exclude>org/exoplatform/services/jcr/**/usecases/BaseUsecasesTest.java</exclude>
                        <exclude>org/exoplatform/services/jcr/usecases/common/RemoveSameNameSiblingUnfixedTest.java</exclude>
                        <exclude>org/exoplatform/services/jcr/**/impl/**/SQLBenchmarkTest.java</exclude>
                        <!-- From TCK -->
                        <exclude>org/apache/jackrabbit/test/api/TestAll.java</exclude>
                        <exclude>org/apache/jackrabbit/test/api/**/Abstract*.java</exclude>
                        <exclude>org/apache/jackrabbit/test/api/**/FrozenNodeTest.java</exclude>
                        <!-- Implementation Specific Excludes -->
                        <exclude>${test.cache.exclude}</exclude>
                        <exclude>${test.exclude}</exclude>
                     </excludes>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <!-- We define one profile per driver -->
      <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>cache-disabled</id>
         <properties>
            <cache.enabled>false</cache.enabled>
            <test.cache.exclude>${test.cache.all}</test.cache.exclude>
         </properties>
      </profile>
      <profile>
         <id>value-storage-disabled</id>
         <properties>
            <value.storage.enabled>false</value.storage.enabled>
         </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>
      <profile>
         <id>sjdbc</id>
         <properties>
            <jcr.test.configuration.file>/conf/standalone/test-configuration-sjdbc-ispn.xml</jcr.test.configuration.file>
            <properties.url.suffix>-sjdbc.properties</properties.url.suffix>
         </properties>
      </profile>
      <profile>
         <id>mjdbc</id>
         <properties>
            <jcr.test.configuration.file>/conf/standalone/test-configuration-mjdbc-ispn.xml</jcr.test.configuration.file>
            <properties.url.suffix>.properties</properties.url.suffix>
         </properties>
      </profile>
      <profile>
         <id>ijdbc</id>
         <properties>
            <jcr.test.configuration.file>/conf/standalone/test-configuration-ijdbc-ispn.xml</jcr.test.configuration.file>
            <properties.url.suffix>-sjdbc.properties</properties.url.suffix>
         </properties>
      </profile> 
      <profile>
         <id>cluster</id>
         <properties>
            <jcr.test.configuration.file>/conf/standalone/cluster/test-configuration-ijdbc-ispn.xml</jcr.test.configuration.file>
         </properties>
      </profile>
      <profile>
         <id>batch-update</id>
         <properties>
            <batch.size>1000</batch.size>
         </properties>
      </profile>
      <profile>
         <id>oracle-batch-update</id>
         <properties>
            <batch.size>1000</batch.size>
            <test.exclude>org/apache/jackrabbit/test/**/**/NodeTest.java,
                          org/exoplatform/services/jcr/**/**/TestLockImpl.java,
                          org/exoplatform/services/jcr/**/**/TestRemove.java,
                          org/exoplatform/services/jcr/**/**/TestInvalidItemState.java</test.exclude>
         </properties>
      </profile>
      <profile>
         <id>gunit</id>
         <build>
            <plugins>
               <!--  Runs gUnit tests to check ANTLR grammaes.
               Tests must be located in 'src/test/gunit' directory
                  Their names must be *.testsuite   -->
               <plugin>
                  <groupId>org.antlr</groupId>
                  <artifactId>maven-gunit-plugin</artifactId>
                  <version>3.5.2</version>
                  <executions>
                     <execution>
                        <id>maven-gunit-plugin</id>
                        <phase>test</phase> 
                        <goals>
                           <goal>gunit</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
