<?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.pocketknife</groupId>
        <artifactId>pocketknife-features-parent-pom</artifactId>
        <version>0.5.4</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <name>Pocketknife Feature Flags Plugin</name>
    <description>This plugin provides a stronger definition of feature flags and whether they should be considered on or off</description>
    <artifactId>pocketknife-features-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.pocketknife</groupId>
            <artifactId>pocketknife-features-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
        </dependency>

        <!-- For accessing plugins safely -->
        <dependency>
            <groupId>com.atlassian.ozymandias</groupId>
            <artifactId>atlassian-plugin-point-safety</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.context</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-runtime</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
            <version>2.7.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- Dependency for tests -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>atlassian-spring-scanner</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <scannedDependencies>
                    </scannedDependencies>
                    <!-- Turn this on to true to show the inner workings of the build time scanner -->
                    <verbose>false</verbose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
                    <enableFastdev>false</enableFastdev>
                    <enableDevToolbox>false</enableDevToolbox>
                    <extractDependencies>false</extractDependencies>


                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.labs.plugins</groupId>
                            <artifactId>quickreload</artifactId>
                            <version>${quick.reload.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>

                    <instructions>
                        <Atlassian-Plugin-Key>com.atlassian.pocketknife.featureflags-plugin</Atlassian-Plugin-Key>
                        <Bundle-SymbolicName>com.atlassian.pocketknife.featureflags-plugin</Bundle-SymbolicName>
                        <Export-Package>
                            com.atlassian.pocketknife.api.featureflags;version="${project.version}",
                            com.atlassian.pocketknife.spi.featureflags;version="${project.version}"
                        </Export-Package>
                        com/atlassian/pocketknife/spi/featuresflags/FeatureFlagProvidercom/atlassian/pocketknife/spi/featuresflags/FeatureFlagProvider

                        <Import-Package>
                            <!-- JIRA 7 and platform 4 use Gemini while the old uses SpringDM -->
                            org.springframework.*;resolution:="optional",
                            org.eclipse.gemini.blueprint.*;resolution:="optional",

                            com.atlassian.pocketknife.api.featureflags,
                            com.atlassian.pocketknife.spi.featureflags,

                            com.atlassian.plugin.osgi.bridge.external,

                            com.atlassian.jira.*,
                            com.atlassian.fugue,

                            *;resolution:="optional",

                        </Import-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
