<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>
    <groupId>fr.opensagres.xdocreport</groupId>
    <artifactId>xdocreport-parent</artifactId>
    <version>1.0.6</version>
    <relativePath>..</relativePath>
  </parent>
  <artifactId>uberjar</artifactId>
  <packaging>pom</packaging>
  <build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<!-- <promoteTransitiveDependencies>true</promoteTransitiveDependencies> -->
							<artifactSet>
								<includes>
									<include>fr.opensagres.xdocreport:*</include>
								</includes>
							</artifactSet>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
							</transformers>
							<createSourcesJar>true</createSourcesJar>
						</configuration>
					</execution>
				</executions>
			</plugin>
			  <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>bundle</goal>
						</goals>
					</execution>
				</executions>
                <configuration>
                <instructions>
                	<!-- Need to fine tune OSGi Header -->
                    <Embed-Dependency>*;scope=compile|runtime;groupId=fr.opensagres.xdocreport</Embed-Dependency>
                    <Embed-Transitive>true</Embed-Transitive>
                    <_snapshot>${osgi-version-qualifier}</_snapshot>
					<_nouses>true</_nouses>
					<!-- xdocreport is suppose to work without any depdencies
					though some are required for some functionalities -->
					<Import-Package>*;resolution:=optional</Import-Package>
					<Export-Package>!*.internal.*,fr.opensagres.xdocreport.*,org.apache.poi.xwpf.converter.*,org.apache.poi.xwpf.converter.core.*,org.apache.poi.xwpf.converter.pdf.*,org.apache.poi.xwpf.converter.xhtml.*</Export-Package>
					<_removeheaders>Bundle-ClassPath,Embed-Dependency,Embed-Transitive,Embedded-Artifacts,Include-Resource</_removeheaders>
                   </instructions> 
                </configuration>
            </plugin>
		</plugins>
	</build>
  <modules>
  	<module>xdocreport</module>
  	<module>xdocreport-gae</module>
  </modules>
</project>