<?xml version="1.0" encoding="UTF-8"?>
<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.kapdion.pisano</groupId>
    <artifactId>productknowledge-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <artifactId>server-app</artifactId>

  <properties>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <omds.version>2025.27-PRODUKTE-SNAPSHOT</omds.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.kapdion.pisano</groupId>
      <artifactId>api-definition</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- warte auf web-frontend, damit die gebauten Seiten eingebettet werden können -->
    <dependency>
      <groupId>com.kapdion.pisano</groupId>
      <artifactId>client-web</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.kapdion.pisano</groupId>
      <artifactId>client-lib</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
      <exclusions>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <!-- Webapp -->
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <exclusions>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <!-- https://mvnrepository.com/artifact/org.eclipse.rdf4j/rdf4j-model -->
      <!-- Lizenz: https://eclipse.org/org/documents/edl-v10.php-->
      <groupId>org.eclipse.rdf4j</groupId>
      <artifactId>rdf4j-model</artifactId>
      <version>5.1.5</version>
    </dependency>
    <dependency>
      <!-- https://mvnrepository.com/artifact/org.eclipse.rdf4j/rdf4j-rio-turtle -->
      <!-- Lizenz: https://eclipse.org/org/documents/edl-v10.php-->
      <groupId>org.eclipse.rdf4j</groupId>
      <artifactId>rdf4j-rio-turtle</artifactId>
      <version>5.1.5</version>
    </dependency>
    <dependency>
      <!-- https://mvnrepository.com/artifact/org.eclipse.rdf4j/rdf4j-shacl -->
      <!-- Lizenz: https://eclipse.org/org/documents/edl-v10.php-->
      <groupId>org.eclipse.rdf4j</groupId>
      <artifactId>rdf4j-shacl</artifactId>
      <version>5.1.5</version>
    </dependency>
    <dependency>
      <!-- https://mvnrepository.com/artifact/org.eclipse.rdf4j/rdf4j-rio-jsonld -->
      <!-- Lizenz: https://eclipse.org/org/documents/edl-v10.php-->
      <groupId>org.eclipse.rdf4j</groupId>
      <artifactId>rdf4j-rio-jsonld</artifactId>
      <version>5.1.5</version>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <optional>true</optional>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Resource-plugin soll die gebauten Angular-Seiten in den Build-Output einbetten -->
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-angular-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}/static</outputDirectory>
              <resources>
                <resource>
                  <directory>../web-frontend/dist</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
            </exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
