<?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>com.github.berkesa</groupId>
	<artifactId>datatree-core</artifactId>
	<version>2.0.0</version>
	<packaging>jar</packaging>

	<name>DataTree Core API</name>
	<description>Extensible Java Library for reading, manipulating and writing hierarchical data structures from/to various formats.</description>
	<url>https://berkesa.github.io/datatree/</url>
	<inceptionYear>2017</inceptionYear>

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

	<organization>
		<name>DataTree</name>
		<url>https://berkesa.github.io/datatree/</url>
	</organization>

	<developers>
		<developer>
			<id>berkesa</id>
			<name>Andras Berkes</name>
			<email>andras.berkes@programmer.net</email>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/berkesa/datatree</url>
		<connection>scm:git:https://github.com/berkesa/datatree.git</connection>
		<developerConnection>scm:git:git://github.com/berkesa/datatree.git</developerConnection>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.release>11</maven.compiler.release>

		<!-- Dependency versions -->
		<bson.version>5.8.0</bson.version>
		<junit.version>5.14.4</junit.version>

		<!-- Build plugin versions -->
		<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
		<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
		<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
		<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
		<central-publishing-plugin.version>0.9.0</central-publishing-plugin.version>
	</properties>

	<dependencies>

		<!-- MONGODB / BSON TYPES -->
		<dependency>
			<groupId>org.mongodb</groupId>
			<artifactId>bson</artifactId>
			<version>${bson.version}</version>
		</dependency>

		<!-- JUNIT 5 (JUPITER) -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>
		<plugins>

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

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

		</plugins>
	</build>

	<profiles>

		<!-- Release profile: sources + javadoc + GPG signing + Central Portal publishing -->
		<profile>
			<id>release</id>
			<build>
				<plugins>

					<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-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

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

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

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

				</plugins>
			</build>
		</profile>

	</profiles>

</project>
