<?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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.analytics</groupId>
        <artifactId>analytics-project</artifactId>
        <version>1000.1.3</version>
    </parent>
    <artifactId>analytics-client</artifactId>
    <name>Cloud Analytics Client Plugin</name>
    <description>Plugin to send analytics events</description>
    <packaging>atlassian-plugin</packaging>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-client-lib</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-events</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk</artifactId>
            <scope>provided</scope>
            <version>1.8.9</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-api</artifactId>
            <version>${stash.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-mirroring-mirror</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.fisheye</groupId>
            <artifactId>atlassian-fisheye-api</artifactId>
            <version>${fecru.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-server-api</artifactId>
            <version>${crowd.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-api</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource-plugin</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.workcontext</groupId>
            <artifactId>atlassian-work-context-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- REST API -->
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <version>1.0.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.config</groupId>
            <artifactId>atlassian-config</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.core</groupId>
            <artifactId>atlassian-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.extras</groupId>
            <artifactId>atlassian-extras-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</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>
        <!-- BundleContext hack to allow Stash to shutdown cleanly -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <version>3.0.9</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>${json-simple.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>js/node/**</exclude>
                    <exclude>js/etc/**</exclude>
                </excludes>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!-- Should be net.alchim31.maven -->
                    <groupId>net.sf.alchim</groupId>
                    <artifactId>yuicompressor-maven-plugin</artifactId>
                    <!-- Should be 1.1 -->
                    <version>0.7.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Import-Package>
                            com.atlassian.analytics.api.annotations;resolution:=mandatory,
                            org.apache.http.conn.routing,
                            *;resolution:=optional
                        </Import-Package>
                        <Export-Package>
                            com.atlassian.analytics.client;version="${project.version}",
                            com.atlassian.analytics.client.api;version="${project.version}",
                            com.atlassian.analytics.client.api.*;version="${project.version}",
                        </Export-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                    <products>
                        <product>
                            <id>bitbucket</id>
                            <version>${bitbucket.version}</version>
                            <productDataVersion>${bitbucket.data.version}</productDataVersion>
                            <httpPort>${http.bitbucket.port}</httpPort>
                            <jvmArgs>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</jvmArgs>
                            <systemPropertyVariables>
                                <xvfb.enable>${xvfb.enable}</xvfb.enable>
                                <xvfb.display>${xvfb.display}</xvfb.display>
                                <context.path>${context.bitbucket.path}</context.path>
                                <johnson.spring.lifecycle.synchronousStartup>true</johnson.spring.lifecycle.synchronousStartup>
                            </systemPropertyVariables>
                        </product>
                        <product>
                            <id>jira</id>
                            <version>${jira.version}</version>
                            <dataVersion>${jira.data.version}</dataVersion>
                            <productDataVersion>${jira.data.version}</productDataVersion>
                            <httpPort>${http.jira.port}</httpPort>
                            <jvmArgs>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Dcom.atlassian.jira.startup.LauncherContextListener.SYNCHRONOUS=true
                            </jvmArgs>
                            <systemPropertyVariables>
                                <xvfb.enable>${xvfb.enable}</xvfb.enable>
                                <xvfb.display>${xvfb.display}</xvfb.display>
                                <context.path>${context.jira.path}</context.path>
                            </systemPropertyVariables>
                        </product>
                        <product>
                            <id>confluence</id>
                            <version>${confluence.version}</version>
                            <productDataVersion>${confluence.data.version}</productDataVersion>
                            <httpPort>${http.confluence.port}</httpPort>
                            <jvmArgs>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</jvmArgs>
                            <systemPropertyVariables>
                                <xvfb.enable>${xvfb.enable}</xvfb.enable>
                                <xvfb.display>${xvfb.display}</xvfb.display>
                                <context.path>${context.confluence.path}</context.path>
                            </systemPropertyVariables>
                        </product>
                        <product>
                            <id>crowd</id>
                            <version>${crowd.version}</version>
                            <productDataVersion>${crowd.version}</productDataVersion>
                            <httpPort>${http.crowd.port}</httpPort>
                        </product>
                    </products>
                    <testGroups>
                        <testGroup>
                            <id>bitbucket-integration</id>
                            <productIds>
                                <productId>bitbucket</productId>
                            </productIds>
                            <includes>
                                <include>it/**/bitbucket/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>jira-integration</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>it/**/jira/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confluence-integration</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/**/confluence/*Test.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                    <libArtifacts>
                        <libArtifact>
                            <groupId>com.atlassian.analytics</groupId>
                            <artifactId>analytics-api</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                    </libArtifacts>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <banTransitiveDependencies>
                                    <excludes>
                                        <exclude>*:*:*:*:provided</exclude>
                                        <exclude>*:*:*:*:test</exclude>
                                        <exclude>com.atlassian.analytics:analytics-client-lib</exclude>
                                        <exclude>com.atlassian.analytics:analytics-events</exclude>
                                    </excludes>
                                </banTransitiveDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>it/**/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.0</version>

                <configuration>
                    <workingDirectory>src/main/resources/js</workingDirectory>
                </configuration>

                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>v5.8.0</nodeVersion>
                            <npmVersion>3.8.1</npmVersion>
                        </configuration>
                    </execution>

                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <!-- Optional configuration which provides for running any npm command -->
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <ao.version>0.19.7</ao.version>
        <spring.version>2.5.6</spring.version>
        <google.collections.version>1.0</google.collections.version>
        <confluence.version>5.9.1-OD-2015.43.1-0003</confluence.version>
        <confluence.data.version>5.3.4</confluence.data.version>
        <http.confluence.port>1990</http.confluence.port>
        <context.confluence.path>confluence</context.confluence.path>
        <amps.username>admin</amps.username>
        <amps.password>admin</amps.password>
        <jira.data.version>${jira.version}</jira.data.version>
        <context.jira.path>jira</context.jira.path>
        <http.jira.port>2990</http.jira.port>
        <stash.version>3.0.0</stash.version>
        <fecru.version>3.6.0-r1c3931d</fecru.version>
        <bamboo.version>5.8-56369d7</bamboo.version>
        <bitbucket.version>4.4.0</bitbucket.version>
        <bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
        <http.bitbucket.port>7990</http.bitbucket.port>
        <context.bitbucket.path>bitbucket</context.bitbucket.path>
        <xvfb.enable>false</xvfb.enable>
        <xvfb.display>:0</xvfb.display>
        <crowd.version>2.9.2</crowd.version>
        <http.crowd.port>8095</http.crowd.port>
        <json-simple.version>1.1</json-simple.version>
    </properties>
</project>
