<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>elk-parent</artifactId>
		<groupId>au.csiro</groupId>
		<version>0.5.0</version>
	</parent>

	<artifactId>elk-protege</artifactId>
	<packaging>bundle</packaging>

	<name>ELK Reasoner Protege Plug-in</name>
	<description>ELK plug-in for Protege ontology editor</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- Protege requires Java 8 -->
		<java.required.version>8</java.required.version>
		<log4j.lower.version>1.2</log4j.lower.version>
		<log4j.upper.version>2</log4j.upper.version>
		<protege.lower.version>5</protege.lower.version>
		<protege.upper.version>6</protege.upper.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>edu.stanford.protege</groupId>
			<artifactId>protege-editor-core</artifactId>
			<version>${protege.version}</version>
		</dependency>
		<dependency>
			<groupId>edu.stanford.protege</groupId>
			<artifactId>protege-editor-owl</artifactId>
			<version>${protege.version}</version>
		</dependency>
		<dependency>
			<groupId>net.sourceforge.owlapi</groupId>
			<artifactId>owlapi-osgidistribution</artifactId>
			<version>${owlapi4.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>elk-owlapi4</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>elk-reasoner</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>elk-owl-model</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>elk-proofs</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.liveontologies</groupId>
			<artifactId>puli</artifactId>
		</dependency>
		<dependency>
			<groupId>org.liveontologies</groupId>
			<artifactId>protege-proof-explanation</artifactId>
			<version>${protege-proof-explanation.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.liveontologies</groupId>
			<artifactId>protege-proof-justification</artifactId>
			<version>0.0.1-SNAPSHOT</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<resources>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<includes>
					<include>plugin.xml</include>
				</includes>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Implementation-Title>${project.parent.name}</Implementation-Title>
						<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
						<Implementation-Version>${project.version}.${maven.build.timestamp}</Implementation-Version>
						<Bundle-SymbolicName>${project.groupId};singleton:=true</Bundle-SymbolicName>
						<Export-Package>!*</Export-Package>
						<Embed-Dependency>*;scope=provided;inline=true</Embed-Dependency>
						<Embed-Transitive>true</Embed-Transitive>
						<Embed-StripGroup>true</Embed-StripGroup>
						<Update-Url>${protege.update.url}/p5.update.properties</Update-Url>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<!-- with this profile put META-INF/MANIFEST.MF, plugin.xml, and embed 
				dependencies so that Eclipse/PDE can find them; to use in Eclipse right click 
				on the project > Configure > Convert to Plug-in Projects... -->
			<id>eclipse</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>copy-resources</id>
								<phase>validate</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<outputDirectory>${basedir}</outputDirectory>
									<resources>
										<resource>
											<directory>src/main/resources</directory>
											<includes>
												<include>plugin.xml</include>
											</includes>
											<filtering>true</filtering>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.felix</groupId>
						<artifactId>maven-bundle-plugin</artifactId>
						<extensions>true</extensions>
						<configuration>
							<manifestLocation>META-INF</manifestLocation>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-dependency-plugin</artifactId>
						<executions>
							<execution>
								<id>install-non-bundle-dependencies</id>
								<phase>install</phase>
								<goals>
									<goal>unpack-dependencies</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<includeScope>provided</includeScope>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.felix</groupId>
						<artifactId>maven-bundle-plugin</artifactId>
						<extensions>true</extensions>
						<configuration>
							<instructions>
								<Bundle-ClassPath>target/dependency,.</Bundle-ClassPath>
							</instructions>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
