<?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">
    <parent>
        <groupId>com.atlassian.servicedesk</groupId>
        <artifactId>servicedesk-tests-parent</artifactId>
        <version>2.0-OD-05-D20140827T014953</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>servicedesk-conditions-plugin</artifactId>
    <name>Service Desk Example SLA Conditions Plugin</name>
    <packaging>atlassian-plugin</packaging>


    <dependencies>
        <!-- Service desk -->
        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.context</artifactId>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <!-- don't copy project templates (as they have to be zipped up -->
                <excludes>
                    <exclude>project-templates/**</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <shortRevisionLength>8</shortRevisionLength>
                    <revisionOnScmFailure>unknown</revisionOnScmFailure>
                </configuration>
            </plugin>

            <!--
            This config is the guy who builds most of the JIRA plugin magic from our day to day point of view

            Be deliberate about what you change here and why you do it

            -->
            <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>
                    <extractDependencies>false</extractDependencies>
                    <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                    <systemPropertyVariables>
                        <jira.qunit.testoutput.location>${project.build.directory}/surefire-reports</jira.qunit.testoutput.location>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                    </systemPropertyVariables>
                    <jvmArgs>${jvmargs} ${jrebel.agent}</jvmArgs>
                    <instructions>
                        <Bundle-SymbolicName>com.atlassian.jira.plugins.servicedesk.conditions</Bundle-SymbolicName>
                        <Private-Package>
                        </Private-Package>

                        <!--optionals first, in alphabetic order, followed by mandatories, in alphabetic order-->
                        <Import-Package>
                            com.atlassian.servicedesk.api.sla.condition;resolution:="optional",
                            com.atlassian.servicedesk.spi.sla.condition;resolution:="optional",
                            com.google.common.collect,
                            javax.annotation,
                            com.atlassian.jira.*,
                            org.apache.commons.lang;version="[2.5,3)",
                            org.joda.time.*;version="[2.0,3)",
                            org.springframework.beans.factory;version="2.5",
                            org.springframework.beans.factory.annotation;version="2.5",
                            org.springframework.core.io;version="2.5",
                            org.springframework.stereotype;version="2.5",
                            org.springframework.context;version="2.5",
                        </Import-Package>
                        <Spring-Context>*;timeout:=60</Spring-Context>
                    </instructions>


                    <!--These are put there via AMPs - since AMPS doesnt do OBRs then we need to repeat plugins here-->
                    <pluginArtifacts>
                    </pluginArtifacts>

                    <pluginDependencies>
                    </pluginDependencies>

                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <configuration>
                        <excludes>
                            <exclude>**/*$*</exclude>
                            <exclude>it/**</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-amps-dispatcher-plugin</artifactId>
                    <version>${amps.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <properties>
        <xvfb.enable>false</xvfb.enable>
        <fugue.version>1.1</fugue.version>
        <jrebel.agent><!-- see jrebel profile to enable --></jrebel.agent>
        <jvmargs><!-- placeholeder for -jvmargs param from atlas-debug  --></jvmargs>
    </properties>

</project>
