<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/maven-v4_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>
		<relativePath />
	</parent>

	<groupId>net.finmath</groupId>
	<artifactId>finmath-lib-kotlin</artifactId>
	<version>5.0.3</version>
	<inceptionYear>2020</inceptionYear>

	<name>finmath lib kotlin</name>
	<description>
		finmath-lib-kotlin provides convenient
		method aliases for finmath lib.
	</description>
	<url>http://www.finmath.net/finmath-lib-kotlin</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<kotlin.version>1.3.72</kotlin.version>
		<kotlin.code.style>official</kotlin.code.style>
		<finmath-lib.version>5.0.3</finmath-lib.version>
		<junit.version>4.12</junit.version>
		<!-- maven plugins -->
		<dokka.version>0.10.1</dokka.version>
		<maven.compiler-plugin.version>3.8.1</maven.compiler-plugin.version>
		<maven.surefire-plugin.version>3.0.0-M5</maven.surefire-plugin.version>
		<maven.surefire-report-plugin.version>3.0.0-M5</maven.surefire-report-plugin.version>
		<maven.javadoc-plugin.version>3.2.0</maven.javadoc-plugin.version>
		<maven.jar-plugin.version>3.2.0</maven.jar-plugin.version>
		<maven.source-plugin.version>3.2.1</maven.source-plugin.version>
		<maven.site-plugin.version>3.9.0</maven.site-plugin.version>
		<checkstyle-plugin.version>3.1.1</checkstyle-plugin.version>
		<clover-plugin.version>4.4.1</clover-plugin.version>
	</properties>

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

	<organization>
		<name>finmath.net</name>
		<url>http://finmath.net</url>
	</organization>

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

	<pluginRepositories>
		<pluginRepository>
			<id>jcenter</id>
			<name>JCenter</name>
			<url>https://jcenter.bintray.com/</url>
		</pluginRepository>
	</pluginRepositories>

	<dependencies>
		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-stdlib</artifactId>
			<version>${kotlin.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-test-junit</artifactId>
			<version>${kotlin.version}</version>
			<scope>test</scope>
		</dependency>

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

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<sourceDirectory>src/main/kotlin</sourceDirectory>
		<testSourceDirectory>src/test/kotlin</testSourceDirectory>

		<plugins>
			<plugin>
				<groupId>org.jetbrains.kotlin</groupId>
				<artifactId>kotlin-maven-plugin</artifactId>
				<version>${kotlin.version}</version>
				<executions>
					<execution>
						<id>compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
					<execution>
						<id>test-compile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>test-compile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jetbrains.dokka</groupId>
				<artifactId>dokka-maven-plugin</artifactId>
				<version>${dokka.version}</version>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>dokka</goal>
							<goal>javadoc</goal>
							<goal>javadocJar</goal>
						</goals>
					</execution>
				</executions>
			</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>
					<outputDirectory>dokkaJavadoc</outputDirectory>
					<doctitle>${project.name} (${project.version}) documentation</doctitle>
					<stylesheetfile>stylesheet.css</stylesheetfile>
					<docfilessubdirs>true</docfilessubdirs>
					<excludePackageNames>net.finmath.montecarlo.automaticdifferentiation.backward.alternative:net.finmath.rootfinder</excludePackageNames>
					<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; 2020 Christian&nbsp;P.&nbsp;Fries.</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 not compatible with JMPA -->
						<!-- <link>http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/</link> -->
						<!-- <link>http://commons.apache.org/proper/commons-lang/javadocs/api-release/</link> -->
					</links>
					<detectLinks>false</detectLinks>
					<additionalOptions>
						<additionalOption>--allow-script-in-comments</additionalOption>
					</additionalOptions>
					<groups>
						<group>
							<title>Market Data (Curves and Volatilities)</title>
							<packages>net.finmath.marketdata</packages>
							<packages>net.finmath.marketdata.*</packages>
						</group>
						<group>
							<title>Analytic Functions</title>
							<packages>net.finmath.functions</packages>
							<packages>net.finmath.functions.*</packages>
						</group>
						<group>
							<title>Algorithmic Differentiation</title>
							<packages>net.finmath.montecarlo.automaticdifferntiation*</packages>
						</group>
						<group>
							<title>Monte-Carlo Methods</title>
							<packages>net.finmath.montecarlo*</packages>
						</group>
						<group>
							<title>Fourier Methods</title>
							<packages>net.finmath.fouriermethod*</packages>
						</group>
						<group>
							<title>Finite Difference Methods (PDEs)</title>
							<packages>net.finmath.finitedifference</packages>
							<packages>net.finmath.finitedifference.*</packages>
						</group>
					</groups>
				</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>1</forkCount>
					<reuseForks>false</reuseForks>
					<argLine>-mx6G</argLine>
				</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>
				<dependencies>
					<dependency>
						<!-- add support for ssh/scp -->
						<groupId>org.apache.maven.wagon</groupId>
						<artifactId>wagon-ssh</artifactId>
						<version>3.3.4</version>
					</dependency>
					<dependency>
						<groupId>org.apache.maven.doxia</groupId>
						<artifactId>doxia-module-markdown</artifactId>
						<version>1.9</version>
					</dependency>
				</dependencies>
				<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>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-scm-publish-plugin</artifactId>
				<version>3.0.0</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>
		</plugins>
	</build>

	<distributionManagement>
		<site>
			<id>github</id>
			<url>scm:git:https://github.com/finmath/finmath-lib-kotlin.git</url>
		</site>
	</distributionManagement>

	<scm>
		<url>https://github.com/finmath/finmath-lib-kotlin</url>
		<connection>scm:git:https://github.com/finmath/finmath-lib-kotlin.git</connection>
		<developerConnection>scm:git:https://github.com/finmath/finmath-lib-kotlin.git</developerConnection>
		<tag>HEAD</tag>
	</scm>
</project>
