<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-parent</artifactId>
      <version>9.4.0.Final</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-query</artifactId>
   <packaging>bundle</packaging>
   <name>Infinispan Query</name>
   <description>Infinispan Query module</description>

   <!-- This module declares components that either has lifecycle (@Start or @Stop) or uses @Inject to retrieve dependencies -->
   <properties>
      <module.skipComponentMetaDataProcessing>false</module.skipComponentMetaDataProcessing>
      <module.skipTestComponentMetaDataProcessing>false</module.skipTestComponentMetaDataProcessing>
      <infinispan.test.parallel.threads>5</infinispan.test.parallel.threads>
   </properties>

   <dependencies>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-query-dsl</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-objectfilter</artifactId>
      </dependency>

      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-search-engine</artifactId>
      </dependency>

      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-search-engine</artifactId>
         <classifier>tests</classifier>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-directory-provider</artifactId>
      </dependency>

      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-search-serialization-avro</artifactId>
      </dependency>

      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-search-elasticsearch</artifactId>
         <optional>true</optional>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-lucene-directory</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-lucene-directory</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.apache.lucene</groupId>
         <artifactId>lucene-queryparser</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons-test</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-core</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-jdbc</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <scope>test</scope>
      </dependency>

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

      <dependency>
         <groupId>org.assertj</groupId>
         <artifactId>assertj-core</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>com.h2database</groupId>
         <artifactId>h2</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.kohsuke.metainf-services</groupId>
         <artifactId>metainf-services</artifactId>
         <optional>true</optional>
      </dependency>

      <dependency>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-bmunit</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.latencyutils</groupId>
         <artifactId>LatencyUtils</artifactId>
	 <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <resources>
         <resource>
            <directory>${project.basedir}/src/main/resources</directory>
         </resource>
      </resources>
      <testResources>
         <testResource>
            <directory>${project.basedir}/src/test/resources</directory>
            <filtering>true</filtering>
         </testResource>
      </testResources>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <argLine>${forkJvmArgs} ${testjvm.jigsawArgs} -Djdk.attach.allowAttachSelf=true</argLine>
               <disableXmlReport>false</disableXmlReport>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>generate-blueprint</id>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <phase>prepare-package</phase>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <configuration>
               <instructions>
                  <Export-Package>
                     !${project.groupId}.query.dsl.*,
                     !${project.groupId}.query.api.continuous.*,
                     ${project.groupId}.query.*;version=${project.version};-split-package:=error
                  </Export-Package>
                  <Include-Resource>
                     {maven-resources},
                     /META-INF/services=${project.basedir}/target/classes/META-INF/services,
                     /OSGI-INF/blueprint/blueprint.xml=${project.basedir}/target/classes/OSGI-INF/blueprint/blueprint.xml,
                     ${project.build.outputDirectory}/${project.artifactId}-component-metadata.dat
                  </Include-Resource>
               </instructions>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>smoke</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <!-- explicitly exclude some tests because of TestNG issue which ignores
                          restricted groups in subclasses -->
                     <includes>
                        <include>**/LocalCacheTest.java</include>
                        <include>**/QueryDslConditionsTest.java</include>
                        <include>**/QueryStringTest.java</include>
                     </includes>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
