<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.scytl.products.ov</groupId>
        <artifactId>config-generator</artifactId>
        <version>2.1.6</version>
    </parent>

    <artifactId>config-webapp</artifactId>
    <packaging>war</packaging>
    <name>Secure Data Manager - Configuration Generator - Webapp</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>

        <!-- internal project dependencies-->
        <dependency>
            <groupId>com.scytl.products.ov</groupId>
            <artifactId>config-commons</artifactId>
            <version>${project.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>config-engine</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${swagger.springfox.version}</version>
        </dependency>

        <!-- CONFIG BATCH JOBS PRODUCT-->
        <dependency>
            <groupId>com.scytl.products.ov.sdm</groupId>
            <artifactId>ov-sdm-batch-jobs-product</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.scytl.products.ov.sdm</groupId>
            <artifactId>ov-secure-data-manager-commons</artifactId>
        </dependency>
    </dependencies>

    <build>

        <finalName>config-generator</finalName>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</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>/config-generator</basePath>
                            <info>
                                <title>Config-Generator</title>
                                <version>v1</version>
                                <description>Config Generator REST API</description>
                                <termsOfService>
                                    http://www.scytl.com/terms-of-service
                                </termsOfService>
                                <contact>
                                    <email>product.pistols@scytl.com</email>
                                    <name>Scytl Product - Product Pistols Team</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>
