<?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>org.semanticweb.vlog4j</groupId>
	<artifactId>vlog4j-parent</artifactId>
	<version>0.5.0</version>
	<packaging>pom</packaging>

	<name>VLog4j</name>
	<description>A Java library for working with the VLog rule engine</description>
	<url>https://github.com/knowsys/vlog4j</url>

	<modules>
		<!-- when adding a module, make sure to also add it as a
			 dependency in the coverage module, otherwise it will not be
			 included in the coverage report -->
		<module>vlog4j-core</module>
		<module>vlog4j-rdf</module>
		<module>vlog4j-examples</module>
		<module>vlog4j-owlapi</module>
		<module>vlog4j-graal</module>
		<module>vlog4j-parser</module>
		<module>vlog4j-client</module>
		<module>coverage</module>
	</modules>

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

	<inceptionYear>2018</inceptionYear>


	<organization>
		<name>VLog4j Developers</name>
	</organization>

	<developers>
		<developer>
			<id>markus</id>
			<name>Markus Kroetzsch</name>
			<email>markus@semantic-mediawiki.org</email>
		</developer>
		<developer>
			<id>irina</id>
			<name>Irina Dragoste</name>
			<email>irina.dragoste@tu-dresden.de</email>
		</developer>
		<developer>
			<id>david</id>
			<name>David Carral</name>
			<email>david.carral@tu-dresden.de</email>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<eclipse.jdt.annotation.version>2.1.100</eclipse.jdt.annotation.version>
		<junit.version>4.12</junit.version>
		<mockito.version>2.28.2</mockito.version>
		<slf4j.version>1.7.28</slf4j.version>
		<apache.commons.lang.version>3.9</apache.commons.lang.version>
		<apache.commons.csv.version>1.5</apache.commons.csv.version>
		<maven.javadoc.version>3.1.1</maven.javadoc.version>
		<owlapi.version>5.1.11</owlapi.version>
		<openrdf.sesame.version>2.7.16</openrdf.sesame.version>
		<graal.version>1.3.1</graal.version>
		<picoli.version>4.0.4</picoli.version>
		<shade.version>3.2.0</shade.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.annotation</artifactId>
			<version>${eclipse.jdt.annotation.version}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<!-- Mock objects for testing -->
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<!-- Useful helpers for cleaner coding -->
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${apache.commons.lang.version}</version>
		</dependency>
		<dependency>
			<!-- Useful for testing generated csv files -->
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-csv</artifactId>
			<version>${apache.commons.csv.version}</version>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>1.14</version>
					<configuration />
					<executions>
						<execution>
							<id>first</id>
							<goals>
								<goal>update-file-header</goal>
								<goal>update-project-license</goal>
							</goals>
							<phase>process-sources</phase>
							<configuration>
								<licenseName>apache_v2</licenseName>
								<roots>
									<root>src/main/java</root>
									<root>src/test/java</root>
								</roots>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<!-- This plugin's configuration is used to store Eclipse m2e settings
						only. It has no influence on the Maven build. -->
					<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>license-maven-plugin</artifactId>
										<versionRange>[1.2,)</versionRange>
										<goals>
											<goal>update-project-license</goal>
											<goal>update-file-header</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>

								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>aspectj-maven-plugin</artifactId>
										<versionRange>[1.11,)</versionRange>
										<goals>
											<goal>test-compile</goal>
											<goal>compile</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-install-plugin
										</artifactId>
										<versionRange>
											[2.4,)
										</versionRange>
										<goals>
											<goal>install-file</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute>
											<runOnIncremental>false</runOnIncremental>
										</execute>
									</action>
								</pluginExecution>

							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
				  <groupId>org.jacoco</groupId>
				  <artifactId>jacoco-maven-plugin</artifactId>
				  <version>0.8.5</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<!-- Used to set JRE version; will be used by IDEs like Eclipse as the
					target JRE (default is 1.5) -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-surefire-plugin</artifactId>
			  <version>3.0.0-M4</version>
			  <configuration>
				<argLine>${surefireArgLine}</argLine>
				<forkCount>1C</forkCount>
				<reuseForks>true</reuseForks>
			  </configuration>
			</plugin>
			<plugin>
			  <!-- Create code coverage reports and submit them to coveralls.io. -->
			  <groupId>org.eluder.coveralls</groupId>
			  <artifactId>coveralls-maven-plugin</artifactId>
			  <version>4.3.0</version>
			  <configuration>
				<jacocoReports>
				  <file>coverage/target/site/jacoco-aggregate/jacoco.xml</file>
				</jacocoReports>
			  </configuration>
			  <!-- workaround for
				   https://github.com/trautonen/coveralls-maven-plugin/issues/112
			  -->
			  <dependencies>
				<dependency>
				  <groupId>javax.xml.bind</groupId>
				  <artifactId>jaxb-api</artifactId>
				  <version>2.3.1</version>
				</dependency>
			  </dependencies>
			</plugin>
			<plugin>
			  <!-- Plugin for actually computing code coverage. -->
			  <groupId>org.jacoco</groupId>
			  <artifactId>jacoco-maven-plugin</artifactId>
			  <executions>
				<execution>
				  <id>prepare-agent</id>
				  <goals>
					<goal>prepare-agent</goal>
				  </goals>
				  <configuration>
					<propertyName>surefireArgLine</propertyName>
				  </configuration>
				</execution>
				<execution>
				  <id>default-cli</id>
				  <goals>
					<goal>report</goal>
				  </goals>
				  <phase>test</phase>
				  <configuration>
					<!-- use a non-standard output directory so the
						 coveralls plugin will not try to aggregate
						 this into the final coverage report, since we
						 want to control aggregation ourselves. -->
					<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
				  </configuration>
				</execution>
			  </executions>
			<configuration>
			  <excludes>
				<!-- Do not consider generated source code. Plugin fails for these files. -->
				<exclude>**/javacc/JavaCCParser.class</exclude>
				<exclude>**/javacc/JavaCCParserConstants.class</exclude>
				<exclude>**/javacc/JavaCCParserTokenManager.class</exclude>
				<exclude>**/javacc/JavaCharStream.class</exclude>
				<exclude>**/javacc/ParseException.class</exclude>
				<exclude>**/javacc/SimpleCharStream.class</exclude>
				<exclude>**/javacc/Token.class</exclude>
				<exclude>**/javacc/TokenMgrError.class</exclude>
			  </excludes>
			</configuration>
			</plugin>
			<plugin>
			  <!-- Plugin for creating Javadocs; goal for preparing
				   docs for upload to github: javadoc:aggregate -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven.javadoc.version}</version>
				<configuration>
					<bottom><![CDATA[Copyright &#169; {inceptionYear}&#x2018;{currentYear} {organizationName}. Generated from source code published under the Apache License 2.0. For more information, see the <a href="https://github.com/knowsys/vlog4j">VLog4j homepage</a>]]></bottom>
				</configuration>
			</plugin>
			<plugin>
				<!-- Plugin for uploading Javadocs to github; goal: scm-publish:publish-scm -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-scm-publish-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<checkoutDirectory>${project.build.directory}/scmpublish</checkoutDirectory>
					<checkinComment>Publishing javadoc for
						${project.artifactId}:${project.version}</checkinComment>
					<content>${project.reporting.outputDirectory}/apidocs</content>
					<pubScmUrl>scm:git:https://github.com/knowsys/vlog4j.git</pubScmUrl>
					<scmBranch>gh-pages</scmBranch>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>sign</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sources-jars</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.version}</version>
						<executions>
							<execution>
								<id>javadoc-jars</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<failOnError>false</failOnError>
								</configuration>
							</execution>
							<execution>
								<id>aggregate-javadoc-jar</id>
								<goals>
									<goal>aggregate-jar</goal>
								</goals>
								<configuration>
									<failOnError>false</failOnError>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>development</id>
			<build>
				<plugins>
					<plugin>
						<!-- Plugin for actually computing code coverage. -->
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<scm>
		<url>https://github.com/knowsys/vlog4j.git</url>
		<connection>scm:git:https://github.com/knowsys/vlog4j.git</connection>
		<developerConnection>scm:git:https://github.com/knowsys/vlog4j.git</developerConnection>
	</scm>

</project>
