<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">

	<parent>
		<artifactId>hapi</artifactId>
		<groupId>ca.uhn.hapi</groupId>
		<version>2.2</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<modelVersion>4.0.0</modelVersion>

	<groupId>ca.uhn.hapi</groupId>
	<artifactId>hapi-osgi-base</artifactId>
	<name>HAPI - Java HL7 API - OSGI Bundle</name>

	<packaging>bundle</packaging>

	<dependencies>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-base</artifactId>
			<version>${hapi.version}</version>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v21</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v22</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v23</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v231</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v24</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v25</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v251</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v26</artifactId>
			<version>${hapi.version.structures}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<reporting>
		<plugins>
		</plugins>
	</reporting>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven.javadoc.plugin.version}</version>
				<inherited>true</inherited>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.0.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<!-- Embed all dependency jars except logging one. Since logging shall 
							be used from PAX-logging -->
						<Embed-Dependency>*;scope=compile|runtime;artifactId=!commons-logging|log4j|hapi-base</Embed-Dependency>
						<Embed-Transitive>true</Embed-Transitive>
						<unpackBundle>true</unpackBundle>
						<!-- Packages exported by HAPI OSGI Bundle to others -->
						<Export-Package>
							ca.uhn.hl7v2*,
							ca.uhn.hl7v2.app*,
							ca.uhn.hl7v2.conf*,
							ca.uhn.hl7v2.conf.check*,
							ca.uhn.hl7v2.conf.classes.abs*,
							ca.uhn.hl7v2.conf.classes.exceptions*,
							ca.uhn.hl7v2.conf.parser*,
							ca.uhn.hl7v2.conf.spec*,
							ca.uhn.hl7v2.conf.spec.message*,
							ca.uhn.hl7v2.conf.spec.usecase*,
							ca.uhn.hl7v2.conf.store*,
							ca.uhn.hl7v2.llp*,
							ca.uhn.hl7v2.model*,
							ca.uhn.hl7v2.model.primitive*,
							ca.uhn.hl7v2.model.v21.datatype*,
							ca.uhn.hl7v2.model.v22.datatype*,
							ca.uhn.hl7v2.model.v23.datatype*,
							ca.uhn.hl7v2.model.v231.datatype*,
							ca.uhn.hl7v2.model.v24.datatype*,
							ca.uhn.hl7v2.model.v25.datatype*,
							ca.uhn.hl7v2.model.v251.datatype*,
							ca.uhn.hl7v2.model.v26.datatype*,
							ca.uhn.hl7v2.parser*,
							ca.uhn.hl7v2.parser.ng*,
							ca.uhn.hl7v2.preparser*,
							ca.uhn.hl7v2.protocol*,
							ca.uhn.hl7v2.protocol.impl*,
							ca.uhn.hl7v2.util*,
							ca.uhn.hl7v2.validation*,
							ca.uhn.hl7v2.validation.app*,
							ca.uhn.hl7v2.validation.impl*,
							ca.uhn.hl7v2.view*,
							ca.uhn.hl7v3.rim*,
							ca.uhn.hl7v3.rim.datatype*,
							ca.uhn.hl7v3.sourcegen*,
							ca.uhn.log*,                  
                        </Export-Package>
						<Import-Package>
							ca.uhn.hl7v2.model.v21.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v21.group;resolution:=optional,
							ca.uhn.hl7v2.model.v21.message;resolution:=optional,
							ca.uhn.hl7v2.model.v21.segment;resolution:=optional,
							ca.uhn.hl7v2.model.v22.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v22.group;resolution:=optional,
							ca.uhn.hl7v2.model.v22.message;resolution:=optional,
							ca.uhn.hl7v2.model.v22.segment;resolution:=optional,
							ca.uhn.hl7v2.model.v23.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v23.group;resolution:=optional,
							ca.uhn.hl7v2.model.v23.message;resolution:=optional,
							ca.uhn.hl7v2.model.v23.segment;resolution:=optional,
							ca.uhn.hl7v2.model.v231.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v231.group;resolution:=optional,
							ca.uhn.hl7v2.model.v231.message;resolution:=optional,
							ca.uhn.hl7v2.model.v231.segment;resolution:=optional,
							ca.uhn.hl7v2.model.v24.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v24.group;resolution:=optional,
							ca.uhn.hl7v2.model.v24.message;resolution:=optional,
							ca.uhn.hl7v2.model.v24.segment;resolution:=optional,
							ca.uhn.hl7v2.model.v25.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v25.group;resolution:=optional,
							ca.uhn.hl7v2.model.v25.message;resolution:=optional,
							ca.uhn.hl7v2.model.v25.segment;resolution:=optional,
							ca.uhn.hl7v2.model.v251.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v251.group;resolution:=optional,
							ca.uhn.hl7v2.model.v251.message;resolution:=optional,
							ca.uhn.hl7v2.model.v251.segment;resolution:=optional,
							ca.uhn.hl7v2.model.v26.datatype;resolution:=optional,
							ca.uhn.hl7v2.model.v26.group;resolution:=optional,
							ca.uhn.hl7v2.model.v26.message;resolution:=optional,
							ca.uhn.hl7v2.model.v26.segment;resolution:=optional,
							*;resolution:=optional
                        </Import-Package>
						<!-- This is required to handle dynamic class loading using Class.forName 
							methods in various places in HAPI -->
						<DynamicImport-Package>
							ca.uhn.hl7v2.model.v21.datatype,
							ca.uhn.hl7v2.model.v21.group,
							ca.uhn.hl7v2.model.v21.message,
							ca.uhn.hl7v2.model.v21.segment,
							ca.uhn.hl7v2.model.v22.datatype,
							ca.uhn.hl7v2.model.v22.group,
							ca.uhn.hl7v2.model.v22.message,
							ca.uhn.hl7v2.model.v22.segment,
							ca.uhn.hl7v2.model.v23.datatype,
							ca.uhn.hl7v2.model.v23.group,
							ca.uhn.hl7v2.model.v23.message,
							ca.uhn.hl7v2.model.v23.segment,
							ca.uhn.hl7v2.model.v231.datatype,
							ca.uhn.hl7v2.model.v231.group,
							ca.uhn.hl7v2.model.v231.message,
							ca.uhn.hl7v2.model.v231.segment,
							ca.uhn.hl7v2.model.v24.datatype,
							ca.uhn.hl7v2.model.v24.group,
							ca.uhn.hl7v2.model.v24.message,
							ca.uhn.hl7v2.model.v24.segment,
							ca.uhn.hl7v2.model.v25.datatype,
							ca.uhn.hl7v2.model.v25.group,
							ca.uhn.hl7v2.model.v25.message,
							ca.uhn.hl7v2.model.v25.segment,
							ca.uhn.hl7v2.model.v251.datatype,
							ca.uhn.hl7v2.model.v251.group,
							ca.uhn.hl7v2.model.v251.message,
							ca.uhn.hl7v2.model.v251.segment,
							ca.uhn.hl7v2.model.v26.datatype,
							ca.uhn.hl7v2.model.v26.group,
							ca.uhn.hl7v2.model.v26.message,
							ca.uhn.hl7v2.model.v26.segment
                        </DynamicImport-Package>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>sources</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>../src/assembly/osgi-source.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
					<execution>
						<id>javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>../src/assembly/osgi-javadoc.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
	</build>

</project>
