<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">
    <name>webgoat-plugins-parent</name>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.owasp.webgoat.lesson</groupId>
    <artifactId>webgoat-lessons-parent</artifactId>
    <packaging>pom</packaging>
    <version>8.0-SNAPSHOT</version>

    <parent>
        <groupId>org.owasp.webgoat</groupId>
        <artifactId>webgoat-parent</artifactId>
        <version>8.0-SNAPSHOT</version>
    </parent>

    <modules>
        <module>bypass-restrictions</module>
        <module>challenge</module>
        <module>client-side-filtering</module>
        <module>cross-site-scripting</module>
        <module>html-tampering</module>
        <module>http-basics</module>
        <module>http-proxies</module>
        <module>insecure-login</module>
        <module>jwt</module>
        <module>sql-injection</module>
        <module>xxe</module>
        <module>idor</module>
        <module>vulnerable-components</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.owasp.webgoat</groupId>
            <artifactId>webgoat-container</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <type>jar</type>
            <!-- Exclude Mongo embedded so testcases do not start it automatically, seems to be
                 the easiest way to stop the autoconfiguration of Spring Boot -->
            <exclusions>
                <exclusion>
                    <groupId>de.flapdoodle.embed</groupId>
                    <artifactId>de.flapdoodle.embed.mongo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--<dependency>-->
        <!--<groupId>org.apache.commons</groupId>-->
        <!--<artifactId>commons-exec</artifactId>-->
        <!--<version>1.3</version>-->
        <!--</dependency>-->
        <dependency>
            <groupId>org.owasp.webgoat</groupId>
            <artifactId>webgoat-container</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
            <!-- Exclude Mongo embedded so testcases do not start it automatically, seems to be
                 the easiest way to stop the autoconfiguration of Spring Boot -->
            <exclusions>
                <exclusion>
                    <groupId>de.flapdoodle.embed</groupId>
                    <artifactId>de.flapdoodle.embed.mongo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <version>4.1.3.RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.fakemongo</groupId>
            <artifactId>fongo</artifactId>
            <version>2.1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.owasp.encoder</groupId>
            <artifactId>encoder</artifactId>
            <version>1.2</version>
        </dependency>
        <!-- Temporarily -->
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.7</version>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.owasp.webgoat</groupId>
                <artifactId>webgoat-container</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-artifact-src</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <version>${project.version}</version>
                                    <type>${project.packaging}</type>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>../../webgoat-container/src/main/resources/plugin_lessons</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
