<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</groupId>
        <artifactId>jira-ondemand-project</artifactId>
        <version>7.0.0-SNAPSHOT-RELEASE65-ATSLATTOMCAT2-257</version>
    </parent>

    <artifactId>jira-ondemand-webapp</artifactId>
    <packaging>war</packaging>
    <name>Atlassian JIRA - OnDemand - WebApp</name>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-ondemand-bundled-plugins</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
        </dependency>

        <!-- JIRA core -->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-webapp-common</artifactId>
            <version>${project.version}</version>
            <type>war</type>
        </dependency>

        <dependency>
            <groupId>com.atlassian.core</groupId>
            <artifactId>atlassian-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.core</groupId>
            <artifactId>atlassian-core-user</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.core</groupId>
            <artifactId>atlassian-core-thumbnail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
        </dependency>

        <!-- JIRA OnDemand -->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-ondemand-host-components</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- OnDemand -->
        <dependency>
            <groupId>com.atlassian.ondemand</groupId>
            <artifactId>ondemand-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.studio</groupId>
            <artifactId>studio-common-host-components</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.studio</groupId>
            <artifactId>ondemand-webapps-common</artifactId>
            <version>${ondemand.core.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <!-- required by JiraImportProgressFilter -->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.startup</groupId>
            <artifactId>atlassian-startup</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.velocity.htmlsafe</groupId>
            <artifactId>velocity-htmlsafe</artifactId>
            <version>${velocity-htmlsafe.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-tools</artifactId>
            <version>${velocity-tools.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <classifier>jdk15</classifier>
            <version>2.2.2</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sf.ezmorph</groupId>
            <artifactId>ezmorph</artifactId>
            <version>1.0.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <version>${findbugs.annotations.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- workaround for http://jira.atlassian.com/browse/JRA-20715 -->
        <dependency>
            <groupId>org.codehaus.xfire</groupId>
            <artifactId>xfire-java5</artifactId>
            <version>1.2.6</version>
            <exclusions>
                <exclusion>
                    <groupId>xfire</groupId>
                    <artifactId>xfire-jsr181-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.xfire</groupId>
                    <artifactId>xfire-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>pom.xml</file>
                                    <type>pom</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webappDirectory>${project.build.directory}/war/exploded</webappDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.studio</groupId>
                                    <artifactId>ondemand-webapps-common</artifactId>
                                    <version>${ondemand.core.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/war/exploded/WEB-INF/classes</outputDirectory>
                                    <includes>**/studio.default.properties</includes>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>retrieve-bundle-plugins-definitions</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-ondemand-bundled-plugins</artifactId>
                                    <version>${project.version}</version>
                                    <type>txt</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>jira-bundled-plugins-ondemand.txt</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>smartass-maven-plugin</artifactId>
                <version>${smartass.version}</version>
                <executions>
                    <execution>
                        <id>download-bundled-plugins-artifacts</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-listed-artifacts</goal>
                        </goals>
                        <configuration>
                            <sourceList>
                                ${project.build.directory}/jira-bundled-plugins-ondemand.txt
                            </sourceList>
                            <targetDirectory>
                                ${project.build.directory}/war/exploded/WEB-INF/atlassian-bundled-plugins
                            </targetDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <unicorn.app.name>jira</unicorn.app.name>

        <od.testing.configuration>
            include-artifact,com.atlassian.jira:jira-ondemand-acceptance-tests
            include-artifact,com.atlassian.jira:jira-webdriver-tests
            include-artifact,com.atlassian.jira:jira-bundled-plugins-common
            include-artifact,com.atlassian.jira:jira-ondemand-bundled-plugins
            include-artifact,com.atlassian.jira:jira-ondemand-host-components
        </od.testing.configuration>

    </properties>
</project>
