<?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.bitbucket.server</groupId>
        <artifactId>bitbucket-parent</artifactId>
        <version>4.3.0-rc4</version>
    </parent>

    <artifactId>bitbucket-webapp-parent</artifactId>
    <packaging>pom</packaging>
    <name>Bitbucket Server - Webapp Parent</name>

    <modules>
        <module>default</module>
    </modules>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>*.properties</exclude>
                </excludes>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>copy-bundled-plugins</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                                <includeArtifactIds>${bundled.plugins}</includeArtifactIds>
                                <outputDirectory>
                                    ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
                                </outputDirectory>
                                <overWriteReleases>false</overWriteReleases>
                                <overWriteSnapshots>true</overWriteSnapshots>
                                <stripVersion>true</stripVersion>
                            </configuration>
                        </execution>
                    </executions>
                </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>
                                            <exclude>c3p0:c3p0</exclude>
                                            <exclude>com.atlassian.bundles:jsr305</exclude>
                                            <exclude>com.atlassian.extras:atlassian-extras</exclude>
                                            <exclude>com.atlassian.renderer:*</exclude>
                                            <exclude>com.atlassian.spring:atlassian-spring</exclude>
                                            <exclude>com.atlassian.user:atlassian-user</exclude>
                                            <exclude>com.google.collections:google-collections</exclude>
                                            <exclude>commons-logging:commons-logging</exclude>
                                            <exclude>log4j:log4j</exclude>
                                            <exclude>net.sf.ehcache:ehcache</exclude>
                                            <exclude>net.sf.ehcache:ehcache-core</exclude>
                                            <exclude>opensymphony:propertyset</exclude>
                                            <exclude>osuser:osuser</exclude>
                                            <exclude>quartz:quartz</exclude>
                                        </excludes>
                                        <message>Please check dependency:tree for banned dependencies</message>
                                        <searchTransitive>true</searchTransitive>
                                    </bannedDependencies>
                                </rules>
                                <fail>true</fail>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
