<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_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>com.querydsl</groupId>
    <artifactId>querydsl-root</artifactId>
    <version>5.0.0</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <groupId>com.querydsl</groupId>
  <artifactId>querydsl-hibernate-search</artifactId>
  <name>Querydsl - Hibernate Search support</name>
  <description>Hibernate Search support for querydsl</description>
  <url>${project.homepage}</url>
  <packaging>jar</packaging>
  
  <scm>
    <connection>${project.checkout}</connection>
    <developerConnection>${project.checkout}</developerConnection>
    <url>${project.githubpage}</url>
  </scm>
  
  <properties>
    <hibernate.version>5.5.3.Final</hibernate.version>
    <hibernate.validator.version>7.0.1.Final</hibernate.validator.version>
    <hibernate.search.version>5.11.9.Final</hibernate.search.version>
    <lucene.version>5.5.5</lucene.version>
    <osgi.import.package>
      org.apache.lucene.*;version="[3.6,4)",
      org.hibernate.*;version="[4,5)",
      ${osgi.import.package.root}
    </osgi.import.package>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-core</artifactId>
        <version>${lucene.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate.common</groupId>
        <artifactId>hibernate-commons-annotations</artifactId>
        <version>5.1.2.Final</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <dependencies> 
    <dependency>
      <groupId>com.querydsl</groupId>
      <artifactId>querydsl-lucene5</artifactId>
      <version>${project.version}</version>
    </dependency>
    
    <!-- backend dependencies -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>${hibernate.version}</version>
      <exclusions>
        <exclusion>
          <groupId>cglib</groupId>
          <artifactId>cglib</artifactId>
        </exclusion>
        <exclusion>
          <groupId>asm</groupId>
          <artifactId>asm</artifactId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logging</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
      </exclusions>      
      <scope>provided</scope>      
    </dependency>   
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>${hibernate.validator.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>jboss-logging</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
      </exclusions>
    </dependency>    
 
    <dependency>
      <groupId>jakarta.persistence</groupId>
      <artifactId>jakarta.persistence-api</artifactId>
      <version>2.2.3</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>${lucene.version}</version>
      <scope>provided</scope>
    </dependency>   
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-search-orm</artifactId>
      <version>${hibernate.search.version}</version>
      <scope>provided</scope>
      <exclusions>
       <exclusion> 
         <groupId>hsqldb</groupId>
         <artifactId>hsqldb</artifactId>
       </exclusion>
        <exclusion>
          <artifactId>hibernate-core</artifactId>
          <groupId>org.hibernate</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>  
    <dependency>
      <groupId>javassist</groupId>
      <artifactId>javassist</artifactId>
      <version>3.12.1.GA</version>
      <scope>provided</scope>
    </dependency>    
    
    <!-- test -->
   <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>${derby.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbytools</artifactId>
      <version>${derby.version}</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>com.querydsl</groupId>
      <artifactId>querydsl-core</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>

    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.3.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>com.querydsl.hibernate.search</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>     
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
                <name>derby.stream.error.file</name>
                <value>target/derby.log</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>   
    </plugins>
  </build>
    
  
</project>
