<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>

    <parent>
        <groupId>org.fuin</groupId>
        <artifactId>pom</artifactId>
        <version>1.2.0</version>
    </parent>

    <artifactId>pom-osgi</artifactId>
    <packaging>pom</packaging>
    <version>1.2.0</version>
    <name>Base POM for OSGI fuin.org projects</name>
    <url>https://github.com/fuinorg/pom-osgi/</url>
    <description>Provides standard settings for OSGI http://www.fuin.org/ projects.</description>

    <scm>
        <url>https://github.com/fuinorg/pom-osgi/</url>
        <connection>scm:git:git://github.com/fuinorg/pom-osgi.git</connection>
        <developerConnection>scm:git:git@github.com:fuinorg/pom-osgi.git</developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/fuinorg/pom-osgi/issues</url>
    </issueManagement>

    <properties>
        <tycho-version>0.23.1</tycho-version>
        <manifest-location>META-INF</manifest-location>
    </properties>

    <build>

        <plugins>

            <!-- Create MANIFEST.MF file from the Maven dependencies -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.5.4</version>
                <configuration>
                    <manifestLocation>${manifest-location}</manifestLocation>
                    <instructions>
                        <_removeheaders>
                            Built-By,Tool,Build-Jdk,Created-By,
                            Bnd-LastModified, Private-Package
                        </_removeheaders>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>create-manifest</id>
                        <phase>package</phase>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Use existing MANIFEST.MF instead of creating a new one -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <!--
                  Explicitly switched JAR plugin back to 2.3.2 because of missing "merge" functionality
                  in plexus archiver that causes the following error:
                  "org.codehaus.plexus.archiver.jar.Manifest.merge ... Maven Configuration Problem".
                  As of 2015/09/12 the problem still exists with JAR version 2.6.  
                  -->
                <version>2.3.2</version>
                <configuration>
                    <archive>
                        <manifestFile>${manifest-location}/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>

            </plugin>

        </plugins>
        
    </build>

</project>