<?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">

  <parent>
    <groupId>de.dfki.cos.basys.pom</groupId>
    <artifactId>shared-plugin-settings</artifactId>
    <version>0.2.6</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>compiled-bundle-settings</artifactId>

  <name>BaSys 4.0 Root POM - Bundle Instructions</name>

  <packaging>pom</packaging>

  
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <!--
       | example additional resource entries, useful when building Eclipse RCP applications
      -->
      <resource>
        <directory>.</directory>
        <includes>
          <include>plugin.xml</include>
          <include>plugin.properties</include>
          <include>icons/**</include>
          <include>model/**</include>
        </includes>
      </resource>
    </resources>
    <plugins>
	  <plugin>
        <!--
         | the following instructions build a simple set of public/private classes into an OSGi bundle
        -->
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>	
		<extensions>true</extensions>
		<executions>
			<!-- Configure extra execution of 'manifest' in process-classes phase to make sure SCR metadata is generated before unit test runs -->
			<execution>
			  <id>scr-metadata</id>
			  <goals>
				<goal>manifest</goal>
			  </goals>
			  <configuration>
				<supportIncrementalBuild>true</supportIncrementalBuild>
			  </configuration>
			</execution>
		</executions>		
        <configuration>
          <manifestLocation>META-INF</manifestLocation>
		  <archive>
			<addMavenDescriptor>false</addMavenDescriptor>
		  </archive> 
          <instructions>
            <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <!--
             | assume public classes are in the top package, and private classes are under ".internal"
            -->
            <!--
			<Export-Package>!${bundle.namespace}.internal.*,!*.impl,${bundle.namespace}.*;version="${project.version}"</Export-Package>
            <Private-Package>${bundle.namespace}.internal.*,*.impl</Private-Package>
			-->
            <!--
             | each module can override these defaults in their osgi.bnd file
            -->
			<!--
            <Import-Package>!*.impl,*</Import-Package>
			-->
			<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${project.version}"</Export-Package>
            <_include>-osgi.bnd</_include>
			<!-- Enable processing of OSGI DS component annotations -->
			<_dsannotations>*</_dsannotations>
			<!-- Enable processing of OSGI metatype annotations -->
			<_metatypeannotations>*</_metatypeannotations>
			<_removeheaders>Bnd-LastModified, Built-By, Build-Jdk, Require-Capability</_removeheaders>
			<!-- Support parsing of maven-scr-plugin annotations through the felix.scr.bnd plugin -->
			<!--
			<_plugin>org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;destdir=${project.build.outputDirectory};</_plugin>
			-->
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
