<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH
  ~
  ~ See the AUTHORS file(s) distributed with this work for additional
  ~ information regarding authorship.
  ~
  ~ This Source Code Form is subject to the terms of the Mozilla Public
  ~ License, v. 2.0. If a copy of the MPL was not distributed with this
  ~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
  ~
  ~ SPDX-License-Identifier: MPL-2.0
  -->

<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/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>com.boschsemanticstack</groupId>
      <artifactId>semanticstack-rql-parent</artifactId>
      <version>3.0.1</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>
   <artifactId>semanticstack-rql-examples-querydsljpa</artifactId>
   <name>Bosch Semantic Stack RQL Examples::QueryDslWithJpa</name>

   <dependencies>
      <dependency>
         <groupId>com.boschsemanticstack</groupId>
         <artifactId>semanticstack-rql-2-querydsl</artifactId>
      </dependency>
      <dependency>
         <groupId>com.boschsemanticstack</groupId>
         <artifactId>semanticstack-rql-parser</artifactId>
      </dependency>
      <dependency>
         <groupId>com.h2database</groupId>
         <artifactId>h2</artifactId>
      </dependency>
      <!-- Optional -->
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-data-jpa</artifactId>
      </dependency>

      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-data-rest</artifactId>
      </dependency>
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-web</artifactId>
      </dependency>
      <dependency>
         <groupId>io.github.openfeign.querydsl</groupId>
         <artifactId>querydsl-apt</artifactId>
         <scope>provided</scope>
      </dependency>
      <!-- Test dependencies -->
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-test</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
               <annotationProcessorPaths>
                  <path>
                     <groupId>io.github.openfeign.querydsl</groupId>
                     <artifactId>querydsl-apt</artifactId>
                     <version>${querydsl.version}</version>
                     <classifier>jakarta</classifier>
                  </path>
                  <path>
                     <groupId>jakarta.persistence</groupId>
                     <artifactId>jakarta.persistence-api</artifactId>
                  </path>
               </annotationProcessorPaths>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>add-source</id>
                  <goals>
                     <goal>add-source</goal>
                  </goals>
                  <phase>generate-sources</phase>
                  <configuration>
                     <sources>
                        <source>${project.build.directory}/generated-sources/java/</source>
                     </sources>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>${spring-boot.version}</version>
         </plugin>
      </plugins>
   </build>
</project>
