<?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>
	<properties>
		<protege.version>5.0.0-beta-19</protege.version>
	</properties>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>
	
	<groupId>edu.stanford.protege</groupId>	
	<artifactId>explanation-workbench</artifactId>
	<version>3.0.1</version>
	<packaging>bundle</packaging>

	<licenses>
		<license>
			<name>Apache License Version 2.0, January 2004</name>
			<url>http://www.apache.org/licenses/</url>
			<distribution>repo</distribution>
		</license>
		<license>
			<name>GNU LGPL Version 3.0</name>
			<url>http://www.gnu.org/licenses/lgpl.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<name>Explanation Workbench</name>
    <description>A plug-in that adds explanation facilities to the Protege Desktop ontology editor.
		Written by Matthew Horridge during his PhD at the University of Manchester.</description>
	<url>http://owl.cs.manchester.ac.uk/explanation</url>

	<developers>
		<developer>
			<name>Matthew Horridge</name>
			<email>matthew.horridge@stanford.edu</email>
		</developer>
	</developers>
	
	<scm>
		<connection>scm:git:git@github.com:protegeproject/explanation-workbench.git</connection>
		<developerConnection>scm:git:git@github.com:protegeproject/explanation-workbench.git</developerConnection>
		<url>https://github.com/protegeproject/explanation-workbench</url>
	</scm>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/protegeproject/explanation-workbench/issues</url>
	</issueManagement>	

	<repositories>
        <repository>
            <id>github</id>
            <url>https://github.com/protegeproject/mvn-repo/raw/master/releases</url>
        </repository>
    </repositories>
    
	<dependencies>

		<dependency>
			<groupId>net.sourceforge.owlapi</groupId>
			<artifactId>owlapi-osgidistribution</artifactId>
			<version>4.5.10</version>
			<scope>provided</scope>
		</dependency>

        <dependency>
			<groupId>edu.stanford.protege</groupId>
			<artifactId>protege-common</artifactId>
			<version>${protege.version}</version>
			<scope>provided</scope>
        </dependency>

		<dependency>
			<groupId>edu.stanford.protege</groupId>
			<artifactId>protege-editor-core</artifactId>
			<version>${protege.version}</version>
			<scope>provided</scope>
		</dependency>

        <dependency>
			<groupId>edu.stanford.protege</groupId>
			<artifactId>protege-editor-owl</artifactId>
			<version>${protege.version}</version>
			<scope>provided</scope>
        </dependency>
        
		<dependency>
			<groupId>net.sourceforge.owlapi</groupId>
			<artifactId>owlexplanation</artifactId>
			<version>2.0.1</version>
		</dependency>

		<dependency>
			<groupId>net.sourceforge.owlapi</groupId>
			<artifactId>telemetry</artifactId>
			<version>2.0.0</version>
		</dependency>

	</dependencies>
	
	<build>
		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>


            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>3.8.0</version>
              <configuration>
                <source>1.8</source>
                <target>1.8</target>
              </configuration>
            </plugin>

            <plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>3.0.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-Activator>org.protege.editor.core.plugin.DefaultPluginActivator</Bundle-Activator>
						<Bundle-SymbolicName>uk.ac.manchester.cs.owl.explanation;singleton:=true</Bundle-SymbolicName>
						<Bundle-Vendor>Matthew Horridge</Bundle-Vendor>
						<Embed-Dependency>*;scope=!provided;scope=compile|runtime;inline=false</Embed-Dependency>
						<Embed-Transitive>true</Embed-Transitive>
						<Embed-Directory>target/dependency</Embed-Directory>
						<Import-Package>*</Import-Package>
					</instructions>
              </configuration>
            </plugin>
		</plugins>
	</build>
	
		<profiles>
			<profile>
				<id>release</id>
				<build>
					<plugins>
						<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>

						<plugin>
							<groupId>org.sonatype.plugins</groupId>
							<artifactId>nexus-staging-maven-plugin</artifactId>
							<version>1.6.6</version>
							<extensions>true</extensions>
							<executions>
								<execution>
									<id>default-deploy</id>
									<phase>deploy</phase>
									<goals>
										<goal>deploy</goal>
									</goals>
								</execution>
							</executions>
							<configuration>
								<serverId>ossrh</serverId>
								<nexusUrl>https://oss.sonatype.org/</nexusUrl>
								<autoReleaseAfterClose>true</autoReleaseAfterClose>
							</configuration>
						</plugin>

					</plugins>
				</build>
			</profile>
		<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>
						<version>2.7</version>
						<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>copy-dependencies</id>
								<phase>package</phase>
								<goals>
									<goal>copy-dependencies</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<excludeScope>provided</excludeScope>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	
</project>
