<?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>it.cnr.istc.stlab</groupId>
	<artifactId>lgu.commons</artifactId>
	<version>0.0.8</version>
	<packaging>pom</packaging>
	
	<name>lgu.commons</name>
	<description>A collection of java utilities</description>
	<url>https://github.com/luigi-asprino/lgu-commons</url>

	<properties>
		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
	</properties>
	
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://github.com/luigi-asprino/lgu-commons/blob/master/LICENSE</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	
	<developers>
		<developer>
			<name>Luigi Asprino</name>
			<email>luigi.asprino@unibo.it</email>
			<organization>FICLIT</organization>
			<organizationUrl>https://ficlit.unibo.it/it</organizationUrl>
		</developer>
	</developers>
	
	<scm>
		<connection>scm:git:git://github.com/luigi-asprino/lgu-commons.git</connection>
		<developerConnection>scm:git:ssh://github.com:luigi-asprino/lgu-commons.git</developerConnection>
		<url>http://github.com/luigi-asprino/lgu-commons/tree/master</url>
	</scm>
	
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	
	<repositories>
		<repository>
			<id>oss.sonatype.org-snapshot</id>
			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<source>11</source>
					<target>11</target>
				</configuration>
			</plugin>
		</plugins>

	</build>

	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<release>11</release>
						</configuration>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.2.1</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>2.9.1</version>
						<!-- https://bugs.openjdk.java.net/browse/JDK-8212233 -->
						<configuration>
							<source>8</source>
						</configuration>
						<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>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>build-jar</id>
			<activation>
				<property>
					<name>buildJAR</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<release>11</release>
						</configuration>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-shade-plugin</artifactId>
						<version>2.4.3</version>
						<executions>
							<execution>
								<id>lgu.commons</id>
								<configuration>
									<outputFile>target/lgu.commons-${project.version}.jar</outputFile>
									<shadedArtifactAttached>false</shadedArtifactAttached>
									<transformers>
										<transformer
											implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
											<mainClass>it.cnr.istc.stlab.App</mainClass>
										</transformer>
										<transformer
											implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
										<transformer
											implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
										<transformer
											implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
											<addHeader>false</addHeader>
										</transformer>
									</transformers>
									<filters>
										<filter>
											<artifact>*:*</artifact>
											<excludes>
												<exclude>META-INF/*.SF</exclude>
												<exclude>META-INF/*.DSA</exclude>
												<exclude>META-INF/*.RSA</exclude>
											</excludes>
										</filter>
									</filters>
									<!-- Additional configuration. -->
								</configuration>
								<phase>package</phase>
								<goals>
									<goal>shade</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

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

	</profiles>

	<dependencies>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>

		<!-- Apache Jena -->
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>apache-jena-libs</artifactId>
			<type>pom</type>
			<version>3.16.0</version>

			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>jcl-over-slf4j</artifactId>
				</exclusion>

				<exclusion>
					<groupId>com.fasterxml.jackson.core</groupId>
					<artifactId>jackson-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.fasterxml.jackson.core</groupId>
					<artifactId>jackson-databind</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Commons configuration -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-configuration2</artifactId>
			<version>2.1.1</version>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.9.3</version>
		</dependency>

		<!-- Logging LOG4J - SLF4J -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.7.7</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.7</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>30.1-jre</version>
		</dependency>


	</dependencies>
	<modules>
		<module>lgu.commons.misc</module>
		<module>lgu.commons.tables</module>
		<module>lgu.commons.io</module>
		<module>lgu.commons.semanticweb</module>
		<module>lgu.commons.nlp</module>
		<module>lgu.commons.server</module>
		<module>lgu.commons.lang</module>
	</modules>
</project>
