<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright 2024-2025 gematik GmbH
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  ~ *******
  ~
  ~ For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
  -->

<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>de.gematik.api</groupId>
    <artifactId>ncpeh-simulation-api-parent</artifactId>
    <version>2.0.2</version>
  </parent>

  <artifactId>ncpeh-simulation-ehdsi-model</artifactId>
  <name>NCPeH Simulation eHDSI Model</name>
  <description>Provides data models and structures required for communication and data exchange via
    eHDSI interfaces
  </description>

  <properties>
    <generated.sources.path>${project.build.directory}/generated-sources</generated.sources.path>
    <schema.root.path>${project.basedir}/src/main/resources/schemas</schema.root.path>
    <binding.path>${project.basedir}/src/main/bindings</binding.path>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.cxf.xjc-utils</groupId>
      <artifactId>cxf-xjc-runtime</artifactId>
      <exclusions>
        <exclusion>
          <groupId>jakarta.xml.ws</groupId>
          <artifactId>jakarta.xml.ws-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
  </dependencies>


  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-xjc-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>xsdtojava</goal>
            </goals>
            <configuration>
              <sourceRoot>${generated.sources.path}</sourceRoot>
              <xsdOptions>
                <xsdOption>
                  <xsd>${schema.root.path}/generator_schema.xsd</xsd>
                  <extensionArgs>
                    <extensionArg>-Xfluent-api</extensionArg>
                    <extensionArg>-XsimpleEquals</extensionArg>
                    <extensionArg>-XsimpleHashCode</extensionArg>
                    <extensionArg>-Xts</extensionArg>
                  </extensionArgs>
                  <bindingFiles>
                    <bindingFile>${binding.path}/global.xjb</bindingFile>
                    <bindingFile>${schema.root.path}/cda/POCD_MT000040.xjb</bindingFile>
                  </bindingFiles>
                </xsdOption>
              </xsdOptions>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>