<?xml version="1.0" encoding="UTF-8"?>

<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Copyright © 2013-2022 Metreeca srl

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->

<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.metreeca</groupId>
	<artifactId>metreeca-base</artifactId>
	<version>1.0.2</version>
	<packaging>pom</packaging>

	<name>Metreeca REST/JSON-LD Framework</name>
	<description>A modular Java framework for rapid model-driven REST/JSON-LD server development</description>
	<url>https://github.com/metreeca/base</url>
	<inceptionYear>2013</inceptionYear>

	<organization>
		<name>Metreeca</name>
		<url>https://www.metreeca.com/</url>
	</organization>

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

	<developers>
		<developer>
			<name>Metreeca</name>
			<email>info@metreeca.com</email>
			<organization>Metreeca</organization>
			<organizationUrl>https://www.metreeca.com/</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:metreeca/base.git</connection>
		<developerConnection>scm:git:git@github.com:metreeca/base.git</developerConnection>
		<url>https://github.com/metreeca/base</url>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/metreeca/base/issues</url>
	</issueManagement>

	<distributionManagement>

		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/releases</url>
		</repository>

		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>

		<site>
			<id>github-pages</id>
			<url>https://metreeca.github.io/base/</url>
		</site>

	</distributionManagement>

	<properties>

		<java.version>1.8</java.version>
		<maven.version>3.6</maven.version>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<maven.deploy.skip>true</maven.deploy.skip> <!-- ossrh public artifact deployment -->
		<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>

		<timestamp>${maven.build.timestamp}</timestamp> <!-- ;( not directly available to filtered resources -->

	</properties>

	<modules>

		<module>metreeca-json</module>
		<module>metreeca-rest</module>

		<module>metreeca-mime</module>
		<module>metreeca-head</module>
		<module>metreeca-back</module>

	</modules>

	<dependencyManagement>
		<dependencies>

			<!-- Core Modules -->

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-json</artifactId>
				<version>1.0.2</version>
			</dependency>

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-json</artifactId>
				<version>1.0.2</version>
				<type>test-jar</type>
			</dependency>


			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-rest</artifactId>
				<version>1.0.2</version>
			</dependency>

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-rest</artifactId>
				<version>1.0.2</version>
				<type>test-jar</type>
			</dependency>


			<!-- Data Connectors -->

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-xml</artifactId>
				<version>1.0.2</version>
			</dependency>

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-rdf</artifactId>
				<version>1.0.2</version>
			</dependency>


			<!-- Server Connectors -->

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-jee</artifactId>
				<version>1.0.2</version>
			</dependency>

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-jse</artifactId>
				<version>1.0.2</version>
			</dependency>


			<!-- Storage Connectors -->

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-rdf4j</artifactId>
				<version>1.0.2</version>
			</dependency>

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-open</artifactId>
				<version>1.0.2</version>
			</dependency>

			<dependency>
				<groupId>com.metreeca</groupId>
				<artifactId>metreeca-gcp</artifactId>
				<version>1.0.2</version>
			</dependency>


			<!-- Exported dependencies -->

			<dependency>
				<groupId>org.glassfish</groupId>
				<artifactId>javax.json</artifactId>
				<version>1.1.4</version>
			</dependency>

			<dependency> <!-- https://search.maven.org/artifact/org.eclipse.rdf4j/rdf4j-bom -->
				<groupId>org.eclipse.rdf4j</groupId>
				<artifactId>rdf4j-bom</artifactId>
				<version>3.6.2</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<dependency> <!-- https://search.maven.org/artifact/com.google.cloud/libraries-bom -->
				<groupId>com.google.cloud</groupId>
				<artifactId>libraries-bom</artifactId>
				<version>19.2.1</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<dependency> <!-- https://search.maven.org/artifact/org.slf4j/slf4j-parent -->
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-parent</artifactId>
				<version>1.7.30</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>


			<!-- Test Harness -->

			<dependency>  <!-- https://search.maven.org/artifact/org.junit.jupiter/junit-bom -->
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>5.7.1</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<dependency> <!-- https://search.maven.org/artifact/org.assertj/assertj-core -->
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>3.19.0</version>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<dependencies>

		<!-- Shared Testing Dependencies -->

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-jdk14</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<resources>

			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<filtering>true</filtering>
			</resource>

		</resources>

		<plugins>

			<plugin> <!-- https://maven.apache.org/enforcer/maven-enforcer-plugin/ -->

				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.0.0-M3</version>

				<executions>
					<execution>

						<id>enforce-maven</id>

						<goals>
							<goal>enforce</goal>
						</goals>

						<configuration>
							<rules>
								<requireMavenVersion>
									<version>${maven.version}</version>
								</requireMavenVersion>
							</rules>
						</configuration>

					</execution>
				</executions>

			</plugin>

			<plugin> <!-- https://maven.apache.org/plugins/maven-compiler-plugin -->

				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>

				<configuration>

					<source>${java.version}</source>
					<target>${java.version}</target>

				</configuration>

			</plugin>

			<plugin> <!-- https://maven.apache.org/plugins/maven-jar-plugin/ -->

				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.0</version>

				<configuration>

					<archive>

						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
						</manifest>

						<manifestEntries>
							<Built-By>${project.organization.name}</Built-By>
							<Built-On>${maven.build.timestamp}</Built-On>
							<Implementation-Version>${project.version}</Implementation-Version>
						</manifestEntries>

					</archive>

				</configuration>

			</plugin>

			<plugin> <!-- https://maven.apache.org/plugins/maven-javadoc-plugin/ -->

				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>

				<configuration>

					<tags>
						<tag>
							<name>apiNote</name>
							<placement>a</placement>
							<head>API Note:</head>
						</tag>
						<tag>
							<name>implSpec</name>
							<placement>a</placement>
							<head>Implementation Specification:</head>
						</tag>
						<tag>
							<name>implNote</name>
							<placement>a</placement>
							<head>Implementation Note:</head>
						</tag>
					</tags>

				</configuration>

			</plugin>

			<plugin> <!-- https://maven.apache.org/surefire/maven-surefire-plugin/ -->

				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M5</version>

			</plugin>

			<plugin> <!-- https://maven.apache.org/plugins/maven-site-plugin -->

				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.9.1</version>

				<configuration>

					<skipDeploy>true</skipDeploy> <!-- github deployment -->

					<stagingDirectory>${maven.multiModuleProjectDirectory}/docs/reports</stagingDirectory>

				</configuration>

			</plugin>

			<plugin>

				<groupId>com.coderplus.maven.plugins</groupId>
				<artifactId>copy-rename-maven-plugin</artifactId>
				<version>1.0</version>

				<executions>
					<execution>

						<id>copy-readme</id>
						<phase>pre-site</phase>

						<inherited>false</inherited>

						<goals>
							<goal>copy</goal>
						</goals>

						<configuration>
							<sourceFile>README.md</sourceFile>
							<destinationFile>docs/index.md</destinationFile>
						</configuration>

					</execution>
				</executions>
			</plugin>

		</plugins>

	</build>

	<reporting>
		<plugins>

			<plugin> <!-- https://maven.apache.org/plugins/maven-project-info-reports-plugin/ -->

				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>3.1.2</version>

				<reportSets>

					<reportSet>

						<reports>
							<report>index</report>
							<report>dependencies</report>
						</reports>

						<configuration>
							<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
						</configuration>

					</reportSet>

				</reportSets>

			</plugin>

		</plugins>
	</reporting>

	<profiles>
		<profile>

			<id>release</id>

			<build>
				<plugins>

					<plugin> <!-- https://maven.apache.org/plugins/maven-source-plugin -->

						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.1</version>

						<executions>
							<execution>

								<id>attach-sources</id>
								<phase>package</phase>

								<goals>
									<goal>jar-no-fork</goal>
								</goals>

							</execution>
						</executions>

					</plugin>

					<plugin> <!-- https://maven.apache.org/plugins/maven-javadoc-plugin/ -->

						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.2.0</version>

						<executions>

							<execution>

								<id>attach-javadocs</id>
								<phase>package</phase>

								<goals>
									<goal>jar</goal>
								</goals>

							</execution>

						</executions>

					</plugin>

					<plugin> <!-- http://maven.apache.org/plugins/maven-gpg-plugin/ -->

						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>

						<configuration>
							<executable>gpg</executable>
							<passphraseServerId>gpg.metreeca</passphraseServerId>
						</configuration>

						<executions>
							<execution>

								<id>sign-artifacts</id>
								<phase>verify</phase>

								<goals>
									<goal>sign</goal>
								</goals>

							</execution>
						</executions>

					</plugin>

					<plugin> <!-- https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin -->

						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>

						<extensions>true</extensions>

						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>

					</plugin>

				</plugins>
			</build>

		</profile>
	</profiles>

</project>
