<?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>org.lfenergy.shapeshifter</groupId>
    <artifactId>shapeshifter-library</artifactId>
    <version>2.0.0</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>shapeshifter-api</artifactId>

  <name>Shapeshifter API</name>
  <description>API module that contains the message classes and calculation functions.</description>
  <url>https://www.lfenergy.org/projects/shapeshifter/</url>

  <properties>
    <jaxb40-maven-plugin.version>0.16.1</jaxb40-maven-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <version>${jaxb.version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <version>${jaxb.version}</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>jaxb40-maven-plugin</artifactId>
        <version>${jaxb40-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>generate-uftp-xsd-classes</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <schemaIncludes>
                <include>UFTP.xsd</include>
              </schemaIncludes>
              <bindingIncludes>
                <include>uftp.xjb</include>
              </bindingIncludes>
              <forceRegenerate>true</forceRegenerate>
              <removeOldOutput>true</removeOldOutput>
              <generatePackage>org.lfenergy.shapeshifter.api</generatePackage>
              <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
