<?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>11.0.17.Final</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

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

   <properties>
      <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-query-core</artifactId>
      </dependency>

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

      <dependency>
         <groupId>org.infinispan.protostream</groupId>
         <artifactId>protostream-processor</artifactId>
      </dependency>

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

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-clustered-lock</artifactId>
      </dependency>

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

      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-search-serialization-avro</artifactId>
      </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-component-processor</artifactId>
      </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.antlr</groupId>
         <artifactId>antlr-runtime</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>
      </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>
   </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.jdkSpecificArgs} -Djdk.attach.allowAttachSelf=true</argLine>
            </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.core.*,
                     ${project.groupId}.query.*;version=${project.version};-split-package:=error
                  </Export-Package>
                  <Include-Resource>
                     {maven-resources},
                     /proto=${project.basedir}/target/classes/proto,
                     /META-INF/services=${project.basedir}/target/classes/META-INF/services,
                     /OSGI-INF/blueprint/blueprint.xml=${project.basedir}/target/classes/OSGI-INF/blueprint/blueprint.xml
                  </Include-Resource>
               </instructions>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.infinispan.maven-plugins</groupId>
            <artifactId>proto-schema-compatibility</artifactId>
            <executions>
               <execution>
                  <goals>
                     <goal>proto-schema-compatibility-check</goal>
                  </goals>
               </execution>
            </executions>
         </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>
                     <dependenciesToScan>
                        <!-- TestNGSuiteChecksTest -->
                        <dependency>org.infinispan:infinispan-commons-test</dependency>
                     </dependenciesToScan>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
