<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.bitbucket.server</groupId>
        <artifactId>bitbucket-distribution-parent</artifactId>
        <version>4.9.0-rc8</version>
    </parent>

    <artifactId>bitbucket-distribution-licenses</artifactId>
    <name>Bitbucket Server - Licenses</name>
    <description>License files for inclusion in distribution archives</description>

    <!-- Only run license download in release build -->
    <profiles>
        <profile>
            <id>bom</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <configuration>
                            <licensesDirectory>${project.build.outputDirectory}/licenses</licensesDirectory>
                            <!-- Unfortunate we need to duplicate this otherwise the Distribution and Test build fails -->
                            <nonMavenDependenciesFile>${project.basedir}/../../third-party-licensing/missing-non-maven-dependencies.properties</nonMavenDependenciesFile>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>download</goal>
                                </goals>
                                <phase>generate-resources</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
