<?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>com.atlassian.stash</groupId>
        <artifactId>stash-plugins-parent</artifactId>
        <version>3.9.0-rc4</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>stash-plugin-information-provider</artifactId>

    <name>Atlassian Stash Plugin Information Provider Plugin</name>
    <description>Allows Stash to find information on the state of other Plugins</description>
    <packaging>atlassian-plugin</packaging>

    <properties>
        <plugin.key>${project.groupId}.${project.artifactId}</plugin.key>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
            <version>1.2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>


        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-mock</artifactId>
            <version>1.2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-test-util</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-stash-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <products>
                        <product>
                            <id>stash</id>
                            <instanceId>stash</instanceId>
                            <version>${project.version}</version>
                            <dataVersion>${project.version}</dataVersion>
                        </product>
                    </products>
                    <instructions>
                        <Atlassian-Plugin-Key>${plugin.key}</Atlassian-Plugin-Key>
                        <Import-Package>
                            com.atlassian.analytics.api.services*,
                            org.osgi.framework,
                            org.osgi.util.tracker,
                            com.atlassian.stash.plugin,
                            org.springframework.beans.factory,
                            org.springframework.osgi.context,
                            org.springframework.stereotype,
                            org.slf4j
                        </Import-Package>
                        <Private-Package>com.atlassian.stash.plugins.plugininformationprovider</Private-Package>
                        <!--<Bundle-Activator>com.atlassian.stash.plugins.plugininformationprovider.DefaultPluginInformationProvider</Bundle-Activator>-->
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- To generate Javadocs for public components -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                            <excludePackageNames>com.atlassian.stash.internal.notification</excludePackageNames>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
