<?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.jira.plugins</groupId>
		<artifactId>jira-greenhopper-parent-pom</artifactId>
		<version>7.0.10</version>
	</parent>

	<artifactId>jira-greenhopper-plugin</artifactId>
	<packaging>atlassian-plugin</packaging>

	<name>Atlassian GreenHopper</name>
    <description>This is the GreenHopper plugin for Atlassian JIRA.</description>

	<pluginRepositories>
		<pluginRepository>
			<id>details-matter-maven-repository</id>
			<name>Details Matter Maven Repository</name>
			<url>http://details-matter-maven-repository.googlecode.com/svn/repository/</url>
		</pluginRepository>
	</pluginRepositories>

    <profiles>
        <profile>
            <id>wired-integration-tests</id>
            <activation>
                <property>
                    <name>wiredIntegrationTests</name>
                </property>
            </activation>

            <dependencies>
                <!-- Without this, AtlassianPluginsTestRunner throws exceptions when running tests on the command line -->
                <dependency>
                    <groupId>commons-lang</groupId>
                    <artifactId>commons-lang</artifactId>
                    <version>2.6</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <configuration>
                            <skipTests>false</skipTests>
                            <testGroups>
                                <testGroup>
                                    <id>jira-integration</id>
                                    <productIds>
                                        <productId>jira</productId>
                                    </productIds>
                                    <includes>
                                        <include>${wired.integration.test.pattern}</include>
                                    </includes>
                                </testGroup>
                            </testGroups>

                            <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira.software.app.version}</version>
                                </application>
                            </applications>

                            <testBundleExcludes>
                                <testBundleExclude>
                                    <groupId>com.atlassian.jira.plugins</groupId>
                                    <artifactId>jira-greenhopper-api</artifactId>
                                </testBundleExclude>

                                <testBundleExclude>
                                    <groupId>atlassian</groupId>
                                </testBundleExclude>
                                <testBundleExclude>
                                    <groupId>junit</groupId>
                                    <artifactId>junit-dep</artifactId>
                                </testBundleExclude>
                            </testBundleExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- When we're developing, we want access to JIRA's Func Test Plugin -->
            <id>DevMode</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <compressResources>false</compressResources>
                            <systemPropertyVariables>
                                <pac.baseurl>${pac.baseurl}</pac.baseurl>
                                <upm.pac.disable>false</upm.pac.disable>
                            </systemPropertyVariables>

                            <libArtifacts>
                                <!-- include this so that we can run gh-debug with postgres-->
                                <libArtifact>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>${database.driver.version.postgres}</version>
                                </libArtifact>
                                <!-- include this so that we can run gh-debug with oracle -->
                                <libArtifact>
                                    <groupId>com.oracle</groupId>
                                    <artifactId>ojdbc6</artifactId>
                                    <version>${database.driver.version.oracle}</version>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>${database.driver.version.mysql}</version>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>net.sourceforge.jtds</groupId>
                                    <artifactId>jtds</artifactId>
                                    <version>${database.driver.version.mssql}</version>
                                </libArtifact>
                            </libArtifacts>
                            
                            <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira.software.app.version}</version>
                                </application>
                            </applications>
                            
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.plugins</groupId>
                                    <artifactId>greenhopper-client-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.plugins</groupId>
                                    <artifactId>greenhopper-dev-extensions</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.qunit</groupId>
                                    <artifactId>atlassian-qunit-plugin</artifactId>
                                    <version>${atlassian.qunit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-connect-plugin</artifactId>
                                    <version>1.1.48</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jwt</groupId>
                                    <artifactId>jwt-plugin</artifactId>
                                    <version>1.2.2</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.bundles</groupId>
                                    <artifactId>json-schema-validator-atlassian-bundle</artifactId>
                                    <version>1.0.4</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.func.test.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-projects-plugin</artifactId>
                                    <version>${jira.projects.plugin.integration.test.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <testBundleExcludes>
                                <testBundleExclude>
                                    <groupId>atlassian</groupId>
                                </testBundleExclude>
                                <testBundleExclude>
                                    <groupId>junit</groupId>
                                    <artifactId>junit-dep</artifactId>
                                </testBundleExclude>
                            </testBundleExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- in QAData, we use a different path to the data. gh-debug ensures that there is data there -->
            <id>QAData</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <productDataVersion>${jira.data.version}</productDataVersion>
                            <productDataPath>${gh.data.qa}</productDataPath>
                            <testBundleExcludes>
                                <testBundleExclude>
                                    <groupId>atlassian</groupId>
                                </testBundleExclude>
                                <testBundleExclude>
                                    <groupId>junit</groupId>
                                    <artifactId>junit-dep</artifactId>
                                </testBundleExclude>
                            </testBundleExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>default</id>
            <activation>
                <property>
                    <name>default</name>
                </property>
            </activation>
            <build>
                <plugins />
            </build>
        </profile>

        <profile>
            <id>create-public-rest-api-docs</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>jira.generateDocs</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.7</version>
                        <executions>
                            <execution>
                                <id>schemaGen-plugin-description</id>
                                <phase>process-classes</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <javadoc access="public" sourcepath="${project.basedir}/../greenhopper-rest/src/main/java" maxmemory="1024m" failonerror="true" useexternalfile="yes">
                                            <package name="com.atlassian.greenhopper.api.rest" />
                                            <!-- Uncomment this line to enable remote debugging. <arg line="-J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" />-->
                                            <classpath>
                                                <path refid="maven.compile.classpath" />
                                                <pathelement location="${project.build.outputDirectory}" />
                                            </classpath>
                                            <doclet name="com.sun.jersey.wadl.resourcedoc.ResourceDocletJSON">
                                                <path>
                                                    <path refid="maven.plugin.classpath" />
                                                    <path refid="maven.compile.classpath" />
                                                    <path refid="maven.runtime.classpath" />
                                                    <pathelement location="${project.build.outputDirectory}" />
                                                </path>
                                                <param name="-output" value="${project.build.outputDirectory}/resourcedoc.xml" />
                                            </doclet>
                                        </javadoc>
                                        <copy file="${project.build.outputDirectory}/resourcedoc.xml" tofile="${public.xsl.directory}/resourcedoc.xml" />
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>2.6</version>
                        <executions>
                            <execution>
                                <id>copy-xsl-resources</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${public.xsl.directory}</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>${basedir}/src/main/public-rest-doc</directory>
                                            <filtering>true</filtering>
                                            <excludes>
                                                <exclude>static/**</exclude>
                                            </excludes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                            <execution>
                                <id>copy-page-resources</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${public.rest.doc.directory}</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>src/main/public-rest-doc/static</directory>
                                            <filtering>true</filtering>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.sun.jersey.contribs</groupId>
                        <artifactId>maven-wadl-plugin</artifactId>
                        <version>1.8</version>
                        <executions>
                            <execution>
                                <id>generate</id>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>

                        <dependencies>
                            <dependency>
                                <groupId>org.slf4j</groupId>
                                <artifactId>slf4j-simple</artifactId>
                                <version>1.7.9</version>
                            </dependency>
                            <dependency>
                                <groupId>com.sun.jersey</groupId>
                                <artifactId>jersey-server</artifactId>
                                <version>${jersey.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>com.atlassian.annotations</groupId>
                                <artifactId>atlassian-annotations</artifactId>
                                <version>0.15</version>
                            </dependency>
                            <dependency>
                                <groupId>xerces</groupId>
                                <artifactId>xercesImpl</artifactId>
                                <version>2.9.1</version>
                            </dependency>
                            <dependency>
                                <groupId>com.google.code.gson</groupId>
                                <artifactId>gson</artifactId>
                                <version>2.3</version>
                            </dependency>
                            <dependency>
                                <groupId>org.reflections</groupId>
                                <artifactId>reflections</artifactId>
                                <version>0.9.9</version>
                            </dependency>
                        </dependencies>

                        <configuration>
                            <wadlFile>${public.xsl.directory}/jira-rest-plugin.wadl</wadlFile>
                            <formatWadlFile>true</formatWadlFile>
                            <baseUri>http://example.com:8080/jira/rest/agile/greenhopper</baseUri>
                            <packagesResourceConfig>
                                <param>com.atlassian.greenhopper.api.rest</param>
                            </packagesResourceConfig>
                            <wadlGenerators>
                                <wadlGeneratorDescription>
                                    <className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc
                                    </className>
                                    <properties>
                                        <property>
                                            <name>applicationDocsFile</name>
                                            <value>${public.xsl.directory}/application-doc.xml</value>
                                        </property>
                                    </properties>
                                </wadlGeneratorDescription>
                                <wadlGeneratorDescription>
                                    <className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport
                                    </className>
                                    <properties>
                                        <property>
                                            <name>grammarsFile</name>
                                            <value>${public.xsl.directory}/application-grammars.xml</value>
                                        </property>
                                    </properties>
                                </wadlGeneratorDescription>
                                <wadlGeneratorDescription>
                                    <className>
                                        com.atlassian.plugins.rest.doclet.generators.resourcedoc.AtlassianWadlGeneratorResourceDocSupport
                                    </className>
                                    <properties>
                                        <property>
                                            <name>resourceDocFile</name>
                                            <value>${public.xsl.directory}/resourcedoc.xml</value>
                                        </property>
                                    </properties>
                                </wadlGeneratorDescription>
                            </wadlGenerators>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>xml-maven-plugin</artifactId>
                        <version>1.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>transform</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <transformationSets>
                                <transformationSet>
                                    <dir>${public.xsl.directory}</dir>
                                    <includes>
                                        <include>jira-rest-plugin.wadl</include>
                                    </includes>

                                    <stylesheet>${public.xsl.directory}/wadl-documentation.xsl</stylesheet>
                                    <outputProperties>
                                        <outputProperty>
                                            <name>indent</name>
                                            <value>no</value>
                                        </outputProperty>
                                    </outputProperties>

                                    <outputDir>${public.rest.doc.directory}</outputDir>
                                    <fileMappers>
                                        <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
                                            <pattern>jira-rest-plugin.wadl</pattern>
                                            <replacement>index.html</replacement>
                                        </fileMapper>
                                    </fileMappers>
                                </transformationSet>
                            </transformationSets>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>net.sf.saxon</groupId>
                                <artifactId>saxon</artifactId>
                                <version>8.7</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create-api-zip</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/main/assembly/public-rest-api-docs.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>third-party-licensing</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-bill-of-materials</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.outputDirectory}/</outputDirectory>
                                    <overwrite>true</overwrite>
                                    <resources>
                                        <resource>
                                            <directory>../third-party-licensing</directory>
                                            <includes>
                                                <include>bom.csv</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                            <execution>
                                <id>copy-licenses</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.outputDirectory}/licenses</outputDirectory>
                                    <overwrite>true</overwrite>
                                    <resources>
                                        <resource>
                                            <directory>../third-party-licensing/licenses</directory>
                                            <includes>
                                                <include>*.txt</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- Adds the JIRA Projects plugin for the AUI sidebar -->
            <id>SideBar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <configuration>
                            <compressResources>false</compressResources>
                            <libArtifacts>
                                <!-- include this so that we can run gh-debug with postgres -->
                                <libArtifact>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>${database.driver.version.postgres}</version>
                                </libArtifact>
                            </libArtifacts>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-projects-plugin</artifactId>
                                    <version>${jira.projects.plugin.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.qunit</groupId>
                                    <artifactId>atlassian-qunit-plugin</artifactId>
                                    <version>${atlassian.qunit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.plugins</groupId>
                                    <artifactId>greenhopper-client-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.plugins</groupId>
                                    <artifactId>greenhopper-dev-extensions</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.qunit</groupId>
                                    <artifactId>atlassian-qunit-plugin</artifactId>
                                    <version>${atlassian.qunit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.func.test.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <!-- Only run SideBar profile against a suitable version of JIRA -->
                            <productVersion>6.4-SNAPSHOT</productVersion>
                            <systemPropertyVariables>
                                <atlassian.darkfeature.com.atlassian.jira.projects.ProjectCentricNavigation>true</atlassian.darkfeature.com.atlassian.jira.projects.ProjectCentricNavigation>
                                <pac.baseurl>${pac.baseurl}</pac.baseurl>
                                <upm.pac.disable>false</upm.pac.disable>
                            </systemPropertyVariables>
                            <testBundleExcludes>
                                <testBundleExclude>
                                    <groupId>atlassian</groupId>
                                </testBundleExclude>
                                <testBundleExclude>
                                    <groupId>junit</groupId>
                                    <artifactId>junit-dep</artifactId>
                                </testBundleExclude>
                            </testBundleExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dbsetup</id>
            <build>
                <plugins>
                    <plugin>
                        <dependencies>
                            <dependency>
                                <groupId>org.postgresql</groupId>
                                <artifactId>postgresql</artifactId>
                                <version>${database.driver.version.postgres}</version>
                            </dependency>
                            <dependency>
                                <groupId>net.sourceforge.jtds</groupId>
                                <artifactId>jtds</artifactId>
                                <version>${database.driver.version.mssql}</version>
                            </dependency>
                            <dependency>
                                <groupId>com.mysql.jdbc</groupId>
                                <artifactId>com.springsource.com.mysql.jdbc</artifactId>
                                <version>5.1.6</version>
                            </dependency>
                            <dependency>
                                <groupId>com.oracle</groupId>
                                <artifactId>ojdbc6</artifactId>
                                <version>${database.driver.version.oracle}</version>
                            </dependency>
                        </dependencies>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>sql-maven-plugin</artifactId>
                        <version>1.5</version>
                        <configuration>
                            <driver>${ao.test.database.driver}</driver>
                            <url>${ao.test.database.url}</url>
                            <username>${ao.test.database.root.user}</username>
                            <password>${ao.test.database.root.password}</password>
                        </configuration>
                        <executions>
                            <execution>
                                <id>drop-db</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <configuration>
                                    <url>${ao.test.database.root.url}</url>
                                    <autocommit>true</autocommit>
                                    <sqlCommand>${ao.test.database.drop.command}</sqlCommand>
                                </configuration>
                            </execution>
                            <execution>
                                <id>create-db</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <configuration>
                                    <url>${ao.test.database.root.url}</url>
                                    <autocommit>true</autocommit>
                                    <sqlCommand>${ao.test.database.create.command}</sqlCommand>
                                </configuration>
                            </execution>
                            <execution>
                                <id>setup-tables</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <configuration>
                                    <fileset>
                                        <basedir>${basedir}</basedir>
                                        <includes>
                                            <include>${ao.test.database.setup.sql}</include>
                                        </includes>
                                    </fileset>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>postgres</id>
            <dependencies>
                <dependency>
                    <groupId>org.postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                    <version>${database.driver.version.postgres}</version>
                </dependency>
            </dependencies>
            <properties>
                <!--Used to set up the database-->
                <ao.test.database.setup.sql>src/test/sql/unit-test-setup-postgres.sql</ao.test.database.setup.sql>
                <ao.test.database.create.command>CREATE database ao_test ENCODING 'UNICODE'</ao.test.database.create.command>
                <ao.test.database.drop.command>DROP DATABASE IF EXISTS ao_test</ao.test.database.drop.command>
                <ao.test.database.root.url>jdbc:postgresql://localhost:5432/postgres</ao.test.database.root.url>
                <ao.test.database.root.user>postgres</ao.test.database.root.user>
                <ao.test.database.root.password>postgres</ao.test.database.root.password>
                <ao.test.database.driver>org.postgresql.Driver</ao.test.database.driver>

                <!--Used to run tests-->
                <ao.test.database.url>jdbc:postgresql://localhost:5432/ao_test</ao.test.database.url>
                <ao.test.database.schema>ao_schema</ao.test.database.schema>
                <ao.test.database.username>ao_user</ao.test.database.username>
                <ao.test.database.password>ao_password</ao.test.database.password>
            </properties>
        </profile>
        <profile>
            <id>mysql</id>
            <dependencies>
                <dependency>
                    <groupId>com.mysql.jdbc</groupId>
                    <artifactId>com.springsource.com.mysql.jdbc</artifactId>
                    <version>5.1.6</version>
                </dependency>
            </dependencies>
            <properties>
                <ao.test.database.setup.sql>src/test/sql/unit-test-setup-mysql.sql</ao.test.database.setup.sql>
                <ao.test.database.root.url>jdbc:mysql://localhost:3307/information_schema?useUnicode=true&amp;characterEncoding=UTF8&amp;sessionVariables=storage_engine=InnoDB</ao.test.database.root.url>
                <ao.test.database.root.user>root</ao.test.database.root.user>
                <ao.test.database.root.password />
                <ao.test.database.create.command>CREATE DATABASE ao_test</ao.test.database.create.command>
                <ao.test.database.drop.command>DROP DATABASE IF EXISTS ao_test</ao.test.database.drop.command>
                <ao.test.database.driver>com.mysql.jdbc.Driver</ao.test.database.driver>

                <!--Used to run tests-->
                <ao.test.database.url>jdbc:mysql://localhost:3307/ao_test?useUnicode=true&amp;characterEncoding=UTF8&amp;sessionVariables=storage_engine=InnoDB</ao.test.database.url>
                <ao.test.database.schema />
                <ao.test.database.username>ao_user</ao.test.database.username>
                <ao.test.database.password>ao_password</ao.test.database.password>
            </properties>
        </profile>

        <profile>
            <id>oracle</id>
            <dependencies>
                <dependency>
                    <groupId>com.oracle</groupId>
                    <artifactId>ojdbc6</artifactId>
                    <version>${database.driver.version.oracle}</version>
                </dependency>
            </dependencies>
            <properties>
                <ao.test.database.setup.sql>src/test/sql/unit-test-setup-oracle.sql</ao.test.database.setup.sql>
                <ao.test.database.root.url>${ao.test.database.url}</ao.test.database.root.url>
                <ao.test.database.root.user>oracle</ao.test.database.root.user>
                <ao.test.database.root.password>oracle</ao.test.database.root.password>
                <ao.test.database.driver>oracle.jdbc.OracleDriver</ao.test.database.driver>

                <!--Used to run tests-->
                <ao.test.database.url>jdbc:oracle:thin:@localhost:1521:XE</ao.test.database.url>
                <ao.test.database.schema />
                <ao.test.database.username>ao_user</ao.test.database.username>
                <ao.test.database.password>ao_password</ao.test.database.password>
            </properties>
        </profile>

        <profile>
            <id>mssql</id>
            <dependencies>
                <dependency>
                    <groupId>net.sourceforge.jtds</groupId>
                    <artifactId>jtds</artifactId>
                    <version>${database.driver.version.mssql}</version>
                </dependency>
            </dependencies>
            <properties>
                <ao.test.database.setup.sql>src/test/sql/unit-test-setup-mssql.sql</ao.test.database.setup.sql>
                <ao.test.database.root.url>jdbc:jtds:sqlserver://localhost:1433/master;autoCommit=false</ao.test.database.root.url>
                <ao.test.database.root.user>sa</ao.test.database.root.user>
                <ao.test.database.root.password>@!1234abc</ao.test.database.root.password>
                <ao.test.database.create.command>CREATE DATABASE ao_test</ao.test.database.create.command>
                <ao.test.database.drop.command>IF EXISTS(select * from sys.databases where name='ao_test') DROP DATABASE ao_test</ao.test.database.drop.command>
                <ao.test.database.driver>net.sourceforge.jtds.jdbc.Driver</ao.test.database.driver>

                <!--Used to run tests-->
                <ao.test.database.url>jdbc:jtds:sqlserver://localhost:1433/ao_test;autoCommit=false</ao.test.database.url>
                <ao.test.database.schema>ao_schema</ao.test.database.schema>
                <ao.test.database.username>ao_user</ao.test.database.username>
                <ao.test.database.password>ao_password@!123</ao.test.database.password>
            </properties>
        </profile>
    </profiles>

	<build>
		<resources>
			<resource>
				<targetPath>../classes</targetPath>
				<directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>gh-help-paths.properties</exclude>
                    <exclude>agile-help-paths.properties</exclude>
                </excludes>
			</resource>
			<resource>
				<targetPath>../classes</targetPath>
				<directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>gh-help-paths.properties</include>
                    <include>agile-help-paths.properties</include>
                </includes>
			</resource>
		</resources>
		<plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9.1</version>
                <executions>
                    <!--
                    We don't compile the wired-tests ourselves as they require jira-api 7.0.0. Instead we copy over the
                    compiled classes into our test jar
                    -->
                    <execution>
                        <id>add-test-resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>add-test-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>${wired.integration.test.classes.directory}</directory>
                                    <includes>
                                        <include>**/*.class</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <!-- do not fail the build if there are errors during javadoc execution -->
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.lesscss</groupId>
                <artifactId>lesscss-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-less</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>jira-importers-plugin</includeArtifactIds>
                            <includeGroupIds>com.atlassian.jira.plugins</includeGroupIds>
                            <outputDirectory>${project.build.outputDirectory}/importers</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

			<plugin>
				<groupId>com.atlassian.maven.plugins</groupId>
				<artifactId>maven-jira-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
                    <enableFastdev>false</enableFastdev> <!-- Fastdev? More like shift+r oh shit there goes fifteen seconds dev-->
                    <!-- Skip wired integration tests by default - override in it wired-integration-tests profile -->
                    <skipTests>true</skipTests>
                    <systemPropertyVariables>
                        <atlassian.upm.on.demand>${atlassian.upm.on.demand}</atlassian.upm.on.demand>
                    </systemPropertyVariables>
					<instructions>
                        <Export-Package>
                            com.pyxis.*,
                            com.atlassian.greenhopper.*
                        </Export-Package>
                        <Bundle-SymbolicName>${atlassian.plugin.key}</Bundle-SymbolicName>
						<Private-Package>
                        </Private-Package>
                        <DynamicImport-Package>
                            com.atlassian.jira.plugins.importer.external.beans,
                            com.atlassian.jira.plugins.importer.sample,
                            com.atlassian.jira.plugins.issue.create.context.api,
                            com.atlassian.jira.projects.agile,
                            com.atlassian.jira.projects.api.sidebar,
                            com.atlassian.jira.projects.api.sidebar.navigation,
                            com.atlassian.jira.projects.sidebar.navigation,
                            com.atlassian.jira.projects.legacy,
                            com.atlassian.jira.projects.darkfeature,
                            com.atlassian.jira.projects.sidebar.ancillary.*,
                            com.atlassian.webresource.api.assembler,
                        </DynamicImport-Package>
                        <Import-Package>
                            <!--Star imports must sit below matching non stars-->
                            com.atlassian.activeobjects.tx;version="0.19",
                            com.atlassian.analytics.api.annotations;resolution:="optional",
                            com.atlassian.application.api.*;resolution:="optional",
                            com.atlassian.applinks.core;resolution:="optional",
                            com.atlassian.applinks.api.*;version="3.6",
                            com.atlassian.applinks.host.spi.*;version="3.6",
                            com.atlassian.beehive;version="${beehive.version}";resolution:="optional",
                            com.atlassian.cache;resolution:="optional",
                            com.atlassian.core.*;version="${jira.version}",
                            com.atlassian.crowd.*;version="${jira.version}",
                            com.atlassian.event.api;version="2.1",
                            com.atlassian.extras.*;version="2.2.2",
                            com.atlassian.fugue;version="1.1",
                            com.atlassian.gadgets.*;version="3.1",
                            com.atlassian.healthcheck.core.*;resolution:="optional",
                            com.atlassian.jira.blueprint.api;resolution:="optional",
                            com.atlassian.jira.event.mau;resolution:="optional",
                            com.atlassian.jira.onboarding;resolution:="optional",
                            com.atlassian.jira.issue.status.category;resolution:="optional",
                            com.atlassian.jira.imports.project.ao.handler;resolution:="optional",
                            com.atlassian.jira.permission.data;resolution:="optional",
                            com.atlassian.jira.plugin.attachment;resolution:="optional",
                            com.atlassian.jira.plugin.viewissue.issuelink,
                            com.atlassian.jira.plugin.link.applinks;resolution:="optional",
                            com.atlassian.jira.plugin.link.confluence.*;resolution:="optional",
                            com.atlassian.jira.plugins.importer.external.beans,
                            com.atlassian.jira.plugins.importer.sample,
                            com.atlassian.jira.plugins.issue.create.context.api;resolution:="optional",
                            com.atlassian.jira.workflow.migration.enterprise;resolution:="optional",
                            com.atlassian.jira.projecttemplates;resolution:="optional",
                            com.atlassian.jira.application;resolution:="optional",
                            com.atlassian.jira.config.managedconfiguration;resolution:="optional",
                            com.atlassian.jira.entity.property;resolution:="optional",
                            com.atlassian.jira.project.template.hook;resolution:="optional",
                            com.atlassian.jira.project.type;resolution:="optional",
                            com.atlassian.jira.projects.agile;resolution:="optional",
                            com.atlassian.jira.projects.api.sidebar;resolution:="optional",
                            com.atlassian.jira.projects.api.sidebar.navigation;resolution:="optional",
                            com.atlassian.jira.projects.darkfeature;resolution:="optional",
                            com.atlassian.jira.projects.legacy;resolution:="optional",
                            com.atlassian.jira.projects.unlicensed;resolution:="optional",
                            !com.atlassian.jira.projects.sidebar.ancillary.*,
                            com.atlassian.jira.util.johnson;resolution:="optional",
                            com.atlassian.jira.web.filters.mau;resolution:="optional",
                            com.atlassian.jira.*;version="[${jira.version},8)", <!-- beware this must sit below other jira matches -->
                            com.atlassian.johnson,
                            com.atlassian.json.marshal;resolution:="optional",
                            com.atlassian.license;version="2.2.2",
                            com.atlassian.linkaggregation;resolution:="optional",
                            com.atlassian.mail;version="2.2",
                            com.atlassian.plugin.web.api;resolution:="optional",
                            com.atlassian.plugin.web.api.model;resolution:="optional",
                            com.atlassian.plugin.web.api.provider;resolution:="optional",
                            com.atlassian.plugin.webresource;resolution:="optional",
                            com.atlassian.plugin.webresource.transformer;resolution:="optional",
                            com.atlassian.plugin.webresource.url;resolution:="optional",
                            com.atlassian.plugin.*;version="2.10.1", <!-- beware this must sit below other plugin matches -->
                            com.atlassian.plugins.capabilities.api;resolution:="optional",
                            com.atlassian.plugins.rest.common.*;version="2.5",
                            com.atlassian.query.*;version="${jira.version}",
                            com.atlassian.sal.api.*;version="2.6",
                            com.atlassian.scheduler;version="${atlassian.scheduler.version}";resolution:="optional",
                            com.atlassian.scheduler.config;version="${atlassian.scheduler.version}";resolution:="optional",
                            com.atlassian.scheduler.status;version="${atlassian.scheduler.version}";resolution:="optional",
                            com.atlassian.templaterenderer;version="1.3",
                            com.atlassian.upm.*;resolution:="optional",
                            com.atlassian.util.profiling;version="1.8.2",
                            com.atlassian.webresource.api.assembler;resolution:="optional",
                            com.atlassian.webresource.api.data;version="${webresource.version}";resolution:="optional",
                            com.google.common.*,
                            com.opensymphony.*;version="[${jira.version},8)",
                            javax.annotation;version="1.0",
                            javax.mail.internet,
                            javax.servlet,
                            javax.servlet.http,
                            javax.ws.rs.core;version="[1.0,2)",
                            javax.ws.rs;version="[1.0,2)",
                            javax.xml.bind.annotation;version="[2.1.0,3)",
                            javax.xml.parsers,
                            net.java.ao.*;version="[0.9,2)",
                            org.apache.commons.collections;version="[3.2,4)",
                            org.apache.commons.collections.comparators;version="[3.2,4)",
                            org.apache.commons.httpclient;version="[3.0,4)",
                            org.apache.commons.httpclient.auth;version="[3.0,4)",
                            org.apache.commons.io;version="[1.4,3)",
                            org.apache.commons.lang;version="[2.5,3)",
                            org.apache.commons.lang.builder;version="[2.5,3)",
                            org.apache.commons.lang.math;version="[2.5,3)",
                            org.apache.commons.logging;version="[1.1,2)",
                            org.apache.http,
                            org.apache.http.message,
                            org.apache.http.params,
                            org.apache.http.client.utils,
                            org.apache.http.client;version="[4.0,5)",
                            org.apache.http.client.entity;version="[4.0,5)",
                            org.apache.http.client.methods;version="[4.0,5)",
                            org.apache.http.conn;version="[4.0,5)",
                            org.apache.http.conn.routing;version="[4.0,5)",
                            org.apache.http.conn.scheme;version="[4.0,5)",
                            org.apache.http.conn.ssl;version="[4.0,5)",
                            org.apache.http.entity.mime;version="[4.0,5)",
                            org.apache.http.entity.mime.content;version="[4.0,5)",
                            org.apache.http.impl.client;version="[4.0,5)",
                            org.apache.http.impl.conn;version="[4.0,5)",
                            org.apache.log4j,
                            org.apache.lucene.document;version="[3.2.0,4.0)",
                            org.apache.lucene.index;version="[3.2.0,4.0)",
                            org.apache.lucene.search;version="[3.2.0,4.0)",
                            org.apache.lucene.util;version="[3.2.0,4.0)",
                            org.codehaus.jackson;version="[1.4,2)",
                            org.codehaus.jackson.xc;version="[1.4,3)",
                            org.codehaus.jackson.*;version="[1.4,2)",
                            org.dom4j;version="[1.4,2)",
                            org.dom4j.*;version="[1.4,2)",
                            org.jfree.chart.*;version="[1.0.13,1.0.13]",
                            org.jfree.data.*;version="[1.0.13,1.0.13]",
                            org.jfree.ui;version="[1.0.8,1.0.8]",
                            org.jfree.util;version="[1.0.8,1.0.8]",
                            org.joda.time.format;version="[2.0,3)",
                            org.joda.time;version="[2.0,3)",
                            org.ofbiz.core.*;version="[1.0.14,2)",
                            org.osgi.framework.*,
                            org.osgi.util.*,
                            org.slf4j;version="[1.5,2)",
                            org.springframework.beans;version="2.5",
                            org.springframework.beans.factory;version="2.5",
                            org.springframework.beans.factory.annotation;version="2.5",
                            org.springframework.beans.factory.config;version="2.5",
                            org.springframework.context;version="2.5",
                            org.springframework.stereotype;version="2.5",
                            org.springframework.util;version="2.5",
                            org.xml.sax.helpers,
                            org.w3c.dom,
                            org.xml.sax,
                            webwork.action;version="[1.4,1.5)",
                            webwork.dispatcher;version="[1.4,1.5)",
                        </Import-Package>
						<Spring-Context>*</Spring-Context>
					</instructions>
                    <testInstructions>
                        <Export-Package>
                            it
                        </Export-Package>
                        <Import-Package>
                            com.atlassian.greenhopper.service,
                            com.atlassian.greenhopper.model.validation,
                            org.slf4j;version="[1.5,2)"
                        </Import-Package>
                        <Private-Package>
                        </Private-Package>
                        <DynamicImport-Package>
                            *
                        </DynamicImport-Package>
                        <Spring-Context>*</Spring-Context>
                    </testInstructions>

                    <productVersion>${jira.version}</productVersion>
					<!--<productDataVersion>${jira.data.version}</productDataVersion>-->
                    <!--<productDataPath>${gh.data}</productDataPath>-->
					<log4jProperties>src/test/resources/log4j.properties</log4jProperties>

					<pluginArtifacts>
						<pluginArtifact>
							<groupId>com.atlassian.qunit</groupId>
							<artifactId>atlassian-qunit-plugin</artifactId>
							<version>${atlassian.qunit.version}</version>
							<!-- <scope>runtime</scope> -->
						</pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira.plugins</groupId>
                          	<artifactId>greenhopper-client-plugin</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>greenhopper-dev-extensions</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
					</pluginArtifacts>
                    <products>
                        <product>
                            <id>jira</id>
                            <instanceId>jira-upm20</instanceId>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <!-- test this plugin with UPM 2.0's licensing api -->
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
                                    <version>${upm.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                    </products>
                    <testBundleExcludes>
                        <testBundleExclude>
                            <groupId>atlassian</groupId>
                        </testBundleExclude>
                        <testBundleExclude>
                            <groupId>junit</groupId>
                            <artifactId>junit-dep</artifactId>
                        </testBundleExclude>
                    </testBundleExcludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
                    <forkMode>never</forkMode>
					<argLine>-Xmx1024m -XX:MaxPermSize=1024m</argLine>
                    <systemPropertyVariables>
                        <ao.test.database.url>${ao.test.database.url}</ao.test.database.url>
                        <ao.test.database.schema>${ao.test.database.schema}</ao.test.database.schema>
                        <ao.test.database.username>${ao.test.database.username}</ao.test.database.username>
                        <ao.test.database.password>${ao.test.database.password}</ao.test.database.password>
                    </systemPropertyVariables>
                    <excludes>
                        <exclude>${wired.integration.test.pattern}</exclude>
                    </excludes>
				</configuration>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <!-- We depend on jira-api and jira-core instead -->
                                        <exclude>com.atlassian.jira:atlassian-jira</exclude>
                                        <!-- We depend on guava instead -->
                                        <exclude>com.google.collections:google-collections</exclude>
                                        <!-- common logging plays badly with OSGi and we use SLF4j instead -->
                                        <exclude>commons-logging:commons-logging</exclude>
                                        <!-- We depend on jackson-core-asl and jackson-mapper-asl instead -->
                                        <exclude>org.codehaus.jackson:jackson-core-lgpl</exclude>
                                        <exclude>org.codehaus.jackson:jackson-mapper-lgpl</exclude>
                                    </excludes>
                                    <message>Please check dependency:tree for banned dependencies</message>
                                    <searchTransitive>true</searchTransitive>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
			<plugin>
				<groupId>com.atlassian.maven.plugins</groupId>
				<artifactId>maven-clover2-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>**/com/pyxis/**/*.java</exclude>
						<!-- copied code because of lacking JIRA visibility -->
						<exclude>**/backlog/jira42/*</exclude>
						<!-- dev mode code -->
						<exclude>**/greenhopper/dev/*</exclude>
					</excludes>
					<generateHistorical>true</generateHistorical>
					<historyDir>${project.build.directory}/../clover_history</historyDir>
					<jdk>1.6</jdk>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<findbugsXmlOutput>true</findbugsXmlOutput>
					<xmlOutput>true</xmlOutput>
					<omitVisitors>UnreadFields,SerializableIdiom</omitVisitors>
					<excludeFilterFile>${basedir}/src/main/config/findbugs-exclude.xml</excludeFilterFile>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<targetJdk>1.6</targetJdk>
					<rulesets>
						<ruleset>/rulesets/basic.xml</ruleset>
						<ruleset>/rulesets/imports.xml</ruleset>
					</rulesets>
					<excludes>
					    <exclude>com/pyxis/**</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
            </plugin>
  			<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />

                                <tstamp>
                                    <format property="touch.time" pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ" />
                                </tstamp>
                                <copy file="${project.build.sourceDirectory}/com/atlassian/greenhopper/util/BuildPropertiesImpl.java.template" tofile="${project.build.sourceDirectory}/com/atlassian/greenhopper/util/BuildPropertiesImpl.java" overwrite="true" />
                                <replace file="${project.build.sourceDirectory}/com/atlassian/greenhopper/util/BuildPropertiesImpl.java" token="@BUILD_DATE@" value="${touch.time}" />
                                <replace file="${project.build.sourceDirectory}/com/atlassian/greenhopper/util/BuildPropertiesImpl.java" token="@VERSION@" value="${project.version}" />
                                <replace file="${project.build.sourceDirectory}/com/atlassian/greenhopper/util/BuildPropertiesImpl.java" token="@CHANGE_SET@" value="${buildNumber}" />
                            </target>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>ant-contrib</groupId>
                        <artifactId>ant-contrib</artifactId>
                        <version>1.0b3</version>
                        <exclusions>
                            <exclusion>
                                <groupId>ant</groupId>
                                <artifactId>ant</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
               </dependencies>
            </plugin>
            <plugin>
                <groupId>ro.isdc.wro4j</groupId>
                <artifactId>wro4j-maven-plugin</artifactId>
                <configuration>
                    <options>browser,devel,jquery,eqnull,expr,forin,latedef,noarg,sub,laxbreak,nonew</options><!-- TODO: add: eqeqeq,undef, remove: eqnull,laxbreak -->
                    <ignoreMissingResources>false</ignoreMissingResources>
                    <failNever>false</failNever>
                    <wroFile>${basedir}/src/main/resources/wro.xml</wroFile>
                    <contextFolder>${basedir}/src/main/resources</contextFolder>
                </configuration>
            </plugin>
            <!-- ADDED FOR E-WADL IN REST BROWSER, generates application-doc.xml, application-grammars.xml and resourcedoc.xml.
                       See https://jdog.atlassian.com/browse/JRADEV-8942 -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
                <executions>
                    <execution>
                        <id>copy-xsl-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${xsl.directory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/src/main/doc</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>schemaGen-plugin-description</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <skip>${gh.schemaGen.skip}</skip>
                            <tasks>
                                <javadoc access="public" sourcepath="${project.build.sourceDirectory}" maxmemory="1024m" failonerror="true" useexternalfile="yes">
                                    <package name="com.atlassian.greenhopper.web.api." />
                                    <package name="com.atlassian.greenhopper.web.rapid.sprint" />
                                    <!-- Uncomment this line to enable remote debugging. <arg line="-J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" />-->
                                    <classpath>
                                        <path refid="maven.compile.classpath" />
                                        <pathelement location="${project.build.outputDirectory}" />
                                    </classpath>
                                    <doclet name="com.sun.jersey.wadl.resourcedoc.ResourceDocletJSON">
                                        <path>
                                            <path refid="maven.plugin.classpath" />
                                            <path refid="maven.compile.classpath" />
                                            <path refid="maven.runtime.classpath" />
                                            <pathelement location="${project.build.outputDirectory}" />
                                        </path>
                                        <param name="-output" value="${project.build.outputDirectory}/resourcedoc.xml" />
                                        <param name="-expand" value="attachments,fields,comments.list,watchers.list,worklogs,groups,names,schema" />
                                    </doclet>
                                </javadoc>
                                <copy file="${project.build.outputDirectory}/resourcedoc.xml" tofile="${restdoc.directory}/resourcedoc.xml" />
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- End E-WADL -->
            <!-- This plugin determines the help paths URL version to use based on the project.version value -->
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>docsversion-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>set-docs-version-property</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>set-property</goal>
                        </goals>
                        <configuration>
                            <skip>${gh.set.docs.version.skip}</skip>
                            <property>gh.docs.version</property>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins />
        </pluginManagement>
	</build>

	<dependencies>

        <!-- Fix problem where org.springframework.core.JdkVersion doesn't detect Java 8 correctly -->
        <dependency>
            <groupId>com.atlassian.springjdk8</groupId>
            <artifactId>jdk-version</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- WIRED TEST RUNNER DEPENDENCIES -->

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit</artifactId>
                    <groupId>junit</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>junit</artifactId>
                    <groupId>junit-dep</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
            <scope>test</scope>
        </dependency>

        <!-- API -->
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-greenhopper-api</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>

        <!-- JIM -->
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-importers-plugin</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- GreenHopper-JIRA bridge -->
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira60-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira61-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira63-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira64-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira65-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira70-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- REST API -->
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-rest</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Fugue -->
        <dependency>
            <groupId>com.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
        </dependency>

        <!-- On Demand/Studio -->
        <dependency>
            <groupId>com.atlassian.studio</groupId>
            <artifactId>studio-common-components-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-ondemand-theme-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Issue Links -->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-view-issue-plugin</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>

        <!--feedback stuff-->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-rest-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-osgi</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Sidebar -->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-projects-plugin</artifactId>
            <version>${jira.projects.plugin.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- JIRA's JSONObject implementation is broken, see http://jira.atlassian.com/browse/JRA-24191 -->
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20090211</version>
		</dependency>

		<!-- Compile time deps -->
		<dependency>
			<groupId>xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>xpp3</groupId>
			<artifactId>xpp3</artifactId>
			<version>1.1.3.4-RC8</version>
		</dependency>
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <version>2.3.0</version>
            <!-- Not sure why provided scope isn't working here <scope>provided</scope>-->
        </dependency>

        <!-- licensing deps -->
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-api</artifactId>
            <version>${upm.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-api</artifactId>
            <version>${upm.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-lib</artifactId>
            <version>${upm.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- JIRA Project Templates -->
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>project-templates-api</artifactId>
            <version>${project.template.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Health Checks -->
        <dependency>
            <groupId>com.atlassian.healthcheck</groupId>
            <artifactId>atlassian-healthcheck</artifactId>
            <version>2.0.3</version>
            <scope>provided</scope>
        </dependency>

        <!-- provided deps -->
		<dependency>
			<groupId>com.atlassian.templaterenderer</groupId>
			<artifactId>atlassian-template-renderer-api</artifactId>
			<version>1.3.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <scope>provided</scope>
        </dependency>
		<dependency>
			<groupId>com.atlassian.plugins</groupId>
			<artifactId>atlassian-plugins-core</artifactId>
			<scope>provided</scope>
		</dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
            <version>${jersey.version}</version>
            <scope>provided</scope>
        </dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.sal</groupId>
			<artifactId>sal-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>webwork</groupId>
			<artifactId>webwork-jira</artifactId>
			<version>1.5.3</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jfree</groupId>
			<artifactId>jfreechart</artifactId>
			<version>1.0.13</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jfree</groupId>
			<artifactId>jcommon</artifactId>
			<version>1.0.8</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.4</version>
			<scope>provided</scope>
		</dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-issue-link-applinks-common-plugin</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-issue-link-confluence-plugin</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource-api</artifactId>
            <version>${webresource.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>

		<!-- provided by plugin framework -->
        <dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-xc</artifactId>
			<version>${jackson.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
            <version>1.1.3</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-compat</artifactId>
        </dependency>

        <!-- test deps -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
        <dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.9.5</version>
			<scope>test</scope>
		</dependency>
        <dependency>
	      <groupId>org.powermock</groupId>
	      <artifactId>powermock-module-junit4</artifactId>
	      <version>${powermock.version}</version>
	      <scope>test</scope>
	   </dependency>
        <dependency>
	      <groupId>org.powermock</groupId>
	      <artifactId>powermock-api-mockito</artifactId>
	      <version>${powermock.version}</version>
	      <scope>test</scope>
	   </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
            <version>${jira.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
			<artifactId>activeobjects-test</artifactId>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.labs.mockito</groupId>
            <artifactId>mockito-booster</artifactId>
            <version>0.3.2</version>
            <scope>test</scope>
        </dependency>

       <!-- REST API Documentation deps -->
        <dependency>
            <!-- for some obscure reason it needs to be a module dep and not just a dep of the antrun plugin (ask Min'an) -->
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-doclet</artifactId>
            <scope>provided</scope>
            <version>2.9.6</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.8</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.8</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-xc</artifactId>
            <version>1.9.8</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>remote-link-aggregator-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.json</groupId>
            <artifactId>atlassian-json-api</artifactId>
            <version>0.9</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.pocketknife</groupId>
            <artifactId>atlassian-pocketknife-dynamic-modules</artifactId>
            <version>${pocketknife.dynamic-modules.version}</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.pocketknife</groupId>
            <artifactId>atlassian-pocketknife-querydsl</artifactId>
            <version>${pocketknife.query-dsl.version}</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.scheduler</groupId>
            <artifactId>atlassian-scheduler-compat</artifactId>
            <version>${atlassian.scheduler.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.beehive</groupId>
            <artifactId>beehive-compat</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.jira.plugins.inline-create</groupId>
            <artifactId>jira-inline-issue-create-dmz</artifactId>
            <version>${jira.inline.issue.create.dmz.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-nav-links-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>remote-link-aggregator-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-nav-links-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>remote-link-aggregator-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.jira.compat</groupId>
            <artifactId>jira-cross-compatibility-lib-bridge-factory</artifactId>
            <version>${jira.cross.compatibility.lib.version}</version>
            <scope>compile</scope>
        </dependency>

    </dependencies>

	<properties>
        <ao.test.database.url>jdbc:hsqldb:mem:ao_test</ao.test.database.url>
        <ao.test.database.schema>PUBLIC</ao.test.database.schema>
        <ao.test.database.username>sa</ao.test.database.username>
        <ao.test.database.password />
        <atlassian.dev.mode>false</atlassian.dev.mode>
        <atlassian.webresource.disable.minification>false</atlassian.webresource.disable.minification>
        <plugin.webresource.batching.off>true</plugin.webresource.batching.off>
        <jira.integration.version>${jira.version}</jira.integration.version>
        <jira.integration.data.version>${jira.integration.version}</jira.integration.data.version>
        <atlassian.plugin.key>com.pyxis.greenhopper.jira</atlassian.plugin.key>
		<powermock.version>1.5</powermock.version>
        <atlassian.upm.on.demand>false</atlassian.upm.on.demand> <!-- upm licensing differs in On Demand environments -->
        <gh.data>src/test/resources/generated-test-resources.zip</gh.data>
        <gh.data.qa>src/test/resources/home.zip</gh.data.qa>
        <gh.schemaGen.skip>false</gh.schemaGen.skip>
        <gh.set.docs.version.skip>false</gh.set.docs.version.skip>
        <pac.baseurl>http://pac-dev.private.atlassian.com/server</pac.baseurl>
        <xvfb.enable>true</xvfb.enable>
        <project.template.version>2.28</project.template.version>
        <xsl.directory>${project.build.directory}/xsl</xsl.directory>
        <restdoc.directory>${project.build.directory}/restapi</restdoc.directory>
        <public.xsl.directory>${project.build.directory}/public-xsl</public.xsl.directory>
        <public.rest.doc.directory>${project.build.directory}/public-rest-api-docs</public.rest.doc.directory>
        <pocketknife.dynamic-modules.version>0.20</pocketknife.dynamic-modules.version>
        <pocketknife.query-dsl.version>0.80</pocketknife.query-dsl.version>
        <od.testing.configuration>
            use-maven,3
            include-artifact,com.atlassian.jira.plugins:jira-greenhopper-ondemand-acceptance-tests
        </od.testing.configuration>
        <webresource.version>3.1.8</webresource.version>
        <wired.integration.test.pattern>it/**/*WiredTest.java</wired.integration.test.pattern>
        <wired.integration.test.classes.directory>../greenhopper-wired-integration-test/target/test-classes</wired.integration.test.classes.directory>
        <additional.path />
	</properties>
</project>
