<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Artifactory is a binaries repository manager.
  ~ Copyright (C) 2018 JFrog Ltd.
  ~
  ~ Artifactory is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Affero General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Artifactory is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU Affero General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License
  ~ along with Artifactory.  If not, see <http://www.gnu.org/licenses/>.
  --><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>
    <artifactId>artifactory-web-war</artifactId>
    <packaging>war</packaging>
    <name>Artifactory Web War</name>

    <parent>
        <groupId>org.artifactory</groupId>
        <artifactId>artifactory-web-parent</artifactId>
        <version>6.15.0</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.artifactory</groupId>
            <artifactId>artifactory-web-application</artifactId>
        </dependency>
        <dependency>
            <groupId>org.artifactory</groupId>
            <artifactId>artifactory-angular-web</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>artifactory</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <!-- this is relative to the pom.xml directory -->
                            <directory>src/main/webconf</directory>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <!-- derby driver should not be included in the war to avoid collision when bundled with Access -->
                                        <exclude>org.apache.derby:derby:*:*:compile</exclude>
                                        <exclude>org.apache.derby:derby:*:*:runtime</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>dist-clean</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>auto-clean</id>
                                <phase>initialize</phase>
                                <configuration>
                                    <excludeDefaultDirectories>false</excludeDefaultDirectories>
                                </configuration>
                                <goals>
                                    <goal>clean</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
