<?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">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>53</version>
    <relativePath />
  </parent>

  <groupId>org.jboss.arquillian.container</groupId>
  <artifactId>arquillian-tomcat-parent</artifactId>
  <version>1.2.5.Final</version>
  <packaging>pom</packaging>

  <name>Arquillian Tomcat Container Project Parent</name>
  <description>Tomcat Container integrations for the Arquillian Project</description>
  <url>https://github.com/arquillian/arquillian-container-tomcat</url>

  <inceptionYear>2009</inceptionYear>
  <organization>
    <name>Arquillian Community</name>
    <url>https://arquillian.org</url>
  </organization>

  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Radoslav Husar</name>
      <email>rhusar@redhat.com</email>
      <roles>
        <role>developer</role>
        <role>maintainer</role>
      </roles>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/arquillian/arquillian-container-tomcat.git</connection>
    <developerConnection>scm:git:git@github.com:arquillian/arquillian-container-tomcat.git</developerConnection>
    <url>https://github.com/arquillian/arquillian-container-tomcat</url>
    <tag>1.2.5.Final</tag>
  </scm>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/arquillian/arquillian-container-tomcat/issues</url>
  </issueManagement>

  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/arquillian/arquillian-container-tomcat/actions</url>
  </ciManagement>

  <properties>
    <!-- Project/configuration properties -->
    <maven.compiler.release>11</maven.compiler.release>
    <!-- Since jboss-parent:52 jdk.min.version defaults to 25 -->
    <jdk.min.version>${maven.compiler.release}</jdk.min.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <javadoc.additional.params>-Xdoclint:none</javadoc.additional.params>

    <!-- Dependency versions -->
    <version.arquillian.core>1.10.2.Final</version.arquillian.core>
    <version.arquillian.jakarta>10.0.0.Final</version.arquillian.jakarta>
    <version.shrinkwrap>1.2.6</version.shrinkwrap>
    <version.shrinkwrap.resolver>3.3.7</version.shrinkwrap.resolver>
    <version.weld.jakarta>5.1.7.Final</version.weld.jakarta>

    <!-- Tomcat versions -->
    <version.tomcat10>10.1.55</version.tomcat10>

    <!-- Test configuration -->
    <modular.jdk.args />

    <!-- maven-release-plugin configuration -->
    <releaseProfiles>central-release</releaseProfiles>
    <arguments>-DskipTests</arguments>

    <!-- TODO temporarily disabled to test release configuration and thus use the local directory when using perform -->
    <pushChanges>false</pushChanges>
    <localCheckout>true</localCheckout>
  </properties>

  <dependencyManagement>
    <dependencies>

      <!-- BOMs -->
      <dependency>
        <groupId>org.jboss.shrinkwrap</groupId>
        <artifactId>shrinkwrap-bom</artifactId>
        <version>${version.shrinkwrap}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.shrinkwrap.resolver</groupId>
        <artifactId>shrinkwrap-resolver-bom</artifactId>
        <version>${version.shrinkwrap.resolver}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian</groupId>
        <artifactId>arquillian-bom</artifactId>
        <version>${version.arquillian.core}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian</groupId>
        <artifactId>arquillian-build</artifactId>
        <version>${version.arquillian.core}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian.jakarta</groupId>
        <artifactId>arquillian-jakarta-bom</artifactId>
        <version>${version.arquillian.jakarta}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Dependencies -->
      <dependency>
        <groupId>org.jboss.weld.servlet</groupId>
        <artifactId>weld-servlet-core</artifactId>
        <version>${version.weld.jakarta}</version>
        <scope>test</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <dependencies>

    <!-- Depchains -->

    <dependency>
      <groupId>org.jboss.shrinkwrap</groupId>
      <artifactId>shrinkwrap-depchain</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap.resolver</groupId>
      <artifactId>shrinkwrap-resolver-depchain</artifactId>
      <type>pom</type>
    </dependency>

    <!-- Compile Scope -->

    <dependency>
      <groupId>org.jboss.arquillian.container</groupId>
      <artifactId>arquillian-container-spi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.test</groupId>
      <artifactId>arquillian-test-api</artifactId>
    </dependency>

    <!-- Runtime Scope -->

    <dependency>
      <groupId>org.jboss.arquillian.testenricher</groupId>
      <artifactId>arquillian-testenricher-initialcontext</artifactId>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.arquillian.protocol</groupId>
      <artifactId>arquillian-protocol-servlet-jakarta</artifactId>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.arquillian.testenricher</groupId>
      <artifactId>arquillian-testenricher-cdi-jakarta</artifactId>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.arquillian.testenricher</groupId>
      <artifactId>arquillian-testenricher-resource-jakarta</artifactId>
      <scope>runtime</scope>
    </dependency>


    <!-- Test Scope -->

    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>

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

    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
      <version>6.0.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.weld.servlet</groupId>
      <artifactId>weld-servlet-core</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <argLine>${modular.jdk.args}</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven2-plugin</artifactId>
          <version>1.9.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>jdk11-modular</id>
      <activation>
        <jdk>[11,)</jdk>
      </activation>
      <properties>
        <modular.jdk.args>
          --add-opens=java.base/java.io=ALL-UNNAMED
          --add-opens=java.base/java.lang=ALL-UNNAMED
          --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
        </modular.jdk.args>
      </properties>
    </profile>
    <profile>
      <id>build-server</id>
      <build>
        <plugins>
          <!-- Surefire by default forks the JVM for testing, so we need to pass on the maven.repo.local variable so
            the MavenResolver used in the test cases can read from the same local repo. -->
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemProperties>
                <maven.repo.local>${maven.repo.local}</maven.repo.local>
              </systemProperties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <modules>
    <module>tomcat-common</module>
    <module>tomcat-container-parent</module>
    <module>tomcat-embedded-parent</module>
    <module>tomcat-embedded-common</module>
    <module>tomcat-embedded-10</module>
    <module>tomcat-managed-parent</module>
    <module>tomcat-managed-common</module>
    <module>tomcat-managed-10</module>
    <module>tomcat-remote-parent</module>
    <module>tomcat-remote-common</module>
    <module>tomcat-remote-10</module>
  </modules>
</project>
