<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.stash</groupId>
        <artifactId>stash-webapp-parent</artifactId>
        <version>3.2.0</version>
    </parent>

    <artifactId>stash-webapp</artifactId>
    <packaging>war</packaging>
    <name>Atlassian Stash Web Application</name>

    <properties>
        <timestamp>${maven.build.timestamp}</timestamp>
        <buildNumber>${maven.build.timestamp}</buildNumber>
        <stash.bundled.plugins>stash-bundled-plugins</stash.bundled.plugins>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <additionalClasspathElements> <!--bring the webapp resources (urlrewrite.xml, etc.) in the test classpath-->
                        <additionalClasspathElement>${basedir}/src/main/webapp/</additionalClasspathElement>
                    </additionalClasspathElements>
                </configuration>
            </plugin>
            <plugin>
                <groupId>ro.isdc.wro4j</groupId>
                <artifactId>wro4j-maven-plugin</artifactId>
                <configuration>
                    <options>browser,devel,jquery,eqnull,expr</options>
                    <ignoreMissingResources>false</ignoreMissingResources>
                    <failNever>false</failNever>
                    <wroFile>${basedir}/src/main/webapp/WEB-INF/wro.xml</wroFile>
                    <contextFolder>${basedir}/src/main/webapp</contextFolder>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.sf.alchim</groupId>
                <artifactId>yuicompressor-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compress</goal>
                        </goals>
                    </execution>
                </executions>
            </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.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>get-commit-hash</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <configuration>
                            <buildNumberPropertyName>commitHash</buildNumberPropertyName>
                            <revisionOnScmFailure>${buildNumber}</revisionOnScmFailure>
                            <scmBranchPropertyName>commitBranch</scmBranchPropertyName>
                            <timestampPropertyName>commitTimestamp</timestampPropertyName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- Runs on the release (and checks) build only -->
            <id>bom</id>
            <build>
                <plugins>
                    <!-- Generate the bom -->
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>bom</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-licensing-bom-processor-plugin</artifactId>
                        <version>0.3</version>
                        <executions>
                            <execution>
                                <id>generate-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                                <configuration>
                                    <bom>${project.build.directory}/bom.csv</bom>
                                    <template>${basedir}/src/build/resources/static/lgplTemplate.soy</template>
                                    <templateName>stash.build.generate.licenseTemplates</templateName>
                                    <output>${project.build.directory}/${project.artifactId}-${project.version}/static/page/about/lgpl.soy</output>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-bundled-plugins</artifactId>
            <type>zip</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-platform</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-model</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-service-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-service-impl</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-dao-impl</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-web-common</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.beehive</groupId>
            <artifactId>beehive-hazelcast</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-hazelcast</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-memory</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-persistence-hibernate4</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.johnson</groupId>
            <artifactId>atlassian-johnson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.johnson</groupId>
            <artifactId>atlassian-johnson-plugins</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.johnson</groupId>
            <artifactId>atlassian-johnson-spring</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.markup</groupId>
            <artifactId>atlassian-markup-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.markup</groupId>
            <artifactId>atlassian-markup-renderer-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>atlassian-soy-spring-mvc-support</artifactId>
        </dependency>
        <!--
        Yes we are including a plugin as a runtime library  dependency! It is very intentional.
        To avoid running into plugin startup concurrency issues we are exposing the compatibility
        implementation of the tenant APIs from the host application.
        -->
        <dependency>
            <groupId>com.atlassian.tenancy</groupId>
            <artifactId>atlassian-tenancy-compatibility-plugin</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.utils</groupId>
            <artifactId>atlassian-processutils</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.http</groupId>
            <artifactId>atlassian-http</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-wm</artifactId>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.tuckey</groupId>
            <artifactId>urlrewritefilter</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>sitemesh</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>com.octo.captcha</groupId>
            <artifactId>jcaptcha-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.octo.captcha</groupId>
            <artifactId>jcaptcha</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jhlabs</groupId>
            <artifactId>filters</artifactId>
        </dependency>
        <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-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-test-util</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bundles</groupId>
            <artifactId>json</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
