<?xml version="1.0" encoding="UTF-8"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<parent>
		<groupId>com.eclipsesource</groupId>
		<artifactId>osgi-jaxrs-connector</artifactId>
		<version>1.0.1-ONMS</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.eclipsesource.jaxrs</groupId>
	<artifactId>jersey</artifactId>
	<packaging>pom</packaging>
	<version>2.22.2.ONMS.2</version>
	<name>OSGi - JAX-RS Jersey Shades</name>
	<modules>
		<module>com.eclipsesource.jaxrs.jersey.all</module>
		<module>com.eclipsesource.jaxrs.jersey.min</module>
	</modules>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<archive>
						<index>false</index>
						<manifest>
							<addClasspath>false</addClasspath>
						</manifest>
						<manifestEntries>
							<Built-By>Holger Staudacher</Built-By>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>4.1.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Version>${project.version}</Bundle-Version>
						<Bundle-Vendor>Holger Staudacher</Bundle-Vendor>
						<_exportcontents>
							javax.ws.rs.*;version="${jaxrs.version}",
							javax.annotation.*,
							org.glassfish.*,
							javax.inject.*
						</_exportcontents>
						<Import-Package>
							!com.sun.jdi.*,
							!sun.misc,
							!javax.persistence,
							!scala.*,
							!org.jruby.*,
							!com.twitter.util.*,
							!jersey.repackaged.*,
							javax.servlet.*;version="[2.3.0,4.0.0)";resolution:=optional,
							javax.annotation,
							*
						</Import-Package>
						<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
						<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
						<Embed-Directory>dependencies</Embed-Directory>
						<Embed-StripGroup>true</Embed-StripGroup>
						<Embed-Transitive>true</Embed-Transitive>
						<!-- TODO MVR for now we set it to 1.8, but should use 1.9 instead -->
						<Require-Capability>osgi.ee;filter:="(&amp;(osgi.ee=JavaSE)(version=1.8))"</Require-Capability>
					</instructions>
				</configuration>
				<executions>
					<execution>
						<id>osgi-bundle</id>
						<phase>package</phase>
						<goals>
							<goal>bundle</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.4.1</version>
				<configuration>
					<finalName>shaded-DO-NOT-USE</finalName>
					<createSourcesJar>true</createSourcesJar>
					<transformers>
						<transformer
								implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
							<manifestEntries>
								<Bundle-SymbolicName>${project.groupId}.${project.artifactId}.source</Bundle-SymbolicName>
								<Eclipse-SourceBundle>${project.groupId}.${project.artifactId};version="${project.version}"</Eclipse-SourceBundle>
								<Export-Package></Export-Package>
								<Import-Package></Import-Package>
								<Bundle-ClassPath></Bundle-ClassPath>
								<Embedded-Artifacts></Embedded-Artifacts>
								<Embed-Directory></Embed-Directory>
								<Ignore-Package></Ignore-Package>
								<Embed-Dependency></Embed-Dependency>
							</manifestEntries>
						</transformer>
					</transformers>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
</project>
