<?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>6.3.12</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>
            <!-- 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>postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>9.0-801.jdbc4</version>
                                </libArtifact>
                            </libArtifacts>

                            <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.qunit</groupId>
                                    <artifactId>atlassian-qunit-plugin</artifactId>
                                    <version>${atlassian.qunit.version}</version>
                                </pluginArtifact>
                                <!-- this gives us the Slow-mo Filter: useful for WebDriver debugging -->
                                <!-- however the Slow-mo Filter seems to override our exception handling behaviour, so we'll remove it now -->
                                <!--<pluginArtifact>-->
                                <!--<groupId>com.atlassian.jira</groupId>-->
                                <!--<artifactId>jira-func-test-plugin</artifactId>-->
                                <!--<version>${jira.version}</version>-->
                                <!--</pluginArtifact>-->
                            </pluginArtifacts>
                        </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>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

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

        <profile>
            <id>create-rest-apidocs</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>jira.generateDocs</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <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-->
                             <systemPropertyVariables>
                                 <atlassian.upm.on.demand>${atlassian.upm.on.demand}</atlassian.upm.on.demand>
                             </systemPropertyVariables>
                            <instructions>
                                <Include-Resource>
                                    {maven-resources};
                                    ${project.build.outputDirectory}/resourcedoc.xml;
                                    ${xsl.directory}/application-grammars.xml;
                                    ${xsl.directory}/application-doc.xml;
                                </Include-Resource>
                            </instructions>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.sun.jersey.contribs</groupId>
                        <artifactId>maven-wadl-plugin</artifactId>
                        <version>1.8-atlassian-9</version>
                        <executions>
                            <execution>
                                <id>generate</id>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <wadlFile>${restdoc.directory}/greenhopper-rest-api.wadl</wadlFile>
                            <formatWadlFile>true</formatWadlFile>
                            <baseUri>http://example.com:8080/jira/rest/</baseUri>
                            <packagesResourceConfig>
                                <param>com.atlassian.greenhopper.web.api</param>
                                <param>com.atlassian.greenhopper.web.rapid.sprint</param>
                                <!--<param>com.atlassian.jira.rest.v2</param>-->

                            </packagesResourceConfig>
                            <wadlGenerators>
                                <wadlGeneratorDescription>
                                    <className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc</className>
                                    <properties>
                                        <property>
                                            <name>applicationDocsFile</name>
                                            <value>${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>${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>${restdoc.directory}/resourcedoc.xml</value>
                                        </property>
                                    </properties>
                                </wadlGeneratorDescription>
                            </wadlGenerators>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2</version>
                        <executions>
                            <execution>
                                <id>exec-xsltproc</id>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <phase>package</phase>
                                <configuration>
                                    <executable>xsltproc</executable>
                                    <commandlineArgs>-o ${restdoc.directory}/index.html ${xsl.directory}/wadl-documentation.xsl ${restdoc.directory}/greenhopper-rest-api.wadl</commandlineArgs>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>2.4.3</version>
                        <executions>
                            <execution>
                                <id>copy-js-resources</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${restdoc.directory}</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>src/main/js</directory>
                                            <filtering>true</filtering>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </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/api.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>
    </profiles>

	<build>
		<resources>
			<resource>
				<targetPath>../classes</targetPath>
				<directory>src/main/resources</directory>
			</resource>
		</resources>
		<plugins>
            <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-->
                    <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.sample,
                            com.atlassian.jira.entity.property
                        </DynamicImport-Package>
                        <Import-Package>
                            com.atlassian.activeobjects.tx;version="[0.19,1)",
                            com.atlassian.analytics.api.annotations;resolution:="optional",
                            com.atlassian.applinks.core;resolution:="optional",
                            com.atlassian.applinks.api.*;version="[3.6,5)",
                            com.atlassian.applinks.host.spi.*;version="[3.6,5)",
                            com.atlassian.cache;version="${atlassian.cache.version}";resolution:="optional",
                            com.atlassian.cache.*;version="${atlassian.cache.version}";resolution:="optional",
                            com.atlassian.core.*;version="[${jira.version},8)",
                            com.atlassian.crowd.*;version="[${jira.version},8)",
                            com.atlassian.event.api;version="[2.1,3)",
                            com.atlassian.extras.*;version="[2.2.2,3)",
                            com.atlassian.gadgets.*;version="[3.1,4)",
                            com.atlassian.gzipfilter.org.apache.commons.*;version="[1.9,2)",
                            com.atlassian.healthcheck.core.*;resolution:="optional",
                            com.atlassian.jira.issue.status.category;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.workflow.migration.enterprise;resolution:="optional",
                            com.atlassian.jira.projecttemplates;resolution:="optional",
                            com.atlassian.jira.*;version="[${jira.version},8)",
                            com.atlassian.jira.config.managedconfiguration;resolution:="optional",
                            com.atlassian.license;version="[2.2.2,3)",
                            com.atlassian.mail;version="[2.2,3)",
                            com.atlassian.plugin.*;version="[2.10.1,4)",
                            com.atlassian.plugins.rest.common.*;version="[2.5,4)",
                            com.atlassian.query.*;version="[${jira.version},8)",
                            com.atlassian.sal.api.*;version="[2.6,3)",
                            com.atlassian.templaterenderer;version="[1.3,2)",
                            com.atlassian.upm.*;resolution:="optional",
                            com.atlassian.util.profiling;version="[1.8.2,2)",
                            com.atlassian.plugins.capabilities.api;resolution:="optional",
                            com.atlassian.linkaggregation;resolution:="optional",
                            com.google.common.*;version="[10.0.1,12)",
                            com.opensymphony.*;version="[${jira.version},8)",
                            javax.annotation;version="1.0",
                            javax.servlet,
                            javax.servlet.http,
                            javax.ws.rs.core;version="[1.0,2)",
                            javax.ws.rs;version="[1.0,2)",
                            javax.mail.internet,
                            javax.xml.bind.annotation;version="[2.1.0,3)",
                            javax.xml.parsers,
                            net.java.ao.*;version="[0.9,1)",
                            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,2)",
                            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>*;timeout:=60</Spring-Context>
					</instructions>
					<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>
					</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>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<argLine>-Xmx1024m -XX:MaxPermSize=1024m</argLine>
				</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>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                   </execution>
                </executions>
                <configuration>
                    <shortRevisionLength>16</shortRevisionLength>
                </configuration>
            </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>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>qunit-maven-plugin</artifactId>
                <version>1.11</version>
                <configuration>
                    <includes>
                        <include>jstests/**/*.tests.js</include>
                    </includes>
                    <resourceLocations>
                        <resourceLocation>${project.basedir}/src/main/resources</resourceLocation>
                        <resourceLocation>${project.basedir}/src/test/resources</resourceLocation>
                    </resourceLocations>
                </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>
                            <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 -->
    </plugins>
    <pluginManagement>
        <plugins />
    </pluginManagement>
	</build>

	<dependencies>

        <!-- 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-jira611-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>greenhopper-jira62-bridge</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Fugue -->
        <dependency>
            <groupId>com.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <version>1.1</version>
            <scope>compile</scope>
        </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>

        <!-- 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>net.sf.ehcache</groupId>
			<artifactId>ehcache</artifactId>
			<version>1.6.0-atlassian-3</version>
		</dependency>
		<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>
            <!-- intentionally have this as compile scope -->
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-legacy-compatibility-spi</artifactId>
            <version>${upm.version}</version>
            <scope>compile</scope>
        </dependency>
        <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>

        <!-- JIRA Project Templates -->
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>project-templates-api</artifactId>
            <version>1.5</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>javax.ws.rs</groupId>
			<artifactId>jsr311-api</artifactId>
			<version>1.0</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>

		<!-- 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>

        <!-- we need this version explicitly because older versions do not correctly work in JIRA 6.0-OD-07.2 -->
        <dependency>
            <groupId>com.atlassian.usercompatibility</groupId>
            <artifactId>usercompatibility-jira</artifactId>
            <version>0.13</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-compat</artifactId>
            <version>${atlassian.cache.version}</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-api</artifactId>
            <version>${atlassian.cache.version}</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-memory</artifactId>
            <version>${atlassian.cache.version}</version>
        </dependency>

        <!-- we need to include this explicitly since we support versions of JIRA which do not have this version -->
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-memory</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>1.5</version>
	      <scope>test</scope>
	   </dependency>
	   <dependency>
	      <groupId>org.powermock</groupId>
	      <artifactId>powermock-api-mockito</artifactId>
	      <version>1.5</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>

       <!-- 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.7.3</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>0.20</version>
        </dependency>
    </dependencies>

	<properties>
		<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>
        <pac.baseurl>http://pac-dev.private.atlassian.com/server</pac.baseurl>
        <xvfb.enable>false</xvfb.enable>
        <webdriver.browser>firefox</webdriver.browser>
        <atlassian.selenium.version>2.1-m26</atlassian.selenium.version>
        <project.template.version>1.5</project.template.version>
        <xsl.directory>${project.build.directory}/xsl</xsl.directory>
        <restdoc.directory>${project.build.directory}/restapi</restdoc.directory>
        <pocketknife.version>0.20</pocketknife.version>
        <od.testing.configuration>
            use-maven,3
            include-artifact,com.atlassian.jira.plugins:jira-greenhopper-ondemand-acceptance-tests
        </od.testing.configuration>
	</properties>
</project>
