<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>

    <!-- For publishing to sonatype / central maven repo -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>net.finmath</groupId>
    <artifactId>finmath-smart-derivative-contract</artifactId>
    <version>1.2.2</version>
    <packaging>jar</packaging>

    <name>finmath-smart-derivative-contract</name>
    <description>
        Project to support the implementation a of smart derivative contract.
    </description>
    <url>https://www.finmath.net/finmath-smart-derivative-contract</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <src.main.java.dir>src/main/java</src.main.java.dir>
        <src.test.java.dir>src/test/java</src.test.java.dir>
        <java.version>17</java.version>
        <nv-websocket-client.version>2.14</nv-websocket-client.version>
        <moneta.version>1.4.2</moneta.version>
        <jcommon.version>1.0.24</jcommon.version>
        <springdoc-openapi-ui.version>2.2.0</springdoc-openapi-ui.version>
        <jackson-databind-nullable.version>0.2.6</jackson-databind-nullable.version>
        <commons-cli.version>1.5.0</commons-cli.version>
        <spring-boot-dependencies.version>3.2.10</spring-boot-dependencies.version>
        <finmath-lib.version>6.0.19</finmath-lib.version>
        <finmath-lib-plot-extensions.version>0.5.3</finmath-lib-plot-extensions.version>
        <spring-statemachine.version>3.2.0</spring-statemachine.version>
        <!-- maven plugins -->
        <maven.site-plugin.version>4.0.0-M13</maven.site-plugin.version>
        <maven-scm-publish-plugin.version>3.2.1</maven-scm-publish-plugin.version>
        <maven-project-info-reports-plugin.version>3.4.2</maven-project-info-reports-plugin.version>
        <maven-checkstyle-plugin.version>3.2.1</maven-checkstyle-plugin.version>
        <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
        <versions-maven-plugin.version>2.15.0</versions-maven-plugin.version>
        <spring-boot-maven-plugin.version>3.0.5</spring-boot-maven-plugin.version>
        <maven-enforcer-plugin.version>3.2.1</maven-enforcer-plugin.version>
        <maven-dependency-plugin.version>3.5.0</maven-dependency-plugin.version>
        <jaxb2-maven-plugin.version>3.1.0</jaxb2-maven-plugin.version>
        <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
        <openapi-generator-maven-plugin.version>6.4.0</openapi-generator-maven-plugin.version>
        <jib-maven-plugin.version>3.3.1</jib-maven-plugin.version>
        <wagon-ssh.version>3.5.3</wagon-ssh.version>
        <doxia-sitetools.version>2.0.0-M6</doxia-sitetools.version>
        <doxia-skin-model.version>2.0.0-M6</doxia-skin-model.version>
        <doxia-module-markdown.version>2.0.0-M6</doxia-module-markdown.version>
        <git-commit-id-maven-plugin.version>5.0.0</git-commit-id-maven-plugin.version>
        <httpcore.version>5.3</httpcore.version>
    </properties>

    <developers>
        <developer>
            <id>fries</id>
            <name>Christian Fries</name>
            <email>email@christian-fries.de</email>
            <url>http://www.christian-fries.de</url>
            <timezone>1</timezone>
        </developer>
        <developer>
            <id>pekola</id>
            <name>Peter Kohl-Landgraf</name>
            <timezone>1</timezone>
        </developer>
        <developer>
            <id>delre</id>
            <name>Luca Del Re</name>
            <timezone>1</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>

        <!-- BEGINNING OF UPDATED STUFF -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-properties</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-csv</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>


        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>net.finmath</groupId>
            <artifactId>finmath-lib</artifactId>
            <version>${finmath-lib.version}</version>
        </dependency>

        <dependency>
            <groupId>net.finmath</groupId>
            <artifactId>finmath-lib-plot-extensions</artifactId>
            <version>${finmath-lib-plot-extensions.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>net.finmath</groupId>
                    <artifactId>finmath-lib</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.itextpdf</groupId>
                    <artifactId>itextpdf</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <version>${httpcore.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents.core5</groupId>
            <artifactId>httpcore5</artifactId>
            <version>${httpcore.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.statemachine</groupId>
            <artifactId>spring-statemachine-autoconfigure</artifactId>
            <version>${spring-statemachine.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.statemachine</groupId>
            <artifactId>spring-statemachine-test</artifactId>
            <version>${spring-statemachine.version}</version>
        </dependency>

        <dependency>
            <groupId>org.java-websocket</groupId>
            <artifactId>Java-WebSocket</artifactId>
            <version>1.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
            <version>2.7.4</version>
        </dependency>


        <dependency>
            <groupId>com.neovisionaries</groupId>
            <artifactId>nv-websocket-client</artifactId>
            <version>${nv-websocket-client.version}</version>
        </dependency>

        <dependency>
            <groupId>org.javamoney</groupId>
            <artifactId>moneta</artifactId>
            <version>${moneta.version}</version>
            <type>pom</type>
        </dependency>

        <!-- JFree -->

        <dependency>
            <groupId>org.jfree</groupId>
            <artifactId>jcommon</artifactId>
            <version>${jcommon.version}</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>


        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-core</artifactId>
        </dependency>

        <!-- Spring boot -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>


        <!--Template engine (XML/HTML) -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <!-- Basic Auth -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
        </dependency>

        <!-- Spring Doc -->
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
            <version>${springdoc-openapi-ui.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>jakarta.validation</groupId>
            <artifactId>jakarta.validation-api</artifactId>
        </dependency>


        <dependency>
            <groupId>org.openapitools</groupId>
            <artifactId>jackson-databind-nullable</artifactId>
            <version>${jackson-databind-nullable.version}</version>
        </dependency>


        <dependency>
            <groupId>io.reactivex.rxjava3</groupId>
            <artifactId>rxjava</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>${commons-cli.version}</version>
        </dependency>

        <!-- currently no need for postgres db connection -->
        <!--dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency-->

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.7</version>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.11.0</version>
        </dependency>
    </dependencies>


    <profiles>
        <profile>
            <id>i-need-node</id>
            <activation>
                <property>
                    <name>iNeedNode</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <node.version>v18.15.0</node.version>
                <versions-maven-plugin.version>2.15.0</versions-maven-plugin.version>
                <frontend-maven-plugin.version>1.12.1</frontend-maven-plugin.version>
                <maven-enforcer-plugin.version>3.2.1</maven-enforcer-plugin.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>${frontend-maven-plugin.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin.version}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>${maven-enforcer-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>enforce-maven</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireMavenVersion>
                                            <version>[3.6.0,)</version>
                                        </requireMavenVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>install node and npm</id>
                                <goals>
                                    <goal>install-node-and-npm</goal>
                                </goals>
                                <phase>generate-resources</phase>
                            </execution>
                            <execution>
                                <id>install angular and other dependencies</id>
                                <goals>
                                    <goal>npm</goal>
                                </goals>
                                <phase>generate-resources</phase>
                                <configuration>
                                    <arguments>install</arguments>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <workingDirectory>src/main/frontend</workingDirectory>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>i-have-node</id>
            <activation>
                <property>
                    <name>iHaveNode</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <node.version>v18.15.0</node.version>
                <versions-maven-plugin.version>2.15.0</versions-maven-plugin.version>
                <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
                <maven-enforcer-plugin.version>3.2.1</maven-enforcer-plugin.version>
            </properties>
            <dependencies>
                <dependency>
                    <artifactId>exec-maven-plugin</artifactId>
                    <groupId>org.codehaus.mojo</groupId>
                    <version>${exec-maven-plugin.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin.version}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>${maven-enforcer-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>enforce-maven</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireMavenVersion>
                                            <version>[3.6.0,)</version>
                                        </requireMavenVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>exec-maven-plugin</artifactId>
                        <groupId>org.codehaus.mojo</groupId>
                        <version>${exec-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>install-angular-and-other-dependencies</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>npm</executable>
                                    <commandlineArgs>install</commandlineArgs>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>no-tests</id>
            <properties>
                <maven.test.skip>true</maven.test.skip>
            </properties>
        </profile>
    </profiles>


    <build>
        <defaultGoal>clean install javadoc:javadoc</defaultGoal>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <sourceDirectory>${src.main.java.dir}</sourceDirectory>
        <testSourceDirectory>${src.test.java.dir}</testSourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.html</include>
                    <include>**/*.txt</include>
                    <include>**/*.xml</include>
                    <include>**/*.xsd</include>
                    <include>**/*.yml</include>
                    <include>**/*.json</include>
                    <include>**/*.properties</include>
                </includes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.xsd</include>
                    <include>**/*.yml</include>
                    <include>**/*.json</include>
                    <include>**/*.properties</include>
                </includes>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>${versions-maven-plugin.version}</version>
                <configuration>
                    <dependencyManagementExcludes>org.springframework.boot:spring-boot-dependencies
                    </dependencyManagementExcludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <compilerVersion>${java.version}</compilerVersion>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-configuration-processor</artifactId>
                            <version>${spring-boot-dependencies.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <doctitle>${project.name} (${project.version}) documentation</doctitle>
                    <stylesheetfile>stylesheet.css</stylesheetfile>
                    <docfilessubdirs>true</docfilessubdirs>
                    <header>
                        <![CDATA[
						<span class="logo-white">finMath</span><span class="logo-red"> lib</span> documentation
						<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
			   			]]>
                    </header>
                    <footer>
                        <![CDATA[
						<i>Copyright &copy; 2018-2022 finmath.net.</i>
			   			]]>
                    </footer>
                    <tags>
                        <tag>
                            <name>TODO</name>
                            <placement>a</placement>
                            <head>To dos:</head>
                        </tag>
                        <tag>
                            <name>date</name>
                            <placement>a</placement>
                            <head>Date:</head>
                        </tag>
                    </tags>
                    <links>
                    </links>
                    <detectLinks>false</detectLinks>
                    <additionalOptions>
                        <additionalOption>--allow-script-in-comments</additionalOption>
                    </additionalOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <forkCount>4C</forkCount>
                    <reuseForks>false</reuseForks>
                    <argLine>-mx6G --add-opens java.base/java.time=ALL-UNNAMED --add-opens
                        java.base/java.util=ALL-UNNAMED --add-opens
                        net.finmath.smartderivativecontract/net.finmath.smartcontract.model=ALL-UNNAMED
                    </argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <configuration>
                    <configLocation>finmath-checkstyle.xml</configLocation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot-maven-plugin.version}</version>
                <configuration>
                    <mainClass>net.finmath.smartcontract.valuation.service.Application</mainClass>
                    <imageName>docker.io/finmath/${project.artifactId}:${project.version}</imageName>
                    <jvmArguments>--add-opens java.base/java.time=ALL-UNNAMED</jvmArguments>
                </configuration>
                <executions>
                    <execution>
                        <id>build-info</id>
                        <goals>
                            <goal>build-info</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>validate-project-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
                <configuration>
                    <rules>
                        <requireMavenVersion>
                            <version>[3.6.0,)</version>
                        </requireMavenVersion>
                        <requireJavaVersion>
                            <version>17</version>
                        </requireJavaVersion>
                    </rules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>${jaxb2-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>generate-jaxb-sources</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <locale>en</locale>
                    <packageName>net.finmath.smartcontract.product.xml</packageName>
                    <sources>
                        <source>
                            src${file.separator}main${file.separator}resources${file.separator}net.finmath.smartcontract.product.xml${file.separator}smartderivativecontract.xsd
                        </source>
                    </sources>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven-resources-plugin.version}</version>
                <executions>
                    <execution>
                        <id>apply-jaxb-patch</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                target${file.separator}generated-sources${file.separator}jaxb${file.separator}net${file.separator}finmath${file.separator}smartcontract${file.separator}product${file.separator}xml
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src${file.separator}main${file.separator}resources${file.separator}patches</directory>
                                    <includes>
                                        <include>package-info.java</include>
                                        <!--
                                        JAXB has a bug that conflicts with the way the TradeIdentifier is specified
                                        It would be possible to go without this patch by using the versionedTradId
                                        -->
                                        <include>TradeIdentifier.java</include>
                                    </includes>
                                </resource>
                            </resources>
                            <overwrite>true</overwrite>
                        </configuration>
                    </execution>
                    <execution>
                        <id>move-yaml-configs</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}${file.separator}openapi</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src${file.separator}main${file.separator}resources</directory>
                                    <includes>
                                        <include>**${file.separator}*.yml</include>
                                    </includes>
                                </resource>
                            </resources>
                            <overwrite>true</overwrite>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


            <!-- OpenApi Generator Plugin -->
            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>${openapi-generator-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>
                                ${project.basedir}${file.separator}src${file.separator}main${file.separator}resources${file.separator}api.yml
                            </inputSpec>
                            <generatorName>spring</generatorName>
                            <library>spring-boot</library>
                            <configOptions>
                                <useSpringBoot3>true</useSpringBoot3>
                                <sourceFolder>src/generated/java/main</sourceFolder>
                                <sourceFolder>src/main/gen</sourceFolder>
                                <dateLibrary>java8</dateLibrary>
                                <delegatePattern>true</delegatePattern>
                                <interfaceOnly>true</interfaceOnly>
                                <basePackage>net.finmath.smartcontract</basePackage>
                                <modelPackage>net.finmath.smartcontract.model</modelPackage>
                                <apiPackage>net.finmath.smartcontract.api</apiPackage>
                                <configPackage>net.finmath.smartcontract.config</configPackage>
                            </configOptions>
                            <generateApiTests>true</generateApiTests>
                            <generateModelTests>true</generateModelTests>
                            <supportingFilesToGenerate>
                                ApiUtil.java
                            </supportingFilesToGenerate>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- JIB / Docker (you can use either  mvn clean compile jib:build  or   mvn spring-boot:build-image    see https://tomgregory.com/jib-vs-spring-boot-for-building-docker-images/-->
            <plugin>
                <groupId>com.google.cloud.tools</groupId>
                <artifactId>jib-maven-plugin</artifactId>
                <version>${jib-maven-plugin.version}</version>
                <configuration>
                    <to>
                        <image>docker.io/finmath/${project.artifactId}:${project.version}</image>
                    </to>
                    <container>
                        <mainClass>
                            net.finmath.smartcontract.valuation.service.Application
                        </mainClass>
                    </container>
                </configuration>
            </plugin>

            <!-- Publish the site to GitHub gh-pages: use mvn site site:deploy site-deploy -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven.site-plugin.version}</version>
                <configuration>
                    <skipDeploy>true</skipDeploy>
                </configuration>
                <executions>
                    <execution>
                        <id>stage-for-scm-publish</id>
                        <phase>post-site</phase>
                        <goals>
                            <goal>stage</goal>
                        </goals>
                        <configuration>
                            <skipDeploy>false
                            </skipDeploy><!-- MSITE-652: configuration won't be necessary with m-site-p 3.2 -->
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <!-- Java money -->
                    <dependency>
                        <groupId>org.javamoney</groupId>
                        <artifactId>moneta</artifactId>
                        <version>${moneta.version}</version>
                        <type>pom</type>
                    </dependency>
                    <dependency>
                        <!-- add support for ssh/scp -->
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ssh</artifactId>
                        <version>${wagon-ssh.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-sitetools</artifactId>
                        <version>${doxia-sitetools.version}</version>
                        <type>pom</type>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-skin-model</artifactId>
                        <version>${doxia-skin-model.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>${doxia-module-markdown.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>${maven-scm-publish-plugin.version}</version>
                <configuration>
                    <scmBranch>gh-pages</scmBranch>
                </configuration>
                <executions>
                    <execution>
                        <id>scm-publish</id>
                        <phase>site-deploy</phase>
                        <goals>
                            <goal>publish-scm</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--git-commit-id-maven-plugin - Generates a git.properties file with Git info -->
            <plugin>
                <groupId>io.github.git-commit-id</groupId>
                <artifactId>git-commit-id-maven-plugin</artifactId>
                <version>${git-commit-id-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <prefix>git</prefix>
                    <verbose>false</verbose>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
                    </generateGitPropertiesFilename>
                    <format>java</format>
                    <gitDescribe>
                        <skip>false</skip>
                        <always>false</always>
                        <dirty>-dirty</dirty>
                    </gitDescribe>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/finmath/finmath-lib/issues</url>
    </issueManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <reportSets>
                    <reportSet><!-- by default, id = "default" -->
                        <reports><!-- select non-aggregate reports -->
                            <report>javadoc</report>
                            <!-- <report>test-javadoc</report> -->
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven-project-info-reports-plugin.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>summary</report>
                            <report>scm</report>
                            <report>distribution-management</report>
                            <report>dependency-info</report>
                            <report>dependencies</report>
                            <report>issue-management</report>
                            <report>ci-management</report>
                            <report>licenses</report>
                            <report>team</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>
        <!--site for mvn site -->
        <site>
            <id>github</id>
            <url>scm:git:https://github.com/finmath/finmath-smart-derivative-contract.git</url>
        </site>
        <!-- We need to deploy releases to maven central!
        <repository>
            <id>gitlab</id>
            <url>https://gitlab.com/api/v4/projects/33978063/packages/maven</url>
        </repository>
        -->
        <snapshotRepository>
            <id>gitlab</id>
            <url>https://gitlab.com/api/v4/projects/33978063/packages/maven</url>
        </snapshotRepository>
    </distributionManagement>

    <scm>
        <url>https://github.com/finmath/finmath-smart-derivative-contract</url>
        <connection>scm:git:https://github.com/finmath/finmath-smart-derivative-contract.git</connection>
        <developerConnection>scm:git:https://github.com/finmath/finmath-smart-derivative-contract.git
        </developerConnection>
        <tag>HEAD</tag>
    </scm>

</project>
