<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">
    <parent>
        <artifactId>mixnet</artifactId>
        <groupId>com.scytl.products.ov</groupId>
        <version>2.1.6</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>mixnet-webapp</artifactId>
    <packaging>war</packaging>
    <name>Secure Data Manager - Mixnet - Webapp</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <javax.servlet-api.version>3.1.0</javax.servlet-api.version>
        <tomcat7.maven.plugin.version>2.2</tomcat7.maven.plugin.version>
    </properties>

    <dependencies>
        <!-- internal project dependencies-->
        <dependency>
            <groupId>com.scytl.mixing</groupId>
            <artifactId>mixing-spring</artifactId>
            <version>${mixing.version}</version>
            <exclusions>
            	<exclusion>
            		<artifactId>libs-config</artifactId>
            		<groupId>com.scytl.products.ov.channel.commons</groupId>
            	</exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.scytl.products.ov</groupId>
            <artifactId>validation-engine</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.scytl.products.ov.sdm</groupId>
            <artifactId>ov-secure-data-manager-libs-config</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
          <groupId>com.scytl.products.ov.channel.commons.lib</groupId>
          <artifactId>ov-commons-lib</artifactId>
          <version>${ov-channel.version}</version>
        </dependency>
        <dependency>
          <groupId>com.scytl.products.ov.channel.commons</groupId>
          <artifactId>ov-commons-beans</artifactId>
          <version>${ov-channel.version}</version>
        </dependency>
        <dependency>
          <groupId>com.scytl.products.ov.channel.commons</groupId>
          <artifactId>ov-commons-dto</artifactId>
          <version>${ov-channel.version}</version>
        </dependency>

        <!-- This dependency is need for testing purposes due to maven plugin profiles -->
        <dependency>
            <groupId>com.scytl.mixing</groupId>
            <artifactId>mixing-commons</artifactId>
            <version>${mixing.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.scytl.math</groupId>
            <artifactId>scytl-math</artifactId>
            <scope>test</scope>
        </dependency>


        <!-- SPRING dependencies-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
        </dependency>

        <!-- Other dependencies-->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${javax.servlet-api.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- Swagger -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${swagger.springfox.version}</version>
        </dependency>
    </dependencies>

    <build>

        <finalName>mixing</finalName>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <attachClasses>true</attachClasses>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>${tomcat7.maven.plugin.version}</version>
                <configuration>
                    <path>/${project.build.finalName}</path>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.kongchen</groupId>
                <artifactId>swagger-maven-plugin</artifactId>
                <version>${swagger.mavenplugin.version}</version>
                <configuration>
                    <apiSources>
                        <apiSource>
                            <springmvc>true</springmvc>
                            <locations>com.scytl.products.ov</locations>
                            <schemes>http,https</schemes>
                            <host>host:port</host>
                            <basePath>/mixing</basePath>
                            <info>
                                <title>Mixing</title>
                                <version>v1</version>
                                <description>Mixing REST API</description>
                                <termsOfService>
                                    http://www.scytl.com/terms-of-service
                                </termsOfService>
                                <contact>
                                    <email>product.team2@scytl.com</email>
                                    <name>Scytl Product - Product Team 2</name>
                                    <url />
                                </contact>
                                <license>
                                    <url>http://www.scytl.com/licenses</url>
                                    <name>Scytl License</name>
                                </license>
                            </info>
                            <swaggerDirectory>${basedir}/target/generated/swagger-ui</swaggerDirectory>
                        </apiSource>
                    </apiSources>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/version.txt</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/version.txt</exclude>
                </excludes>
            </resource>
        </resources>

    </build>

</project>
