<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>
	<parent>
		<artifactId>ontop</artifactId>
		<groupId>it.unibz.inf.ontop</groupId>
		<version>1.11.0</version>
		<relativePath>..</relativePath>
	</parent>

	<artifactId>ontop-protege4</artifactId>
	<name>ontop-protege4</name>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- OBDA libraries -->

		<!-- These are dependencies to the OBDA related classes. -->

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontop-obdalib-core</artifactId>
			<version>${project.version}</version>
		</dependency>


		<!--Dependencies from the OBDA projects to include in the jar -->

		<!-- Reasoner libraries -->

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontop-reformulation-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontop-quest-owlapi3</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>owlapi-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>owlapi-apibinding</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontop-quest-db</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontop-obdalib-owlapi3</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>owlapi-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>owlapi-apibinding</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontop-obdalib-sesame</artifactId>
			<version>${project.version}</version>

		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontop-quest-sesame</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>owlapi-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>owlapi-apibinding</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
		</dependency>

		<dependency>
  			<groupId>net.sf.jgrapht</groupId>
  			<artifactId>jgrapht</artifactId>
		</dependency>
		
		<dependency>
			<groupId>jgraph</groupId>
			<artifactId>jgraph</artifactId>
		</dependency>

		<!-- Protege 4 and OWLAPI bundle dependencies -->

		<dependency>
			<groupId>edu.stanford.protege</groupId>
			<artifactId>org.protege.editor.core.application</artifactId>
			<version>4.3.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>edu.stanford.protege</groupId>
			<artifactId>org.protege.editor.owl</artifactId>
			<version>4.3.0</version>
			<scope>provided</scope>
		</dependency>

		<!-- transitive dependencies -->
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr</artifactId>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr-runtime</artifactId>
			<exclusions>
				<exclusion>
					<groupId>antlr</groupId>
					<artifactId>antlr</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
		<dependency>
			<groupId>net.sf.opencsv</groupId>
			<artifactId>opencsv</artifactId>
			<version>2.0</version>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>stringtemplate</artifactId>
			<version>3.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>juli</artifactId>
		</dependency>

		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-model</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-query</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-queryalgebra-model</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-queryparser-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-queryparser-sparql</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-queryresultio-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-queryresultio-text</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-repository-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-rio-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-rio-datatypes</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-rio-languages</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-rio-n3</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-rio-ntriples</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-rio-rdfxml</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-rio-turtle</artifactId>
		</dependency>
		<dependency>
			<groupId>org.openrdf.sesame</groupId>
			<artifactId>sesame-util</artifactId>
		</dependency>
		<dependency>
	   		<groupId>com.github.jsqlparser</groupId>
	   		<artifactId>jsqlparser</artifactId>
		</dependency>
	</dependencies>

	<build>
		<finalName>it.unibz.inf.obda.p4plugin-${project.version}</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<excludes>
					
						<exclude>**/TBoxDAGImpl.java</exclude>
						<exclude>**/dagjgrapht/*.java</exclude>
						<exclude>**/LUBM*.java</exclude>
					
						<exclude>*it/unibz/krdb/obda/owlrefplatform/core/reformulation/TreeWitness*</exclude>
						<exclude>**/TW*.java</exclude>
						<exclude>**/LUBM*.java</exclude>
						<exclude>**/directmapping/*.java</exclude>
						<exclude>**/views/QueryHistoryView.java</exclude>
						<exclude>**/views/RDBMSInspectorView.java</exclude>
					</excludes>
					<testExcludes>
						<exclude>**/MappingToRuleTester.java</exclude>
						<exclude>**/PartialEvaluationTest.java</exclude>
					</testExcludes>
				</configuration>
			</plugin>
			<plugin>
        		<groupId>org.apache.maven.plugins</groupId>
        		<artifactId>maven-surefire-plugin</artifactId>
	       		<configuration>
          			<skipTests>true</skipTests>
        		</configuration>
      		</plugin>
			<!-- <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> 
				<archive> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> 
				</archive> </configuration> </plugin> -->
			<plugin>
				<!-- This is the main plugin to build the bundle. Informattion about 
					this plugin can be found here: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html 
					Note the inline comments -->

				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>

				<!-- <executions> <execution> <id>bundle-manifest</id> <phase>process-classes</phase> 
					<goals> <goal>manifest</goal> </goals> </execution> </executions> -->

				<!-- <version>2.3.4</version> -->
				<extensions>true</extensions>
				<configuration>

					<!-- The follwing is the set of instructions of how pack the bundle 
						and how to create the MANIFEST.MF for the bundle. The configuration does 
						4 things. 1. It makes sure that the "tight" dependencies are not packed as 
						jars, but as .class files (inline). It makes sure that all the runtime dependencies 
						are packed as jars. 2. It makes sure all the protege plugin resources are 
						packed (plugin.xml, tabs*.xml, etc). 3. It makes sure the META-INF/MANIFEST.MF 
						for OSGi bundles is created with the correct imports, exports and classpath. -->

					<instructions>

						<!-- <Build-Jdk>1.6</Build-Jdk> -->
						<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
						<!-- This makes sure any dependency in the obdalib <dependency> dependencies 
							are packed as .classes (uncompressed, no jars) and the rest is packed as 
							.jars -->
						<!-- <Embed-Dependency>*;groupId=it.unibz.inf.ontop;inline=true,obdalib*;groupId=inf.unibz.it*;inline=true,*;groupId=!it.unibz.krdb;scope=compile|runtime</Embed-Dependency> -->
						<Embed-Dependency>*;groupId=it.unibz.inf.ontop.*;inline=true,*;groupId=it.unibz.krdb.obda.protege4.*;inline=true,*;groupId=!it.unibz.inf.ontop;scope=compile|runtime</Embed-Dependency>

						<Bundle-Name>-ontopPro-</Bundle-Name>
						<!-- necessary for protege 4 plugins -->
						<Bundle-Category>protege</Bundle-Category>

						<!-- general information -->
						<Bundle-ContactAddress>mariano.muro@gmail.com</Bundle-ContactAddress>
						<Bundle-DocURL>http://ontop.inf.unibz.it</Bundle-DocURL>
						<Bundle-Description>-ontopPro- Protege 4</Bundle-Description>
						<Bundle-Vendor>Free University of Bozen-Bolzano. KRDB Research
							Centre</Bundle-Vendor>
						<Implementation-Version>${project.version}</Implementation-Version>

						<!-- Required. Remember to use the proper version for dependencies -->
						<Bundle-Version>1.9</Bundle-Version>
						<Build-Number>0</Build-Number>
						<!-- <Private-Package>!osgi.wiring.package, !org.w3c.dom.ranges, !org.w3c.dom.traversal*</Private-Package> -->
						<Export-Package>it.unibz.krdb.obda.protege4.*</Export-Package>
						<Import-Package>it.unibz.krdb.obda.protege4.*,
							!org.json,
							!org.codehaus.groovy.*,
							!groovy.*,
							javax.xml.datatype, javax.swing.*,
							javax.accessibility,
							javax.naming.*,javax.management.*,javax.sql.*,
							javax.xml.parsers.*,org.xml.sax.*,
							it.unibz.krdb.obda.*,
							org.protege.osgi.jdbc, org.protege.osgi.*,
							uk.ac.manchester.*,
							org.protege.*,
							org.semanticweb.*,
							com.hp.hpl.jena.query.*,
							org.apache.tomcat.*,
							org.openrdf.sesame.*,
							org.openrdf.query*,
							org.openrdf.query.parser*,
							org.openrdf.query.algebra*,
							org.openrdf.query.resultio.*,
							org.openrdf.rio.n3*,
							info.aduna.*,
							info.aduna.commons.*,
							!au.com.bytecode.opencsv*,
							!com.touchgraph*,
							!org.codehaus.janino, org.codehaus.*
							!org.w3c.dom*,
							!org.xml.*,!sun.*,!jena.*, !junit.*, !org.antl*,
							!org.apache*,
							!org.ietf.*, !javax.*, !com.hp.*,
							!arq*, !antlr*,
							!EDU.oswego.cs.dl.util.concurrent,
							!osgi.wiring.package,
							!org.w3c.dom.ranges,!org.w3c.dom.traversal, *</Import-Package>
						<Eclipse-LazyStart>false</Eclipse-LazyStart>

						<!-- The name of the plugin for OSGi dependencies. It has to be singleton 
							or protege wont load it -->
						<Bundle-SymbolicName>it.unibz.krdb.obda.protege4;singleton:=true</Bundle-SymbolicName>

						<!-- This makes sure ONLY the necessary dependencies are imported. 
							If this is not supplied, maven-bundle-plugin will attempt to import ALL classes 
							in the dependencies (even transitive ones) This will lead to class not found 
							exceptions. It's very important to assure only the needed depdencies are 
							imported. -->
						<!-- <Import-Package>com.ibm.db2.jcc.licenses.*,com.hp.hpl.jena.iri.*,org.apache.commons.logging.*,com.hp.hpl.jena.query.*,org.apache.log4j.*,org.atlr.*,org.slf4j.*,org.protege.*,org.coode.*,org.semanticweb.*,uk.ac.manchester.*,!*,org.protege.osgi.jdbc</Import-Package> -->
						<!-- <Import-Package>!osgi.wiring.package,!org.w3c.dom.ranges,javax.accessibility.*,org.apache.log4j,javax.swing.*,org.apache.commons.logging.*,org.apache.log4j.*,org.atlr.*,org.slf4j.*,org.protege.*,org.coode.*,org.semanticweb.*,uk.ac.manchester.*,org.protege.osgi.jdbc,org.xml.sax*,javax.xml*,javax.xml.parsers*,javax.naming*,ch.qos.logback.classic*,com.hp.hpl.jena.iri*,com.hp.hpl.jena.query*,!*</Import-Package> -->

						<!-- This makes sure all OBDA classes are exported and available in 
							dependent projects -->
						<!-- <Export-Package>it.unibz.krdb.*</Export-Package> -->

						<!-- Not needed anymore, it was necessary when we were not using import-package 
							<Require-Bundle>org.eclipse.equinox.registry,org.eclipse.equinox.common,org.protege.common,org.protege.editor.core.application,org.protege.editor.owl,org.semanticweb.owl.owlapi</Require-Bundle> -->
					</instructions>
				</configuration>
			</plugin>

			<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> 
				<executions> <execution> <phase>validate</phase> <goals> <goal>create</goal> 
				</goals> </execution> </executions> </plugin> -->

			<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> 
				<configuration> <skip>false</skip> </configuration> </plugin> -->

		</plugins>
	</build>
	<url>http://ontop.inf.unibz.it/</url>
	<description>The -ontop- plugin for Protege</description>
	<organization>
		<name>KRDB Research Centre. Free University of Bozen Bolzano.</name>
		<url>http://www.inf.unibz.it/krdb/</url>
	</organization>
</project>
