<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2012 JBoss Inc
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>org.jbpm.dashboard</groupId>
        <artifactId>jbpm-dashboard-modules</artifactId>
        <version>6.3.0.Beta1</version>
    </parent>

    <artifactId>jbpm-dashboard-webapp</artifactId>
    <packaging>war</packaging>
    <name>jBPM Dashboard Builder Web App</name>

    <dependencies>
      <dependency>
        <groupId>org.jboss.dashboard-builder</groupId>
        <artifactId>dashboard-commons</artifactId>
      </dependency>
      <dependency>
        <groupId>org.jboss.dashboard-builder</groupId>
        <artifactId>dashboard-provider-core</artifactId>
      </dependency>
      <dependency>
        <groupId>org.jboss.dashboard-builder</groupId>
        <artifactId>dashboard-webapp</artifactId>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>org.jboss.dashboard-builder</groupId>
        <artifactId>dashboard-samples</artifactId>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>org.jboss.dashboard-builder</groupId>
        <artifactId>dashboard-ui-core</artifactId>
        <classifier>classes</classifier>
      </dependency>
    </dependencies>

    <build>
        <finalName>jbpm-dashboard-webapp</finalName>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <!-- the overlays configuration lets establish the order to copy the resources to the main web application
                        the criteria is "the first win", it means that when a given resource already exists in the destination
                        application it will not be overwritten -->
                    <overlays>

                        <overlay>
                            <!-- empty groupId/artifactId represents the current build -->
                            <!-- this empty overlay also let us define the order to copy current web application resources -->
                            <!-- in this case the current web application resources will be copied first -->
                            <!-- if this empty overlay is omitted current web application resources will be copied first by default -->
                        </overlay>
                        <overlay>
                            <groupId>org.jboss.dashboard-builder</groupId>
                            <artifactId>dashboard-samples</artifactId>
                        </overlay>
                        <overlay>
                            <groupId>org.jboss.dashboard-builder</groupId>
                            <artifactId>dashboard-webapp</artifactId>
                        </overlay>
                    </overlays>

                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

    </build>

</project>


