<?xml version="1.0"?>
<!--
    Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.

    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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <parent>
        <groupId>org.onap.usecase-ui</groupId>
        <artifactId>usecase-ui</artifactId>
        <version>1.1.0-SNAPSHOT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.onap.usecase-ui</groupId>
    <artifactId>usecaseui-common</artifactId>
    <version>1.1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>usecase-ui/usecaseui-common</name>

    <properties>
        <encoding>UTF-8</encoding>
        <packagename>usecase-ui</packagename>
        <version.logback>1.1.2</version.logback>
        <version.slf4j>1.7.6</version.slf4j>
    </properties>

    <dependencies>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${version.logback}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${version.logback}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-access</artifactId>
            <version>${version.logback}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.1</version>
            <classifier>jdk15</classifier>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.5</version>
        </dependency>
        <dependency>
            <groupId>org.onap.msb.java-sdk</groupId>
            <artifactId>msb-java-sdk</artifactId>
            <version>1.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.onap.usecase-ui</groupId>
            <artifactId>usecaseui-monitor</artifactId>
            <version>1.1.0-SNAPSHOT</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.onap.usecase-ui</groupId>
            <artifactId>usecaseui-lcm</artifactId>
            <version>1.1.0-SNAPSHOT</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.onap.usecase-ui</groupId>
            <artifactId>usecaseui-holmes</artifactId>
            <version>1.1.0-SNAPSHOT</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-jsp</artifactId>
            <version>3.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-extras</artifactId>
            <version>3.0.5</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>usecase-ui</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
                    <overlays>
                        <overlay>
                            <groupId>org.onap.usecase-ui</groupId>
                            <artifactId>usecaseui-monitor</artifactId>
                        </overlay>
                        <overlay>
                            <groupId>org.onap.usecase-ui</groupId>
                            <artifactId>usecaseui-lcm</artifactId>
                        </overlay>
						<overlay>
                            <groupId>org.onap.usecase-ui</groupId>
                            <artifactId>usecaseui-holmes</artifactId>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>zip</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks name="${project.artifactId}">
                                <zip destfile="target/${packagename}-${project.version}.zip" update="true">
                                    <zipfileset dir="target/usecase-ui" includes="**"/>
                                </zip>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>