<?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>
        <artifactId>jira-inform-parent</artifactId>
        <groupId>com.atlassian.jira.plugins.inform</groupId>
        <version>1.4.4</version>
    </parent>

    <artifactId>batchers</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Jira inform - batchers</name>
    <description>Implementations of batchers used by batching-plugin framework.</description>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira.plugins.inform</groupId>
            <artifactId>event-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins.inform</groupId>
            <artifactId>batching-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins.inform</groupId>
            <artifactId>event-plugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.javascript</groupId>
                    <artifactId>closure-compiler</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-rest-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</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>com.atlassian.pocketknife</groupId>
            <artifactId>atlassian-pocketknife-querydsl</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.pocketknife</groupId>
            <artifactId>atlassian-pocketknife-querydsl-test-util</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.util</groupId>
            <artifactId>db-schema-translator-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <configuration>
                    <!--
                    These dependencies will be scanned for @Components etc..
                    and hence can be considered part of our code base as well as code
                    in plugin/src/main (which is implicitly scanned).
                    -->
                    <scannedDependencies>
                        <dependency>
                            <groupId>com.atlassian.pocketknife</groupId>
                            <artifactId>atlassian-pocketknife-querydsl</artifactId>
                        </dependency>
                    </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>amps-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <product>jira</product>
                    <productVersion>${jira.version}</productVersion>
                    <containerId>${tomcat.version}</containerId>

                    <!-- make AMPS faster -->
                    <enableQuickReload>true</enableQuickReload>
                    <enableDevToolbox>false</enableDevToolbox>
                    <enablePde>false</enablePde>
                    <skipRestDocGeneration>true</skipRestDocGeneration>
                    <allowGoogleTracking>false</allowGoogleTracking>
                    <skipManifestValidation>true</skipManifestValidation>
                    <extractDependencies>false</extractDependencies>
                    <jvmArgs>-Dcom.atlassian.jira.startup.LauncherContextListener.SYNCHRONOUS=true -Xmx2g -Xms1024m
                    </jvmArgs>

                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-func-test-plugin</artifactId>
                            <version>${jira.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira.tests</groupId>
                            <artifactId>jira-testkit-plugin</artifactId>
                            <version>${testkit.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.labs.plugins</groupId>
                            <artifactId>quickreload</artifactId>
                            <version>${quick.reload.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                        <Import-Package>
                            <!-- exclude pocketknife bits we don't need -->
                            !net.sf.cglib.proxy,
                            !org.jvnet.hudson.annotation_indexer,
                            !org.joda.convert,
                            <!-- import (alltheotherthings) -->
                            sun.misc;resolution:="optional",
                            com.atlassian.plugin.osgi.bridge.external,
                            org.springframework.cglib.core,
                            org.springframework.cglib.proxy,
                            org.springframework.cglib.reflect,
                            org.springframework.beans,
                            org.springframework.beans.factory,
                            com.atlassian.jira.web.action.util,
                            com.atlassian.jira.plugins.inform.api.batching.*,
                            *
                        </Import-Package>
                        <Export-Package>
                             com.atlassian.jira.plugins.inform.batching.analytics
                        </Export-Package>
                    </instructions>
                    <skipManifestValidation>true</skipManifestValidation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>modz-detector-maven-plugin</artifactId>
                <version>0.14</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>generate-registry</goal>
                        </goals>
                        <configuration>
                            <registry>${project.build.directory}/classes/template-hash-registry.properties</registry>
                            <filesystem>
                                <directory>${project.build.directory}/classes/</directory>
                            </filesystem>
                            <classpath>
                                <directory>${project.build.directory}/classes/</directory>
                            </classpath>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <atlassian.plugin.key>com.atlassian.jira.plugins.inform.batchers</atlassian.plugin.key>
    </properties>
</project>
