<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>com.atlassian.confluence</groupId>
        <artifactId>confluence-studio-plugins</artifactId>
        <version>6.0.0-OD-2016.09.0-1018</version>
    </parent>

    <artifactId>confluence-studio-common-plugin</artifactId>
    <name>Confluence Studio Common Plugin</name>
    <packaging>bundle</packaging>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>biz.aQute.bnd</groupId>
                        <artifactId>biz.aQute.bndlib</artifactId>
                        <version>${confluence.project.bndlib.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <instructions>
                        <Import-Package>
                            org.springframework.beans.factory.config,
                            *;resolution:=optional
                        </Import-Package>
                        <Export-Package>
                            <!--
                                Super shitty hackery here. We have to explicitly list everything we export. This is
                                because we export stuff under com.atlassian.studio.confluence. But, the main webapp
                                exports stuff under the package namespace too. If we aren't explicit, then we actually
                                end up re-exporting the same things the host does, but with the wrong version. Yuck.
                            -->
                            com.atlassian.studio.core.api,
                            com.atlassian.studio.core.util,
                            com.atlassian.studio.confluence.common.event,
                            com.atlassian.studio.confluence.integration.crowd,
                            com.atlassian.studio.confluence.common.listener,
                            com.atlassian.studio.confluence.common.lifecycle,
                            com.atlassian.studio.confluence.common.services,
                            com.atlassian.studio.confluence.common.auth,
                            com.atlassian.studio.core.beans,
                            com.atlassian.studio.core.profiling,
                            com.atlassian.studio.core.project,
                            com.atlassian.studio.core.globaladmin.crucible,
                            com.atlassian.studio.core.theme,
                            com.atlassian.studio.core.theme.upgrade,
                            com.atlassian.studio.core.history,
                            com.atlassian.studio.core.setup,
                            com.atlassian.studio.core.globaladmin,
                            com.atlassian.studio.core.user.status,
                            com.atlassian.studio.core.servlet.filter,
                            com.atlassian.studio.core.servlet,
                            com.atlassian.studio.core,
                            com.atlassian.studio.globaladmin,
                            com.atlassian.studio.navbar
                        </Export-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.studio</groupId>
            <artifactId>studio-theme-core</artifactId>
            <version>${studio.core.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
    		<groupId>com.atlassian.confluence</groupId>
    		<artifactId>confluence</artifactId>
    		<scope>provided</scope>
    	</dependency>
        <dependency>
            <groupId>com.atlassian.studio</groupId>
            <artifactId>studio-common-host-components</artifactId>
            <version>${studio.core.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.ondemand</groupId>
            <artifactId>ondemand-internal-api-plugin</artifactId>
            <version>${studio.core.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.ondemand</groupId>
            <artifactId>ondemand-spi-plugin</artifactId>
            <version>${studio.core.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-studio-host-components</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <!-- jcl-over-slf4j instead -->
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <!-- jcl-over-slf4j instead -->
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.spring.test.compat</groupId>
            <artifactId>spring-test-compat</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit-dep</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <atlassian.plugin.key>com.atlassian.studio.confluence.common</atlassian.plugin.key>
        <studio.pdk.apps>confluence</studio.pdk.apps>
    </properties>
</project>
