<?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</artifactId>
	<version>1.1.6</version>
	<packaging>jar</packaging>

	<name>Decryption Oracle</name>
	<description>Reference Implementation of a Decryption Oracle</description>
	<url>https://finmath.gitlab.io/finmath-decryption-oracle</url>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.4.2</version>
		<relativePath />
	</parent>

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

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

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

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

		<!-- XML / JAXB / JMS -->
		<dependency>
			<groupId>jakarta.activation</groupId>
			<artifactId>jakarta.activation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.jms</groupId>
			<artifactId>jakarta.jms-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.xml.bind</groupId>
			<artifactId>jakarta.xml.bind-api</artifactId>
		</dependency>

		<!-- JAXB Implementation -->
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<scope>runtime</scope>
		</dependency>

		<!-- Web3j -->
		<dependency>
			<groupId>org.web3j</groupId>
			<artifactId>core</artifactId>
			<version>${web3j-core.version}</version>
		</dependency>
		<dependency>
			<groupId>org.web3j</groupId>
			<artifactId>crypto</artifactId>
			<version>${web3j-core.version}</version>
		</dependency>

		<!-- Crypto (Keccak/SHA etc.) -->
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk18on</artifactId>
			<version>1.82</version>
		</dependency>

		<!-- Thymeleaf (site / views) -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-thymeleaf</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Boot -->
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>

			<!-- Java compiler -->
			<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>

			<!-- GPG signing (only relevant when verifying/releasing) -->
			<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>

			<!-- Central publishing extension -->
			<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>

			<!-- Attach javadoc JAR during normal build (doesn't affect `mvn site`) -->
			<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>
						<configuration>
							<doctitle>${project.name} (${project.version}) documentation</doctitle>
							<docfilessubdirs>true</docfilessubdirs>
							<additionalOptions>
								<additionalOption>--allow-script-in-comments</additionalOption>
								<additionalOption>-Xdoclint:none</additionalOption>
							</additionalOptions>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Site generation (GitLab Pages will copy target/site to public/) -->
			<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>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<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>
						<scope>runtime</scope>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>

	<!-- Only run `solc` when you explicitly enable this profile: -Psolidity -->
	<profiles>
		<profile>
			<id>solidity</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>3.6.2</version>
						<executions>
							<execution>
								<id>compile-solidity</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>exec</goal>
								</goals>
								<configuration>
									<executable>solc</executable>
									<arguments>
										<argument>--optimize</argument>
										<argument>--evm-version</argument>
										<argument>paris</argument>
										<argument>--abi</argument>
										<argument>--bin</argument>
										<argument>-o</argument>
										<argument>${project.build.directory}/solc</argument>
										<argument>${project.basedir}/src/main/solidity/DecryptionOracle.sol</argument>
										<argument>${project.basedir}/src/main/solidity/DummyDecryptionOracleCallback.sol</argument>
										<argument>--overwrite</argument>
									</arguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<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>
				<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"> decryption oracle</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; 2023-2025 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 />
					<detectLinks>false</detectLinks>
					<additionalOptions>
						<additionalOption>--allow-script-in-comments</additionalOption>
						<additionalOption>-Xdoclint:none</additionalOption>
					</additionalOptions>
				</configuration>
			</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>

	<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-1.1.6</tag>
	</scm>

</project>
