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

    <groupId>net.finmath</groupId>
    <artifactId>finmath-decryption-oracle-parent</artifactId>
    <version>1.2.7</version>
    <packaging>pom</packaging>

    <name>Decryption Oracle (parent)</name>
    <description>Parent POM for finmath decryption oracle modules</description>
    <url>https://finmath.gitlab.io/finmath-decryption-oracle</url>

    <!-- keep using Spring Boot as technical parent -->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.4.2</version>
        <relativePath />
    </parent>

    <modules>
        <module>oracle-base</module>
        <module>oracle-execution</module>
        <module>oracle-keys</module>
    </modules>

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>17</java.version>

        <web3j-core.version>4.12.2</web3j-core.version>

        <!-- plugin versions from current single-module POM -->
        <maven.compiler-plugin.version>3.11.0</maven.compiler-plugin.version>
        <maven-javadoc-plugin.version>3.10.0</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <maven-central-publishing-maven.version>0.8.0</maven-central-publishing-maven.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-project-info-reports-plugin.version>3.4.2</maven-project-info-reports-plugin.version>
        <maven.site-plugin.version>3.21.0</maven.site-plugin.version>
        <wagon-ssh.version>3.5.3</wagon-ssh.version>
        <doxia-sitetools.version>2.0.0</doxia-sitetools.version>
        <doxia-skin-model.version>2.0.0</doxia-skin-model.version>
        <doxia-module-markdown.version>2.0.0</doxia-module-markdown.version>
    </properties>

    <!-- Optionally: central dependencyManagement -->

    <build>
        <!-- Plugins shared across modules go here (compiler, javadoc, site, gpg, central).
             You can move your existing plugin config into pluginManagement if you like. -->
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler-plugin.version}</version>
                    <configuration>
                        <release>${java.version}</release>
                        <generatedSourcesDirectory>
                            ${project.build.directory}/generated-sources/src/main/gen
                        </generatedSourcesDirectory>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>

                <!-- Publishing -->
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${maven-central-publishing-maven.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>central</publishingServerId>
                    </configuration>
                </plugin>

                <!-- Disable classic Maven deploy, we use Sonatype Central instead -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.3</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>

                <!-- GPG sign artifacts -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- attach javadoc jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- attach sources jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven.site-plugin.version}</version>
                    <configuration>
                        <skipDeploy>true</skipDeploy>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Sources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- GPG -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Central Publishing activating -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>${maven-central-publishing-maven.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <!-- optional: -->
                    <!-- <autoPublish>true</autoPublish> -->
                    <!-- <waitUntil>published</waitUntil> -->
                </configuration>
            </plugin>

            <!-- maven-release-plugin with -DskipTests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <goals>deploy</goals>
                    <arguments>-DskipTests</arguments>
                </configuration>
            </plugin>
        </plugins>
    </build>

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

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <!-- add MathJax config here -->
            </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>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>
            <id>local-staging</id>
            <url>${project.url}</url>
        </site>
    </distributionManagement>

    <issueManagement>
        <system>GitLab</system>
        <url>https://gitlab.com/finmath/finmath-decryption-oracle/-/issues</url>
    </issueManagement>

    <scm>
        <url>https://gitlab.com/finmath/finmath-decryption-oracle</url>
        <connection>scm:git:https://gitlab.com/finmath/finmath-decryption-oracle.git</connection>
        <developerConnection>scm:git:https://gitlab.com/finmath/finmath-decryption-oracle.git</developerConnection>
        <tag>finmath-decryption-oracle-parent-1.2.7</tag>
    </scm>

</project>
