<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.crowd</groupId>
        <artifactId>atlassian-crowd-components</artifactId>
        <version>3.4.0-m05-dry-run-4</version>
    </parent>

    <artifactId>crowd-web-app</artifactId>

    <packaging>war</packaging>

    <name>Atlassian Crowd Web Application</name>

    <dependencies>

        <!-- Module dependencies -->

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-integration-client-soap</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-integration-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-server</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-ldap</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-persistence</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-password-encoders</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-language</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-xwork</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-web-app-common</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-decorator-plugin</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Atlassian dependencies -->
        <dependency>
            <groupId>com.atlassian.spring</groupId>
            <artifactId>atlassian-spring</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.johnson</groupId>
            <artifactId>atlassian-johnson-core</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-core-tiny</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-spi</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.mail</groupId>
            <artifactId>atlassian-mail</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Required by SAL -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.extras</groupId>
            <artifactId>atlassian-extras</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.config</groupId>
            <artifactId>atlassian-config</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-servlet</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.csv</groupId>
            <artifactId>atlassian-csv</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-plugin-api</artifactId>
        </dependency>

        <!-- Required by atlassian-plugins-webresource-plugin -->
        <dependency>
            <groupId>com.atlassian.html</groupId>
            <artifactId>atlassian-html-encoder</artifactId>
            <version>1.4</version>
            <scope>runtime</scope>
        </dependency>

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

        <!-- Other dependencies -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</artifactId>
        </dependency>

        <!-- soy-template-plugin needs this to be provided at runtime to be able to be deployed -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Required by atlassian-rest-module -->
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.http</groupId>
            <artifactId>atlassian-http</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

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

        <dependency>
            <groupId>com.mchange</groupId>
            <artifactId>c3p0</artifactId>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>

        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>oscore</artifactId>
        </dependency>

         <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-sitemesh-plugin</artifactId>
         </dependency>

        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-to-slf4j</artifactId>
        </dependency>

        <dependency>
            <groupId>ognl</groupId>
            <artifactId>ognl</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.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>aopalliance</groupId>
                    <artifactId>aopalliance</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>aopalliance</groupId>
                    <artifactId>aopalliance</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>aopalliance</groupId>
                    <artifactId>aopalliance</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</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-beans</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>

        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-c3p0</artifactId>
        </dependency>

        <dependency>
            <groupId>org.tuckey</groupId>
            <artifactId>urlrewritefilter</artifactId>
        </dependency>

        <dependency>
            <artifactId>joda-time</artifactId>
            <groupId>joda-time</groupId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-rest-common</artifactId>
        </dependency>

        <!-- For PDK install -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-framework-bundles</artifactId>
            <type>zip</type>
            <classifier>${plugins.spring.classifier}</classifier>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-bundled-plugins</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>


        <!-- Test Dependencies -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-test-utils</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.crowd</groupId>
                                    <artifactId>crowd-bundled-plugins</artifactId>
                                    <type>zip</type>
                                    <classifier>bundled-plugins</classifier>
                                    <destFileName>atlassian-bundled-plugins.zip</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-aui-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.aui</groupId>
                                    <artifactId>aui-flat-pack</artifactId>
                                    <type>zip</type>
                                    <outputDirectory>${project.build.directory}/aui-flat-pack/console/setup</outputDirectory>
                                    <includes>aui/css/**,aui/js/**</includes>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-jquery-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>jquery</artifactId>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/aui-flat-pack/console/setup/aui/js</outputDirectory>
                                    <includes>*.js</includes>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>${project.build.directory}/aui-flat-pack</directory>
                        </resource>
                    </webResources>
                    <overlays>
                        <overlay>
                            <groupId>com.atlassian.plugins</groupId>
                            <artifactId>atlassian-plugins-framework-bundles</artifactId>
                            <type>zip</type>
                            <classifier>${plugins.spring.classifier}</classifier>
                            <targetPath>WEB-INF/osgi-framework-bundles</targetPath>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <!-- This will be overwritten later if in the distribution profile. -->
                    <execution>
                        <id>generate-dummy-license-page</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo file="${project.build.directory}/${project.artifactId}-${project.version}/about.jsp">
About Atlassian Crowd: See a distribution build of Crowd for full details of the licenses for incorporated software.
                                </echo>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>distribution</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-bom</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>bom-no-aggregator</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-licensing-bom-processor-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-license-page</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                                <configuration>
                                    <bom>${project.build.directory}/bom.csv</bom>
                                    <template>${basedir}/src/build/resources/about.soy</template>
                                    <templateName>crowd.build.generate.licenseTemplate</templateName>
                                    <output>${project.build.directory}/${project.artifactId}-${project.version}/about.jsp</output>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.basepom.maven</groupId>
                        <artifactId>duplicate-finder-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <id>default</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
                                    <ignoredResourcePatterns>
                                        <ignoredResourcePattern>atlassian-plugin.xml</ignoredResourcePattern>
                                        <ignoredResourcePattern>js/soyutils.js</ignoredResourcePattern>
                                    </ignoredResourcePatterns>
                                    <ignoredDependencies>
                                        <!-- aopalliance is bundled into several things, but, since there's only one
                                             version of it, they're all compatible. Rather than trying to chase all
                                             of the places aopalliance is used, just ignore it -->
                                        <dependency>
                                            <groupId>aopalliance</groupId>
                                            <artifactId>aopalliance</artifactId>
                                        </dependency>

                                        <!-- Clashes between plugins may be an indication of a problem, but they
                                              shouldn't fail the build. -->
                                        <dependency>
                                            <groupId>com.atlassian.crowd</groupId>
                                            <artifactId>crowd-rest-application-management</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.crowd</groupId>
                                            <artifactId>crowd-rest-plugin</artifactId>
                                        </dependency>

                                        <!-- Plugins and their transitive dependencies brought in through
                                              crowd-bundled-plugins aren't really on the classpath,
                                              so exclude them.
                                             (Some of these indicate plugins that are bundling too many classes.) -->
                                        <dependency>
                                            <groupId>com.atlassian.troubleshooting</groupId>
                                            <artifactId>plugin-crowd</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.plugins.rest</groupId>
                                            <artifactId>atlassian-rest-module</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.sun.jersey</groupId>
                                            <artifactId>jersey-core</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.sun.jersey</groupId>
                                            <artifactId>jersey-server</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.sun.jersey</groupId>
                                            <artifactId>jersey-servlet</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.applinks</groupId>
                                            <artifactId>applinks-plugin</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.analytics</groupId>
                                            <artifactId>analytics-client</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.analytics</groupId>
                                            <artifactId>analytics-client-s3</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.templaterenderer</groupId>
                                            <artifactId>atlassian-template-renderer</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.templaterenderer</groupId>
                                            <artifactId>atlassian-template-renderer-api</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.templaterenderer</groupId>
                                            <artifactId>atlassian-template-renderer-velocity16-plugin</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>com.atlassian.plugins</groupId>
                                            <artifactId>atlassian-plugins-webresource-rest</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>org.apache.servicemix.bundles</groupId>
                                            <artifactId>org.apache.servicemix.bundles.velocity</artifactId>
                                        </dependency>
                                        <dependency>
                                            <groupId>org.ow2.asm</groupId>
                                            <artifactId>asm</artifactId>
                                        </dependency>
                                    </ignoredDependencies>
                                    <ignoredClassPatterns>
                                        <ignoredClassPattern>^org\.w3c\.dom\..*$</ignoredClassPattern>
                                        <ignoredClassPattern>^javax\.xml\.namespace\..*$</ignoredClassPattern>
                                    </ignoredClassPatterns>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <plugins.spring.classifier>spring42x</plugins.spring.classifier>
    </properties>
</project>
