<?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-osgi-testrunner-parent</artifactId>
        <version>2.0.9</version>
    </parent>

    <artifactId>atlassian-plugins-osgi-testrunner-bundle</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>TestRunner OSGi Plugin</name>
    <description>The P2 plugin that provides the in-product components of the "Wired Tests" framework.</description>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <!-- transitive, provided by platform-public-api -->
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
        </dependency>
        <dependency>
            <!-- provided by AMPS when starting the host app -->
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.junit</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- transitive, provided dependency of atlassian-plugins-osgi-testrunner but also needed for tests -->
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <!-- since Platform 7 provided by platform-internal-api -->
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- since Platform 7 provided by platform-internal-api -->
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>9.6</version>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-internal-api -->
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-public-api -->
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <configuration>
                    <extractDependencies>false</extractDependencies>
                    <instructions>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Vendor>Atlassian</Bundle-Vendor>
                        <Bundle-Activator>com.atlassian.plugins.osgi.test.BundleTestClassesActivator</Bundle-Activator>
                        <Export-Package>
                            com.atlassian.plugins.osgi.test*;version="${osgi.manifest.version}",
                            com.atlassian.plugins.osgi.test.rest*;version="${osgi.manifest.version}"
                        </Export-Package>
                        <Import-Package>
                            junit.extensions*;version=${junit.osgi.version},
                            junit.framework*;version=${junit.osgi.version},
                            junit.runner*;version=${junit.osgi.version},
                            junit.textui*;version=${junit.osgi.version},
                            org.junit*;version=${junit.osgi.version},
                            *;resolution:=optional
                        </Import-Package>
                        <!-- jar entries -->
                        <Implementation-Title>Atlassian Plugins OSGi Test Framework</Implementation-Title>
                        <Implementation-Version>${project.version}</Implementation-Version>
                        <Implementation-Vendor>Atlassian</Implementation-Vendor>
                        <Implementation-Vendor-Id>com.atlassian</Implementation-Vendor-Id>
                    </instructions>
                    <pluginArtifacts>
                        <pluginArtifact>
                            <!-- hamcrest is a proper bundle -->
                            <groupId>org.hamcrest</groupId>
                            <artifactId>hamcrest</artifactId>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>org.apache.servicemix.bundles</groupId>
                            <artifactId>org.apache.servicemix.bundles.junit</artifactId>
                        </pluginArtifact>
                    </pluginArtifacts>
                </configuration>
            </plugin>
            <plugin>
                <!-- surefire-plugin needs to be defined here so AMPS properly applies the configuration defined in the parent POM -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
