<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.4.4</version>
  </parent>

  <groupId>org.owasp.webgoat</groupId>
  <artifactId>webgoat</artifactId>
  <version>2025.4-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>WebGoat</name>
  <description>WebGoat, a deliberately insecure Web Application</description>
  <url>https://github.com/WebGoat/WebGoat</url>
  <inceptionYear>2006</inceptionYear>
  <organization>
    <name>OWASP</name>
    <url>https://github.com/WebGoat/WebGoat/</url>
  </organization>
  <licenses>
    <license>
      <name>GNU General Public License, version 2</name>
      <url>https://www.gnu.org/licenses/gpl-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>nbaars</id>
      <name>Nanne Baars</name>
      <email>nanne.baars@owasp.org</email>
      <organizationUrl>https://github.com/nbaars</organizationUrl>
      <timezone>Europe/Amsterdam</timezone>
    </developer>
    <developer>
      <id>zubcevic</id>
      <name>René Zubcevic</name>
      <email>rene.zubcevic@owasp.org</email>
    </developer>
    <developer>
      <id>aolle</id>
      <name>Àngel Ollé Blázquez</name>
      <email>angel@olleb.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:WebGoat/WebGoat.git</connection>
    <developerConnection>scm:git:git@github.com:WebGoat/WebGoat.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://github.com/WebGoat/WebGoat</url>
  </scm>

  <issueManagement>
    <system>Github Issues</system>
    <url>https://github.com/WebGoat/WebGoat/issues</url>
  </issueManagement>

  <properties>
    <!-- Shared properties with plugins and version numbers across submodules-->
    <asciidoctorj.version>3.0.0</asciidoctorj.version>
    <bootstrap.version>5.3.5</bootstrap.version>
    <cglib.version>3.3.0</cglib.version>
    <!-- do not update necessary for lesson -->
    <checkstyle.version>3.6.0</checkstyle.version>
    <commons-collections.version>3.2.1</commons-collections.version>
    <commons-compress.version>1.27.1</commons-compress.version>
    <commons-io.version>2.19.0</commons-io.version>
    <commons-lang3.version>3.14.0</commons-lang3.version>
    <commons-text.version>1.13.1</commons-text.version>
    <guava.version>33.4.8-jre</guava.version>
    <jacoco.version>0.8.11</jacoco.version>
    <java.version>23</java.version>
    <jaxb.version>2.3.1</jaxb.version>
    <jjwt.version>0.9.1</jjwt.version>
    <jose4j.version>0.9.3</jose4j.version>
    <jquery.version>3.7.1</jquery.version>
    <jsoup.version>1.19.1</jsoup.version>
    <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
    <maven-failsafe-plugin.version>3.5.2</maven-failsafe-plugin.version>
    <maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
    <maven-source-plugin.version>3.1.0</maven-source-plugin.version>
    <maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
    <maven.compiler.proc>full</maven.compiler.proc>
    <maven.compiler.source>23</maven.compiler.source>
    <maven.compiler.target>23</maven.compiler.target>

    <pmd.version>3.15.0</pmd.version>
    <!-- Use UTF-8 Encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <thymeleaf.version>3.1.2.RELEASE</thymeleaf.version>
    <waittimeForServerStart>60</waittimeForServerStart>
    <webdriver.version>6.0.1</webdriver.version>
    <webgoat.context>/WebGoat</webgoat.context>
    <webgoat.port>8080</webgoat.port>
    <webgoat.sslenabled>false</webgoat.sslenabled>
    <webjars-locator-core.version>0.59</webjars-locator-core.version>
    <webwolf.context>/WebWolf</webwolf.context>
    <webwolf.port>9090</webwolf.port>
    <wiremock.version>3.13.0</wiremock.version>
    <xml-resolver.version>1.2</xml-resolver.version>
    <xstream.version>1.4.5</xstream.version>
    <!-- do not update necessary for lesson -->
    <zxcvbn.version>1.9.0</zxcvbn.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-exec</artifactId>
        <version>1.4.0</version>
      </dependency>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj</artifactId>
        <version>${asciidoctorj.version}</version>
      </dependency>
      <dependency>
        <!-- jsoup HTML parser library @ https://jsoup.org/ -->
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>${jsoup.version}</version>
      </dependency>
      <dependency>
        <groupId>com.nulab-inc</groupId>
        <artifactId>zxcvbn</artifactId>
        <version>${zxcvbn.version}</version>
      </dependency>
      <dependency>
        <groupId>com.thoughtworks.xstream</groupId>
        <artifactId>xstream</artifactId>
        <version>${xstream.version}</version>
      </dependency>
      <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib-nodep</artifactId>
        <version>${cglib.version}</version>
      </dependency>
      <dependency>
        <groupId>xml-resolver</groupId>
        <artifactId>xml-resolver</artifactId>
        <version>${xml-resolver.version}</version>
      </dependency>
      <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt</artifactId>
        <version>${jjwt.version}</version>
      </dependency>
      <dependency>
        <groupId>com.auth0</groupId>
        <artifactId>jwks-rsa</artifactId>
        <version>0.22.1</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/com.auth0/java-jwt -->
      <dependency>
        <groupId>com.auth0</groupId>
        <artifactId>java-jwt</artifactId>
        <version>4.5.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
        <version>${commons-text.version}</version>
      </dependency>
      <dependency>
        <groupId>org.bitbucket.b_c</groupId>
        <artifactId>jose4j</artifactId>
        <version>${jose4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap</artifactId>
        <version>${bootstrap.version}</version>
      </dependency>
      <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>jquery</artifactId>
        <version>${jquery.version}</version>
      </dependency>
      <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>webjars-locator-core</artifactId>
        <version>${webjars-locator-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.wiremock</groupId>
        <artifactId>wiremock-standalone</artifactId>
        <version>${wiremock.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>${webdriver.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>${commons-compress.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jruby</groupId>
        <artifactId>jruby</artifactId>
        <version>10.0.0.1</version>
      </dependency>
      <dependency>
        <groupId>com.microsoft.playwright</groupId>
        <artifactId>playwright</artifactId>
        <version>1.51.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-exec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.38</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>${jaxb.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-database-hsqldb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoctorj</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-oauth2-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.thymeleaf.extras</groupId>
      <artifactId>thymeleaf-extras-springsecurity6</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
    </dependency>
    <dependency>
      <groupId>com.nulab-inc</groupId>
      <artifactId>zxcvbn</artifactId>
    </dependency>
    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
    </dependency>
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib-nodep</artifactId>
    </dependency>
    <dependency>
      <groupId>xml-resolver</groupId>
      <artifactId>xml-resolver</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jsonwebtoken</groupId>
      <artifactId>jjwt</artifactId>
    </dependency>
    <dependency>
      <groupId>com.auth0</groupId>
      <artifactId>jwks-rsa</artifactId>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.auth0/java-jwt -->
    <dependency>
      <groupId>com.auth0</groupId>
      <artifactId>java-jwt</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
    </dependency>
    <dependency>
      <groupId>org.bitbucket.b_c</groupId>
      <artifactId>jose4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jquery</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>webjars-locator-core</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.github.terma</groupId>
      <artifactId>javaniotcpproxy</artifactId>
      <version>1.6</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>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.wiremock</groupId>
      <artifactId>wiremock-standalone</artifactId>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.microsoft.playwright</groupId>
      <artifactId>playwright</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-properties-migrator</artifactId>
      <scope>runtime</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <url>https://repo.maven.apache.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <excludeDevtools>true</excludeDevtools>
          <executable>true</executable>
          <mainClass>org.owasp.webgoat.server.StartWebGoat</mainClass>
          <!-- See http://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-extract-specific-libraries-when-an-executable-jar-runs -->
          <requiresUnpack>
            <dependency>
              <groupId>org.asciidoctor</groupId>
              <artifactId>asciidoctorj</artifactId>
            </dependency>
          </requiresUnpack>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-integration-test-source-as-test-sources</id>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <phase>generate-test-sources</phase>
            <configuration>
              <sources>
                <source>src/it/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <environmentVariables>
            <WEBGOAT_SSLENABLED>${webgoat.sslenabled}</WEBGOAT_SSLENABLED>
            <WEBGOAT_HOST>127.0.0.1</WEBGOAT_HOST>
            <WEBGOAT_PORT>${webgoat.port}</WEBGOAT_PORT>
            <WEBGOAT_CONTEXT>${webgoat.context}</WEBGOAT_CONTEXT>
            <WEBWOLF_HOST>127.0.0.1</WEBWOLF_HOST>
            <WEBWOLF_PORT>${webwolf.port}</WEBWOLF_PORT>
            <WEBWOLF_CONTEXT>${webwolf.context}</WEBWOLF_CONTEXT>
          </environmentVariables>
          <systemPropertyVariables>
            <logback.configurationFile>${basedir}/src/test/resources/logback-test.xml</logback.configurationFile>
          </systemPropertyVariables>
          <argLine>-Xmx512m</argLine>
          <includes>org/owasp/webgoat/integration/*Test, org/owasp/webgoat/playwright/**/*Test</includes>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
          <execution>
            <id>verify</id>
            <goals>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
          <!-- Necessary for vulnerable components lesson -->
          <argLine>--enable-native-access=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED
          --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED
          --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED
          --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED
          --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED</argLine>
          <excludes>
            <exclude>**/*IntegrationTest.java</exclude>
            <exclude>**/*UITest.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${checkstyle.version}</version>
        <configuration>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <configLocation>config/checkstyle/checkstyle.xml</configLocation>
          <suppressionsLocation>config/checkstyle/suppressions.xml</suppressionsLocation>
          <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>2.44.4</version>
        <configuration>
          <formats>
            <format>
              <includes>
                <include>src/**/*.java</include>
              </includes>
              <licenseHeader>
                <file>${project.basedir}/config/license-headers/java</file>
                <delimiter>(package|import)</delimiter>
              </licenseHeader>
            </format>
            <format>
              <includes>
                <include>.gitignore</include>
              </includes>
              <trimTrailingWhitespace></trimTrailingWhitespace>
              <endWithNewline></endWithNewline>
              <indent>
                <tabs>true</tabs>
                <spacesPerTab>4</spacesPerTab>
              </indent>
            </format>
          </formats>
          <markdown>
            <includes>
              <include>**/*.md</include>
            </includes>
            <flexmark></flexmark>
          </markdown>
          <java>
            <includes>
              <include>src/main/java/**/*.java</include>
              <include>src/test/java/**/*.java</include>
              <include>src/it/java/**/*.java</include>
            </includes>
            <removeUnusedImports></removeUnusedImports>
            <googleJavaFormat>
              <style>GOOGLE</style>
              <reflowLongStrings>true</reflowLongStrings>
            </googleJavaFormat>
          </java>
          <pom>
            <sortPom>
              <encoding>UTF-8</encoding>
              <lineSeparator>${line.separator}</lineSeparator>
              <expandEmptyElements>true</expandEmptyElements>
              <spaceBeforeCloseEmptyElement>false</spaceBeforeCloseEmptyElement>
              <keepBlankLines>true</keepBlankLines>
              <nrOfIndentSpace>2</nrOfIndentSpace>
              <indentBlankLines>false</indentBlankLines>
              <indentSchemaLocation>false</indentSchemaLocation>
              <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
              <sortProperties>true</sortProperties>
              <sortModules>true</sortModules>
              <sortExecutions>true</sortExecutions>
            </sortPom>
          </pom>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>restrict-log4j-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes combine.children="append">
                    <exclude>org.apache.logging.log4j:log4j-core</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>local-server</id>
    </profile>
    <profile>
      <id>start-server</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>reserve-container-port</id>
                <goals>
                  <goal>reserve-network-port</goal>
                </goals>
                <phase>process-resources</phase>
                <configuration>
                  <portNames>
                    <portName>webgoat.port</portName>
                    <portName>webwolf.port</portName>
                  </portNames>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.honton.chas</groupId>
            <artifactId>process-exec-maven-plugin</artifactId>
            <version>0.9.2</version>
            <executions>
              <execution>
                <id>start-jar</id>
                <goals>
                  <goal>start</goal>
                </goals>
                <phase>pre-integration-test</phase>

                <configuration>
                  <workingDir>${project.build.directory}</workingDir>
                  <environment>
                    <WEBGOAT_SSLENABLED>${webgoat.sslenabled}</WEBGOAT_SSLENABLED>
                    <WEBGOAT_HOST>127.0.0.1</WEBGOAT_HOST>
                    <WEBGOAT_PORT>${webgoat.port}</WEBGOAT_PORT>
                    <WEBGOAT_CONTEXT>${webgoat.context}</WEBGOAT_CONTEXT>
                    <WEBWOLF_HOST>127.0.0.1</WEBWOLF_HOST>
                    <WEBWOLF_PORT>${webwolf.port}</WEBWOLF_PORT>
                    <WEBWOLF_CONTEXT>${webwolf.context}</WEBWOLF_CONTEXT>
                  </environment>
                  <arguments>
                    <argument>java</argument>
                    <argument>-jar</argument>
                    <argument>-Dlogging.pattern.console=</argument>
                    <argument>-Dwebgoat.server.directory=${java.io.tmpdir}/webgoat_${webgoat.port}</argument>
                    <argument>-Dwebgoat.user.directory=${java.io.tmpdir}/webgoat_${webgoat.port}</argument>
                    <argument>-Dspring.main.banner-mode=off</argument>
                    <argument>--enable-native-access=ALL-UNNAMED</argument>
                    <argument>--add-opens</argument>
                    <argument>java.base/java.lang=ALL-UNNAMED</argument>
                    <argument>--add-opens</argument>
                    <argument>java.base/java.util=ALL-UNNAMED</argument>
                    <argument>--add-opens</argument>
                    <argument>java.base/java.lang.reflect=ALL-UNNAMED</argument>
                    <argument>--add-opens</argument>
                    <argument>java.desktop/java.beans=ALL-UNNAMED</argument>
                    <argument>--add-opens</argument>
                    <argument>java.base/sun.nio.ch=ALL-UNNAMED</argument>
                    <argument>--add-opens</argument>
                    <argument>java.base/java.io=ALL-UNNAMED</argument>
                    <argument>--add-opens</argument>
                    <argument>java.base/java.util=ALL-UNNAMED</argument>
                    <argument>${project.build.directory}/webgoat-${project.version}.jar</argument>
                  </arguments>
                  <waitForInterrupt>false</waitForInterrupt>
                  <waitAfterLaunch>${waittimeForServerStart}</waitAfterLaunch>
                  <healthCheckUrl>http://127.0.0.1:${webgoat.port}${webgoat.context}/login</healthCheckUrl>
                </configuration>
              </execution>
              <execution>
                <id>stop-jar-process</id>
                <goals>
                  <goal>stop-all</goal>
                </goals>
                <phase>post-integration-test</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>owasp</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <configuration>
              <failBuildOnCVSS>7</failBuildOnCVSS>
              <skipProvidedScope>false</skipProvidedScope>
              <skipRuntimeScope>false</skipRuntimeScope>
              <suppressionFiles>
                <!--suppress UnresolvedMavenProperty -->
                <suppressionFile>${maven.multiModuleProjectDirectory}/config/dependency-check/project-suppression.xml</suppressionFile>
              </suppressionFiles>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- run with: mvn test -Pcoverage -->
      <id>coverage</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven-surefire-plugin.version}</version>
            <configuration>
              <argLine>--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED
          --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED
          --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED
          --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED
          ${surefire.jacoco.args}</argLine>
              <excludes>
                <exclude>**/*IntegrationTest.java</exclude>
                <exclude>src/it/java</exclude>
                <exclude>org/owasp/webgoat/*Test</exclude>
              </excludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>before-unit-test</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <destFile>${project.build.directory}/jacoco/jacoco-ut.exec</destFile>
                  <propertyName>surefire.jacoco.args</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>check</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <rules>
                    <rule>
                      <element>BUNDLE</element>
                      <limits>
                        <limit>
                          <counter>CLASS</counter>
                          <value>COVEREDCOUNT</value>
                          <minimum>0.6</minimum>
                        </limit>
                      </limits>
                    </rule>
                  </rules>
                  <dataFile>${project.build.directory}/jacoco/jacoco-ut.exec</dataFile>
                </configuration>
              </execution>
              <execution>
                <id>after-unit-test</id>
                <goals>
                  <goal>report</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <dataFile>${project.build.directory}/jacoco/jacoco-ut.exec</dataFile>
                  <outputDirectory>${project.reporting.outputDirectory}/jacoco-unit-test-coverage-report</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
