<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.distribution</groupId>
        <artifactId>crowd-distribution</artifactId>
        <version>2.8.2-m4</version>
    </parent>

    <artifactId>crowd-common-distribution</artifactId>
    <packaging>jar</packaging>
    <name>Atlassian Crowd Common Files for Distribution</name>

    <dependencies>
        <!-- Pick up the transitive dependencies of the WARs via warpath-type
             dependencies. The dependencies are marked as optional so they
             don't unnecessarily propagate through the rest of the build. -->
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-demo-app</artifactId>
            <type>warpath</type>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-openid-client</artifactId>
            <type>warpath</type>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-openid-server</artifactId>
            <type>warpath</type>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-web-app</artifactId>
            <type>warpath</type>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-client-libraries</artifactId>
            <type>zip</type>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-tomcat-libraries</artifactId>
            <type>zip</type>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>apache-tomcat</artifactId>
            <type>zip</type>
            <version>${tomcat.version}</version>
            <classifier>windows-x86</classifier>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-bundled-plugins</artifactId>
            <type>pom</type> <!-- we only need this artifact to give its dependencies to the licensing plugin -->
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>fetch-licenses</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>bom-no-aggregator</goal>
                            <goal>download-no-aggregator</goal>
                        </goals>
                        <configuration>
                            <licensesDirectory>${project.build.outputDirectory}/licenses</licensesDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.appfuse.plugins</groupId>
                <artifactId>maven-warpath-plugin</artifactId>
                <version>2.2.1</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>add-classes</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
