<!-- Copyright (c) 2015-2018 BITPlan GmbH Project details and license at: 
	https://github.com/BITPlan/org.sidif.triplestore -->
<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.bitplan</groupId>
	<artifactId>org.sidif.triplestore</artifactId>
	<packaging>jar</packaging>
	<name>org.sidif.triplestore</name>
	<version>0.0.9</version>
	<description>Simple Data Interchange Format (SiDIF) and Triplestore see http://www.sidif.org</description>
	<url>https://github.com/BITPlan/org.sidif.triplestore</url>
	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:git://github.com/BITPlan/org.sidif.triplestore.git</connection>
		<developerConnection>scm:git:git@github.com:BITPlan/org.sidif.triplestore.git</developerConnection>
		<url>https://github.com/BITPlan/org.sidif.triplestore</url>
	</scm>
	<issueManagement>
		<url>https://github.com/BITPlan/org.sidif.triplestore/issues</url>
		<system>GitHub</system>
	</issueManagement>
	<developers>
		<developer>
			<id>wf</id>
			<name>Wolfgang Fahl</name>
			<organization>BITPlan GmbH</organization>
			<organizationUrl>http://www.bitplan.com</organizationUrl>
		</developer>
	</developers>
	<properties>
		<!-- http://stackoverflow.com/questions/3017695/how-to-configure-encoding-in-maven -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<!-- github server corresponds to entry in ~/.m2/settings.xml -->
		<github.global.server>github</github.global.server>
		<!-- Dependency versions -->
		<junit4.version>4.12</junit4.version>
		<args4j.version>2.0.29</args4j.version>
		<antlr.version>4.7.1</antlr.version>
	</properties>
	<dependencies>
		<!-- JUnit testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit4.version}</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<artifactId>hamcrest-core</artifactId>
					<groupId>org.hamcrest</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all -->
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
		<!-- antlr runtime and tools -->
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr4</artifactId>
			<version>${antlr.version}</version>
		</dependency>
		<!-- BITPlan antlr library -->
		<dependency>
			<groupId>com.bitplan.antlr</groupId>
			<artifactId>com.bitplan.antlr</artifactId>
			<version>0.0.6</version>
		</dependency>
		<dependency>
			<groupId>com.bitplan.antlr</groupId>
			<artifactId>com.bitplan.antlr</artifactId>
			<version>0.0.5</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.6</version>
		</dependency>

		<!-- args4j command line utility -->
		<dependency>
			<groupId>args4j</groupId>
			<artifactId>args4j</artifactId>
			<version>${args4j.version}</version>
		</dependency>
	</dependencies>
	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<plugins>
			<!-- compiler -->
			<plugin>
				<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<!-- jar creation -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.5</version>
				<!-- build a test jar -->
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<mainClass>org.sidif.triplestore.util.TripleStoreBuilder</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<!-- http://code.mycila.com/license-maven-plugin/ -->
				<groupId>com.mycila.maven-license-plugin</groupId>
				<artifactId>maven-license-plugin</artifactId>
				<version>1.9.0</version>
				<configuration>
					<header>src/etc/header.txt</header>
					<strictCheck>true</strictCheck>
					<includes>
						<include>src/**/*.java</include>
					</includes>
				</configuration>
			</plugin>
			<!-- automate antlr grammar handling -->
			<plugin>
				<groupId>org.antlr</groupId>
				<artifactId>antlr4-maven-plugin</artifactId>
				<version>4.7.1</version>
				<configuration>
					<!-- basically this is the default setting -->
					<sourceDirectory>src/main/antlr4</sourceDirectory>
					<libDirectory>target/generated-sources/antlr4</libDirectory>
				</configuration>
				<executions>
					<execution>
						<id>antlr</id>
						<goals>
							<goal>antlr4</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- http://stackoverflow.com/questions/1192596/how-do-i-get-eclipse-to-resolve-classes-generated-with-maven-2 -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.10</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${basedir}/target/generated-sources/antlr4</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- executable jar with dependencies see http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven 
				run with mvn clean compile assembly:single -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<mainClass>org.sidif.triplestore.util.TripleStoreBuilder</mainClass>
						</manifest>
					</archive>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>javacc-maven-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
					<interimDirectory>${basedir}/src/main/java</interimDirectory>
					<outputDirectory>${basedir}/src/main/java</outputDirectory>
					<javadocFriendlyComments>true</javadocFriendlyComments>
					<packageName>org.sidif.parser.jjtree</packageName>
					<visitor>true</visitor>
					<visitorDataType>org.sidif.triple.ObjectHolder</visitorDataType>
					<nodePackage>org.sidif.parser.node</nodePackage>
					<lookAhead>3</lookAhead>
				</configuration>
				<executions>
					<!-- http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin 
						https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html 
						https://github.com/objectledge/maven-extensions/blob/master/connectors/modules/javacc/plugin/lifecycle-mapping-metadata.xml 
						http://mojo.codehaus.org/javacc-maven-plugin/jjtree-javacc-mojo.html -->
					<execution>
						<id>generate-jjtree</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>jjtree-javacc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- sure-fire (test) plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.18.1</version>
				<configuration>
					<excludes>
						<!-- JUnit4 TestSuites -->
						<exclude>**/TestSuite.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<!-- see http://central.sonatype.org/pages/apache-maven.html Javadoc 
					and Sources Attachments To get Javadoc and Source jar files generated, you 
					have to configure the javadoc and source Maven plugins. -->
				<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>
				<configuration>
					<overview>${basedir}\src\main\java\overview.html</overview>
					<verbose>true</verbose>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- GPG Signed Components The Maven GPG plugin is used to sign the components 
				with the following configuration. -->
			<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>
			<!-- according to : http://central.sonatype.org/pages/apache-maven.html 
				Nexus Staging Maven Plugin for Deployment and Release The Nexus Staging Maven 
				Plugin is the recommended way to deploy your components to OSSRH and release 
				them to the Central Repository. To configure it simply add the plugin to 
				your Maven pom.xml. -->
			<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>
					<!-- set to true for automation -->
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<!-- Maven release plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
					<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
				</configuration>
			</plugin>
			<!-- git hub site plugin https://github.com/github/maven-plugins -->
			<plugin>
				<groupId>com.github.github</groupId>
				<artifactId>site-maven-plugin</artifactId>
				<version>0.12</version>
				<configuration>
					<message>Creating site for ${project.version}</message>
					<repositoryName>org.sidif.triplestore</repositoryName>      <!-- github repo name -->
					<repositoryOwner>BITPlan</repositoryOwner>    <!-- github username -->
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>site</goal>
						</goals>
						<phase>site</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.6</version>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											javacc-maven-plugin
										</artifactId>
										<versionRange>
											[2.6,)
										</versionRange>
										<goals>
											<goal>jjtree-javacc</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<!-- configuration of reports to be included in site -->
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<dependencyDetailsEnabled>true</dependencyDetailsEnabled>
					<dependencyLocationsEnabled>true</dependencyLocationsEnabled>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<overview>${basedir}\src\main\java\overview.html</overview>
					<verbose>true</verbose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>2.6</version>
			</plugin>
			<!-- http://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.13</version>
			</plugin>
		</plugins>
	</reporting>
	<profiles>
		<!-- GPG on travis needs to be switched off by default -->
		<!-- Work around Oracle's (IMHO silly) decision to make doclint default. 
			http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html http://stackoverflow.com/questions/15886209/maven-is-not-working-in-java-8-when-javadoc-tags-are-incomplete -->
		<profile>
			<id>doclint-java8-disable</id>
			<activation>
				<jdk>[1.8,)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
