<?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.16.Final</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>
   <artifactId>infinispan-remote-query-server</artifactId>
   <packaging>bundle</packaging>
   <name>Infinispan Remote Query Server</name>
   <description>Infinispan Remote Query Server 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>
   </properties>

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

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

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-remote-query-client</artifactId>
      </dependency>

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

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

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

      <dependency>
         <groupId>org.infinispan.protostream</groupId>
         <artifactId>sample-domain-implementation</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-core</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

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

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

   <build>
      <resources>
         <resource>
            <directory>${project.basedir}/src/main/resources</directory>
         </resource>
      </resources>
      <plugins>
         <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}.remote-query-server.*;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>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <dependenciesToScan>
                  <!-- TestNGSuiteChecksTest -->
                  <dependency>org.infinispan:infinispan-commons-test</dependency>
               </dependenciesToScan>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>
