<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>
	<artifactId>owlapi-distribution</artifactId>
	<packaging>bundle</packaging>
	<name>OWLAPI :: Distribution</name>

	<parent>
		<groupId>net.sourceforge.owlapi</groupId>
		<artifactId>owlapi-parent</artifactId>
		<version>5.1.20</version>
	</parent>

	<properties>
		<inherited.rdf4j.version>${rdf4j.version}</inherited.rdf4j.version>
	</properties>

	<!-- NOTE: These dependency declarations are only required to sort this 
		project to the end of the line in the multimodule build. -->
	<dependencies>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-apibinding</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-tools</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-impl</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-parsers</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-oboformat</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-rio</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-api</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>${project.groupId}</groupId><artifactId>owlapi-compatibility</artifactId><version>${project.version}</version></dependency>
		<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>2.9.10</version></dependency>
		<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>2.9.10.8</version></dependency>
		<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>2.9.10</version></dependency>
		<dependency><groupId>org.apache.commons</groupId><artifactId>commons-rdf-api</artifactId></dependency>
		<dependency><groupId>org.tukaani</groupId><artifactId>xz</artifactId><version>1.6</version></dependency>
		<dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>1.7.22</version></dependency>
		<dependency><groupId>org.slf4j</groupId><artifactId>jcl-over-slf4j</artifactId><version>1.7.22</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-model</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-model-api</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-model-vocabulary</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-api</artifactId><version>${inherited.rdf4j.version}</version>
			<exclusions>
				<exclusion>
					<groupId>javax.xml.bind</groupId>
					<artifactId>jaxb-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-languages</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-datatypes</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-binary</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-n3</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-nquads</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-ntriples</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-rdfjson</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-jsonld</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-rdfxml</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-trix</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-turtle</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-trig</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-rio-hdt</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>org.eclipse.rdf4j</groupId><artifactId>rdf4j-util</artifactId><version>${inherited.rdf4j.version}</version></dependency>
		<dependency><groupId>com.github.jsonld-java</groupId><artifactId>jsonld-java</artifactId><version>0.13.0</version></dependency>
		<!-- Disable until updated to use RDF4J  <dependency><groupId>org.semarglproject</groupId><artifactId>semargl-sesame</artifactId><version>0.7</version></dependency> -->

	</dependencies>

	<build>
		<plugins>
			<!-- Creates binary distribution. -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>3.2.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Implementation-Title>${project.name}</Implementation-Title>
						<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
						<Implementation-Version>${project.version}.${maven.build.timestamp}</Implementation-Version>
						<Bundle-SymbolicName>org.semanticweb.owl.owlapi</Bundle-SymbolicName>
						<Bundle-Version>${project.version}</Bundle-Version>
						<Embed-Dependency>
							groupId=${project.groupId};inline=true;scope=compile|runtime|provided
						</Embed-Dependency>
						<Embed-Directory>lib</Embed-Directory>
						<Embed-Transitive>true</Embed-Transitive>
						<_exportcontents>
							!org.semanticweb.owlapi.test.*,
							com.clarkparsia.*,
							de.uulm.*,
							org.semanticweb.owlapi.*;-split-package:=merge-first,
							org.semanticweb.owlapitools.*;-split-package:=merge-first,
							org.coode.*,
							uk.ac.manchester.*;-split-package:=merge-first,
							org.obolibrary.*;-split-package:=merge-first
						</_exportcontents>
						<Import-Package>
							!sun.misc,
							org.eclipse.rdf4j.*;version="[3.0,4.0)",
							!javax.annotation,
							!com.google.inject.internal.*;resolution:=optional,
							!com.github.jsonldjava.shaded.com.google.common.collect.*;resolution:=optional,
							!com.github.jsonldjava.shaded.com.google.common.util.concurrent.internal.*;resolution:=optional,
							org.apache.commons.io.*;version=2.5,
							org.apache.commons.logging.*;version=1.2,
							*
						</Import-Package>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.4.3</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<artifactSet>
								<includes>
									<include>net.sourceforge.owlapi:owlapi-api</include>
									<include>net.sourceforge.owlapi:owlapi-apibinding</include>
									<include>net.sourceforge.owlapi:owlapi-impl</include>
									<include>net.sourceforge.owlapi:owlapi-oboformat</include>
									<include>net.sourceforge.owlapi:owlapi-parsers</include>
									<include>net.sourceforge.owlapi:owlapi-rio</include>
									<include>net.sourceforge.owlapi:owlapi-tools</include>
								</includes>
								<excludes>
									<exclude>org.apache.felix:org.osgi.core</exclude>
									<exclude>org.eclipse.rdf4j:*</exclude>
									<exclude>com.fasterxml.jackson.core:*</exclude>
									<exclude>com.github.jsonld-java:*</exclude>
									<exclude>com.fasterxml.jackson.core:*</exclude>
									<exclude>org.apache.httpcomponents:*</exclude>
									<exclude>commons-codec:commons-codec:*</exclude>
									<exclude>org.slf4j:*</exclude>
									<exclude>org.semarglproject:*</exclude>
									<exclude>com.github.ben-manes.caffeine:*</exclude>
									<exclude>com.google.guava:*</exclude>
									<exclude>com.google.inject:*</exclude>
									<exclude>javax.inject:*</exclude>
									<exclude>aopalliance:*</exclude>
									<exclude>com.google.inject.extensions:*</exclude>
									<exclude>com.google.code.findbugs:*</exclude>
									<exclude>org.slf4j:slf4j-api</exclude>
									<exclude>commons-io:*</exclude>
									<exclude>org.tukaani:*</exclude>
									<exclude>com.carrotsearch:*</exclude>
								</excludes>
							</artifactSet>
							<transformers>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.4</version>
				<configuration>
					<show>public</show>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<skip>${no-javadoc}</skip>
							<show>public</show>
							<includeDependencySources>true</includeDependencySources>
							<dependencySourceIncludes>
								<dependencySourceInclude>net.sourceforge.owlapi:owlapi-api</dependencySourceInclude>
								<dependencySourceInclude>net.sourceforge.owlapi:owlapi-apibinding</dependencySourceInclude>
								<dependencySourceInclude>net.sourceforge.owlapi:owlapi-parsers</dependencySourceInclude>
								<dependencySourceInclude>net.sourceforge.owlapi:owlapi-tools</dependencySourceInclude>
								<dependencySourceInclude>net.sourceforge.owlapi:owlapi-impl</dependencySourceInclude>
								<dependencySourceInclude>net.sourceforge.owlapi:owlapi-oboformat</dependencySourceInclude>
							</dependencySourceIncludes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<attach>true</attach>
					<descriptors>
						<descriptor>src/assembly/sources.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
