<?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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>net.ontopia</groupId>
		<artifactId>super-pom</artifactId>
		<version>3</version>
	</parent>

	<groupId>net.ontopia</groupId>
	<artifactId>ontopia-parent</artifactId>
	<packaging>pom</packaging>
	<version>5.4.0</version>
	<name>Ontopia</name>
	<description>Ontopia: Complete Topic Maps solution</description>
	<url>https://github.com/ontopia/ontopia</url>
	<issueManagement>
		<system>Github</system>
		<url>https://github.com/ontopia/ontopia/issues</url>
	</issueManagement>
	<scm>
		<url>https://github.com/ontopia/ontopia</url>
		<connection>scm:git:git@github.com:ontopia/ontopia.git</connection>
		<developerConnection>scm:git:git@github.com:ontopia/ontopia.git</developerConnection>
	  <tag>release-5.4.0</tag>
  </scm>

	<inceptionYear>2001</inceptionYear>
	<organization>
		<name>The Ontopia Project</name>
		<url>https://github.com/ontopia/ontopia</url>
	</organization>

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

	<modules>
		<module>ontopia-engine</module>
		<module>ontopia-navigator</module>
		<module>ontopia-webed</module>
		<module>ontopia-contentstore</module>
		<module>ontopia-db2tm</module>
		<module>ontopia-tmrap</module>
		<module>ontopia-tmrap-aar</module>
		<module>ontopia-vizigator</module>
		<module>ontopia-classify</module>
		<module>ontopia-realm</module>
		<module>ontopoly-editor</module>
		<module>ontopia-tmprefs</module>
		<module>ontopia-rdf</module>
		<module>ontopia-schema</module>
		<module>ontopia-jdbcspy7</module>
		<module>ontopia-lucene</module>
		<module>ontopia-rest</module>
		<module>ontopia-deprecated-utils</module>
		
		<!-- Web Apps -->
		<module>webapp-root</module>
		<module>webapp-accessctl</module>
		<module>webapp-i18n</module>
		<module>webapp-xmltools</module>
		<module>webapp-manage</module>
		<module>webapp-omnigator</module>
		<module>webapp-ontopoly</module>
		<module>webapp-ontopoly-standalone</module>
		<module>webapp-tmrap</module>
		
		<!-- Distribution -->
		<module>ontopia-distribution-tomcat</module>
		
	</modules>
	
	<properties>
		<!-- CXTM test case revisions -->
		<xtm2.revision>32</xtm2.revision>
		<xtm21.revision>88</xtm21.revision>
		<ctm.revision>85</ctm.revision>
		<jtm.revision>46</jtm.revision>
		<tmxml.revision>68</tmxml.revision>
		<!-- reused dependency versions -->
		<lucene.version>7.1.0</lucene.version>
		<lucene.snowball.version>3.0.3</lucene.snowball.version>
		<axis2.version>1.6.4</axis2.version>
		<tmapi.version>2.0.2</tmapi.version>
		<tmapi-tests.version>2.1.1</tmapi-tests.version>
		<tmapi.group>net.ontopia.external.org.tmapi</tmapi.group>
		<jena.version>3.17.0</jena.version>
		<ontopia.jetty.port>8080</ontopia.jetty.port>
		<poi.version>5.2.3</poi.version>
		
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>

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

	<prerequisites>
		<maven>2.2.1</maven>
	</prerequisites>
	
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.8</version>
					<executions>
						<execution>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.0.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<packagingExcludes>WEB-INF/classes/org/apache/jsp/**</packagingExcludes>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.22.2</version>
					<configuration>
						<argLine>-Dontopia.jetty.port=${ontopia.jetty.port} -Xmx1024m -XX:MaxPermSize=256m</argLine>
						<includes>
							<include>**/*Tests.java</include>
							<include>**/*Test.java</include>
							<include>**/Test*.java</include>
							<include>**/*TestCase.java</include>
						</includes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>1.4</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>antlr-maven-plugin</artifactId>
					<version>2.2</version>
					<executions>
						<execution>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>de.jflex</groupId>
					<artifactId>jflex-maven-plugin</artifactId>
					<version>1.6.1</version>
					<executions>
						<execution>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.7.0</version>
					<configuration>
						<fork>true</fork>
						<maxmem>512m</maxmem>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.mortbay.jetty</groupId>
					<artifactId>maven-jetty-plugin</artifactId>
					<version>6.1.26</version>
					<configuration>
						<connectors>
							<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
								<port>${ontopia.jetty.port}</port>
								<maxIdleTime>60000</maxIdleTime>
							</connector>
						</connectors>
						<stopKey>foo</stopKey>
						<stopPort>9999</stopPort>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.eclipse.jetty</groupId>
					<artifactId>jetty-jspc-maven-plugin</artifactId>
					<version>9.2.13.v20150730</version>
					<executions>
						<execution>
							<id>jspc</id>
							<goals>
								<goal>jspc</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<useProvidedScope>true</useProvidedScope>
						<mergeFragment>false</mergeFragment>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.cargo</groupId>
					<artifactId>cargo-maven2-plugin</artifactId>
					<version>1.6.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>1.6.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.4</version> <!-- version 3 breaks assembly! -->
					<configuration>
						<outputDirectory>${project.build.directory}/site/api</outputDirectory>
						<author>true</author>
						<version>true</version>
						<use>true</use>
						<public>true</public>
						<bottom><![CDATA[<div style="text-align:center;">Copyright &copy; ${current.year} <a href="http://www.ontopia.net">Ontopia</a>.</div>]]></bottom>
						<doctitle>Ontopia API documentation</doctitle>
						<windowtitle>Ontopia</windowtitle>
						<excludePackageNames>org.apache.jsp</excludePackageNames>
						<quiet>true</quiet>
						<groups>
							<group><title>Core Topic Map Packages</title><packages>net.ontopia.topicmaps.core*:net.ontopia.topicmaps.classify*:net.ontopia.topicmaps.db2tm*:net.ontopia.topicmaps.entry*:net.ontopia.topicmaps.impl*:net.ontopia.topicmaps.utils*:net.ontopia.topicmaps.xml*</packages></group>
							<group><title>Core Information Set Packages</title><packages>net.ontopia.infoset*</packages></group>
							<group><title>Query Engine Packages</title><packages>net.ontopia.topicmaps.query*</packages></group>
							<group><title>Full-text Integration Packages</title><packages>net.ontopia.infoset.fulltext*</packages></group>
							<group><title>Schema Tools Packages</title><packages>net.ontopia.topicmaps.schema*</packages></group>
							<group><title>Web Editor Packages</title><packages>net.ontopia.topicmaps.webed*</packages></group>
							<group><title>Navigator Framework Packages</title><packages>net.ontopia.topicmaps.nav*:net.ontopia.topicmaps.nav2*</packages></group>
							<group><title>RDBMS Backend Connector Packages</title><packages>net.ontopia.topicmaps.impl.rdbms</packages></group>
						</groups>
						<encoding>utf-8</encoding>
						<failOnError>false</failOnError>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.axis2</groupId>
					<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
					<version>${axis2.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>wsdl2code</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.axis2</groupId>
					<artifactId>axis2-aar-maven-plugin</artifactId>
					<version>${axis2.version}</version>
					<extensions>true</extensions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
					<configuration>
						<excludes>
							<exclude>**/org/apache/jsp/**</exclude>
							<exclude>**/ontopoly/resources/tiny_mce/**</exclude>
							<exclude>**/ontopoly/images/jquery**</exclude>
						</excludes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>1.14</version>
					<configuration>
						<verbose>false</verbose>
						<licenseName>apache_v2</licenseName>
						<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
						<processStartTag>#!</processStartTag>
						<processEndTag>!#</processEndTag>
						<sectionDelimiter>#-</sectionDelimiter>
						<roots>
							<root>src/main/java</root>
							<root>src/test/java</root>
							<root>target/generated-sources</root>
						</roots>
						<includes>
							<include>**/*.java</include>
						</includes>
						<ignoreTag>#! Ignore-License</ignoreTag>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-patch-plugin</artifactId>
					<version>1.2</version>
				</plugin>
				<plugin>
					<groupId>net.ontopia</groupId>
					<artifactId>documentation-maven-plugin</artifactId>
					<version>1.0</version>
					<executions>
						<execution>
							<id>site-default</id>
							<goals><goal>generate</goal></goals>
							<phase>prepare-package</phase>
							<configuration>
								<rootDirectory>${basedir}/src/site</rootDirectory>
								<template>${basedir}/../src/site/templates/distribution.vm</template>
								<resources>
									<resource>${project.basedir}/src/site/resources</resource>
									<resource>${project.basedir}/../src/site/resources</resource>
								</resources>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>com.github.warmuuh</groupId>
					<artifactId>libsass-maven-plugin</artifactId>
					<version>0.2.9-libsass_3.4.7</version>
					<executions>
						<execution>
							<id>site-default</id>
							<phase>prepare-package</phase>
							<goals><goal>compile</goal></goals>
							<configuration>
								<outputStyle>nested</outputStyle>
								<inputPath>${basedir}/../src/sass/</inputPath>
								<outputPath>${basedir}/target/site/</outputPath>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<!-- disabled default site to allow our own implementation -->
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.7</version>
				<configuration>
					<skip>true</skip>
					<generateReports>false</generateReports>
				</configuration>
			</plugin>
			<plugin>
				<groupId>net.ontopia</groupId>
				<artifactId>documentation-maven-plugin</artifactId>
				<executions>
					<execution>
						<inherited>false</inherited>
						<id>site-default</id>
						<configuration>
							<skip>true</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.warmuuh</groupId>
				<artifactId>libsass-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>site-default</id>
						<inherited>false</inherited>
						<phase>skip</phase>
					</execution>
				</executions>
			</plugin>			
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>parent-update-project-license</id>
						<inherited>false</inherited>
						<goals><goal>update-project-license</goal></goals>
						<phase>initialize</phase>
					</execution>
					<execution>
						<id>child-update-project-license</id>
						<inherited>true</inherited>
						<goals><goal>update-project-license</goal></goals>
						<phase>generate-resources</phase>
						<configuration>
							<licenseFile>${basedir}/target/generated-sources/license/LICENSE.txt</licenseFile>
						</configuration>
					</execution>
					<execution>
						<id>child-set-license-headers</id>
						<inherited>true</inherited>
						<goals><goal>update-file-header</goal></goals>
						<phase>process-sources</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>${tmapi.group}</groupId>
				<artifactId>tmapi</artifactId>
				<version>${tmapi.version}</version>
			</dependency>
			<dependency>
				<groupId>net.sf.trove4j</groupId>
				<artifactId>trove4j</artifactId>
				<version>3.0.3</version>
			</dependency>
			<dependency>
				<groupId>com.thaiopensource</groupId>
				<artifactId>jing</artifactId>
				<version>20091111</version>
				<exclusions>
					<exclusion>
						<groupId>xml-apis</groupId>
						<artifactId>xml-apis</artifactId>
					</exclusion>
					<exclusion>
						<groupId>xerces</groupId>
						<artifactId>xercesImpl</artifactId>
					</exclusion>
					<exclusion>
						<groupId>net.sf.saxon</groupId>
						<artifactId>saxon</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>commons-dbcp</groupId>
				<artifactId>commons-dbcp</artifactId>
				<version>1.3</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-collections4</artifactId>
				<version>4.1</version>
			</dependency>
			<dependency>
				<!-- might be removable for java 8 -->
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>1.10</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.6</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.7</version>
			</dependency>
			<dependency>
				<groupId>urbanophile</groupId>
				<artifactId>java-getopt</artifactId>
				<version>1.0.9</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>1.7.36</version>
			</dependency>
			<dependency>
				<groupId>antlr</groupId>
				<artifactId>antlr</artifactId>
				<version>2.7.7</version>
			</dependency>
			<dependency>
				<groupId>org.apache.jena</groupId>
				<artifactId>jena-core</artifactId>
				<version>${jena.version}</version>
				<exclusions>
					<exclusion>
						<groupId>log4j</groupId>
						<artifactId>log4j</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.jgroups</groupId>
				<artifactId>jgroups</artifactId>
				<version>4.0.0.Final</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>jtidy</artifactId>
				<version>r8-20060801</version>
			</dependency>
			<dependency>
				<groupId>org.apache.lucene</groupId>
				<artifactId>lucene-core</artifactId>
				<version>${lucene.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.lucene</groupId>
				<artifactId>lucene-analyzers-common</artifactId>
				<version>${lucene.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.lucene</groupId>
				<artifactId>lucene-queryparser</artifactId>
				<version>${lucene.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.lucene</groupId>
				<artifactId>lucene-snowball</artifactId>
				<version>${lucene.snowball.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-fileupload</groupId>
				<artifactId>commons-fileupload</artifactId>
				<version>1.3.3</version>
			</dependency>
			<dependency>
				<groupId>org.apache.velocity</groupId>
				<artifactId>velocity</artifactId>
				<version>1.7</version>
			</dependency>
			<dependency>
				<groupId>net.sf.opencsv</groupId>
				<artifactId>opencsv</artifactId>
				<version>1.8</version>
			</dependency>
			<dependency>
				<groupId>graphlayout</groupId>
				<artifactId>graphlayout</artifactId>
				<version>1.2.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.poi</groupId>
				<artifactId>poi-ooxml</artifactId>
				<version>${poi.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.poi</groupId>
				<artifactId>poi</artifactId>
				<version>${poi.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.poi</groupId>
				<artifactId>poi-scratchpad</artifactId>
				<version>${poi.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.pdfbox</groupId>
				<artifactId>pdfbox</artifactId>
				<version>2.0.24</version>
			</dependency>
			<dependency>
				<groupId>org.ccil.cowan.tagsoup</groupId>
				<artifactId>tagsoup</artifactId>
				<version>1.2</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>jstl</artifactId>
				<version>1.2</version>
			</dependency>
			<dependency>
				<groupId>taglibs</groupId>
				<artifactId>standard</artifactId>
				<version>1.1.2</version>
			</dependency>
			<dependency>
				<groupId>org.apache.wicket</groupId>
				<artifactId>wicket</artifactId>
				<version>1.4.8</version>
			</dependency>
			<dependency>
				<groupId>org.apache.wicket</groupId>
				<artifactId>wicket-datetime</artifactId>
				<version>1.4.8</version>
			</dependency>
			<dependency>
				<groupId>org.apache.wicket</groupId>
				<artifactId>wicket-extensions</artifactId>
				<version>1.4.8</version>
			</dependency>
			<dependency>
				<groupId>org.apache.axis2</groupId>
				<artifactId>axis2-kernel</artifactId>
				<version>${axis2.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.axis2</groupId>
				<artifactId>axis2-java2wsdl</artifactId>
				<version>${axis2.version}</version>
			</dependency>

			<!-- provided dependencies -->
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>3.0.1</version>				
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>javax.servlet.jsp</groupId>
				<artifactId>javax.servlet.jsp-api</artifactId>
				<version>2.2.1</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>javax.el</groupId>
				<artifactId>javax.el-api</artifactId>
				<version>2.2.1</version>
				<scope>provided</scope>
			</dependency>

			<!-- Test dependencies -->
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>1.3.153</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-reload4j</artifactId>
				<version>1.7.36</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.13.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>httpunit</groupId>
				<artifactId>httpunit</artifactId>
				<version>1.6.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.seleniumhq.selenium.client-drivers</groupId>
				<artifactId>selenium-java-client-driver</artifactId>
				<version>1.0.1</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<profiles>
		<profile>
			<!-- Profile used for generating a test coverage report -->
			<id>jacoco</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.20.1</version>
						<configuration>
							<argLine>-Dontopia.jetty.port=${ontopia.jetty.port} ${argLine}</argLine>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.0</version>
						<executions>
							<execution>
								<id>default-prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<!-- Profile used for making the tomcat distribution -->
			<id>ontopia-distribution-tomcat</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>3.0.0</version>
						<executions>
							<execution>
								<id>current-year</id>
								<inherited>false</inherited>
								<goals>
									<goal>timestamp-property</goal>
								</goals>
								<phase>validate</phase>
								<configuration>
									<name>current.year</name>
									<pattern>yyyy</pattern>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<inherited>false</inherited>
								<phase>prepare-package</phase>
								<goals>
									<goal>aggregate</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<!-- aggregate takes different configuration, see #485 -->
							<reportOutputDirectory>${project.build.directory}/site/api</reportOutputDirectory>
							<destDir>api</destDir>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
