<?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/maven-v4_0_0.xsd">

  <!-- Model Version -->
  <modelVersion>4.0.0</modelVersion>

  <!-- Artifact Configuration -->
  <groupId>io.openliberty.arquillian</groupId>
  <artifactId>arquillian-parent-liberty-jakarta</artifactId>
  <version>3.0.0</version>
  <packaging>pom</packaging>
  <name>Arquillian Container Liberty Jakarta Parent</name>
  <description>Jakarta Liberty Container integrations for the Arquillian Project</description>
  <url>https://github.com/OpenLiberty/liberty-arquillian</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://raw.github.com/OpenLiberty/liberty-arquillian/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Cheryl King</name>
      <id>developers</id>
      <email>developers@openliberty.io</email>
      <organization>Open Liberty</organization>
      <url>https://github.com/OpenLiberty</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:OpenLiberty/liberty-arquillian.git</connection>
    <developerConnection>scm:git:git@github.com:OpenLiberty/liberty-arquillian.git</developerConnection>
    <url>git@github.com:OpenLiberty/liberty-arquillian.git</url>
    <tag>arquillian-parent-liberty-jakarta-3.0.0</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>maven-central-snapshots</id>
      <name>Maven Central Snapshot Repository</name>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>maven-central-releases</id>
      <name>Maven Central Release Repository</name>
      <url>https://central.sonatype.com/api/v1/publisher</url>
    </repository>
  </distributionManagement>

  <!-- Properties -->
  <properties>
    <!-- Versioning -->
    <version.arquillian_core>1.9.1.Final</version.arquillian_core>
    <version.arquillian_jakarta>10.0.0.Final</version.arquillian_jakarta>
    <version.surefire.plugin>3.5.4</version.surefire.plugin>

    <!-- override from parent -->
    <maven.compiler.release>11</maven.compiler.release>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.javadoc.failOnError>false</maven.javadoc.failOnError>

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

  <dependencyManagement>
    <dependencies>
      <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>
  </dependencyManagement>

  <modules>
    <module>liberty-managed</module>
    <module>liberty-remote</module>
    <module>liberty-support-feature</module>
  </modules>

  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>3.1.1</version>
            <configuration>
                <autoVersionSubmodules>true</autoVersionSubmodules>
                <useReleaseProfile>false</useReleaseProfile>
                <releaseProfiles>sonatype-oss-release</releaseProfiles>
                <goals>deploy</goals>
            </configuration>
        </plugin>        
    </plugins>
  </build>

  <!-- Profiles for WLP vs OL -->
  <profiles>
    <profile>
      <id>wlp-ee9-its</id>
      <activation>
          <property>
            <name>runtime</name>
            <value>wlp-ee9</value>
          </property>
      </activation>
      <properties>
          <runtime>wlp-ee9</runtime>
          <runtimeGroupId>com.ibm.websphere.appserver.runtime</runtimeGroupId>
          <runtimeArtifactId>wlp-jakartaee9</runtimeArtifactId>
          <!-- This is the final version published for this artifact -->
          <libertyVersion>23.0.0.2</libertyVersion>
          <skipEE10Tests>true</skipEE10Tests>
          <skipEE11Tests>true</skipEE11Tests>
      </properties>
    </profile>
    <profile>
      <id>wlp-ee10-its</id>
      <activation>
          <property>
            <name>runtime</name>
            <value>wlp-ee10</value>
          </property>
      </activation>
      <properties>
          <runtime>wlp-ee10</runtime>
          <runtimeGroupId>com.ibm.websphere.appserver.runtime</runtimeGroupId>
          <runtimeArtifactId>wlp-jakartaee10</runtimeArtifactId>
          <!-- This is the final version published for this artifact -->
          <libertyVersion>26.0.0.4</libertyVersion>
          <skipEE9Tests>true</skipEE9Tests>
          <skipEE11Tests>true</skipEE11Tests>
      </properties>
    </profile>
    <profile>
      <id>wlp-ee11-its</id>
      <activation>
          <property>
            <name>runtime</name>
            <value>wlp-ee11</value>
          </property>
      </activation>
      <properties>
          <runtime>wlp-ee11</runtime>
          <runtimeGroupId>com.ibm.websphere.appserver.runtime</runtimeGroupId>
          <runtimeArtifactId>wlp-jakartaee11</runtimeArtifactId>
          <libertyVersion>${runtimeVersion}</libertyVersion>
          <skipEE9Tests>true</skipEE9Tests>
          <skipEE10Tests>true</skipEE10Tests>
      </properties>
    </profile>
    <profile>
      <id>ol-its</id>
      <activation>
        <property>
          <name>runtime</name>
          <value>ol</value>
        </property>
      </activation>
      <properties>
        <runtime>ol</runtime>
        <runtimeGroupId>io.openliberty</runtimeGroupId>
        <runtimeArtifactId>openliberty-runtime</runtimeArtifactId>
        <libertyVersion>${runtimeVersion}</libertyVersion>
      </properties>
    </profile>
    <profile>
      <id>olbeta-its</id>
      <activation>
        <property>
          <name>runtime</name>
          <value>olbeta</value>
        </property>
      </activation>
      <properties>
        <runtime>olbeta</runtime>
        <runtimeGroupId>io.openliberty.beta</runtimeGroupId>
        <runtimeArtifactId>openliberty-runtime</runtimeArtifactId>
        <libertyVersion>${runtimeVersion}</libertyVersion>
      </properties>
    </profile>
    <profile>
      <id>default-its</id>
      <activation>
        <property>
          <name>runtime</name>
          <value>ol</value>
        </property>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <runtime>ol</runtime>
        <runtimeGroupId>io.openliberty</runtimeGroupId>
        <runtimeArtifactId>openliberty-runtime</runtimeArtifactId>
        <libertyVersion>26.0.0.5</libertyVersion>
      </properties>
    </profile>
    <profile>
        <id>sonatype-oss-release</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.8.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>maven-central-releases</publishingServerId>
                        <deploymentName>${project.artifactId}</deploymentName>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.2</version>
                    <configuration>
                        <bottom><![CDATA[Copyright &#169; {currentYear} the original author or authors.]]></bottom>
                        <failOnError>false</failOnError>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.8</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
  </profiles>

</project>
