<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>atlassian-plugins-parent</artifactId>
        <version>8.0.4</version>
    </parent>

    <artifactId>atlassian-plugins-osgi-bridge</artifactId>

    <name>Atlassian Plugins - OSGi bridge framework bundle</name>
    <description>
        Bridge OSGi bundle that better ties OSGi into the Atlassian Plugins framework
    </description>

    <properties>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${jacoco.report.file}</sonar.coverage.jacoco.xmlReportPaths>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-events</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.gemini.blueprint</groupId>
            <artifactId>gemini-blueprint-extender</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- IntelliJ 13.1.6 seems to scope this as test, unlike maven which already has it provided. -->
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.test</groupId>
            <artifactId>atlassian-plugins-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                        <configuration>
                            <instructions>
                                <Import-Package>
                                    org.springframework.*;version=${springOsgiImportVersion},
                                    org.eclipse.gemini.blueprint.*;version=${geminiOsgiImportVersion},
                                    *;version=!
                                </Import-Package>
                                <Bundle-SymbolicName>com.atlassian.plugin.osgi.bridge</Bundle-SymbolicName>
                                <Bundle-Activator>com.atlassian.plugin.osgi.bridge.BridgeActivator</Bundle-Activator>
                                <Private-Package>com.atlassian.plugin.osgi.bridge</Private-Package>
                                <Export-Package>com.atlassian.plugin.osgi.bridge.external</Export-Package>
                            </instructions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
