<?xml version="1.0" encoding="UTF-8"?>
<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>sniffy-parent</artifactId>
        <groupId>io.sniffy</groupId>
        <version>3.1.3</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>sniffy-web</artifactId>

    <name>Sniffy Web</name>
    <url>http://sniffy.io/</url>
    <description>Sniffy Web Integration</description>

    <build>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>target/generated-resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>io.sniffy</groupId>
                                    <artifactId>sniffy-ui</artifactId>
                                    <version>${sniffy.ui.version}</version>
                                    <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
                                    <includes>
                                        META-INF/resources/webjars/sniffy/${sniffy.ui.version}/dist/sniffy.min.js,
                                        META-INF/resources/webjars/sniffy/${sniffy.ui.version}/dist/sniffy.js,
                                        META-INF/resources/webjars/sniffy/${sniffy.ui.version}/dist/sniffy.map
                                    </includes>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>animal-sniffer-enforcer-rule</artifactId>
                        <version>1.15</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>check-signatures</id>
                        <phase>test</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <checkSignatureRule implementation="org.codehaus.mojo.animal_sniffer.enforcer.CheckSignatureRule">
                                    <signature>
                                        <groupId>org.codehaus.mojo.signature</groupId>
                                        <artifactId>java16</artifactId>
                                        <version>1.0</version>
                                    </signature>
                                </checkSignatureRule>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <dependencies>

        <dependency>
            <groupId>io.sniffy</groupId>
            <artifactId>sniffy-core</artifactId>
            <version>3.1.3</version>
        </dependency>

        <dependency>
            <groupId>io.sniffy</groupId>
            <artifactId>sniffy-core</artifactId>
            <version>3.1.3</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.sniffy</groupId>
            <artifactId>sniffy-ui</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.webjars.bower</groupId>
                    <artifactId>minified</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.webjars.bower</groupId>
                    <artifactId>highlightjs</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.webjars.bower</groupId>
                    <artifactId>clipboard</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <optional>true</optional>
        </dependency>
        
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

</project>