<?xml version="1.0"?>
<!--
  ~ Copyright (c) 2011-2019 Contributors to the Eclipse Foundation
  ~
  ~ This program and the accompanying materials are made available under the
  ~ terms of the Eclipse Public License 2.0 which is available at
  ~
  ~ http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
  ~ which is available at https://www.apache.org/licenses/LICENSE-2.0.
  ~
  ~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
  ~
  --><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>io.vertx</groupId>
    <artifactId>vertx5-parent</artifactId>
    <version>15</version>
  </parent>

  <artifactId>vertx-core-aggregator</artifactId>
  <version>5.2.2</version>
  <packaging>pom</packaging>

  <name>Vert.x Core Aggregator</name>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
    <license>
      <name>Eclipse Public License - v 2.0</name>
      <url>http://www.eclipse.org/legal/epl-v20.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:eclipse/vert.x.git</connection>
    <developerConnection>scm:git:git@github.com:eclipse/vert.x.git</developerConnection>
    <url>git@github.com:eclipse/vert.x.git</url>
  </scm>

  <properties>
    <junit.version>4.13.2</junit.version>
    <harmcrest.version>2.2</harmcrest.version>
    <assertj.version>3.27.7</assertj.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-dependencies</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
  </dependencies>

  <modules>
    <module>vertx-core-logging</module>
    <module>vertx-core</module>
  </modules>

  <profiles>

    <!-- Build Jackson V3 tests -->
    <profile>
      <id>Java21</id>
      <activation>
        <jdk>[21,)</jdk>
      </activation>
      <modules>
        <module>vertx-core-logging</module>
        <module>vertx-core</module>
        <module>vertx-core-java21-tests</module>
      </modules>
    </profile>

    <!--
      This profile can be activated when a toolchain is required, the main use case is building
      with Java 21 features with any JDK, e.g. mvn install -PJava21,toolchain
    -->
    <profile>
      <id>toolchain</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-toolchains-plugin</artifactId>
            <version>3.2.0</version>
            <executions>
              <execution>
                <goals>
                  <goal>toolchain</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <toolchains>
                <jdk>
                  <version>11</version>
                </jdk>
                <jdk>
                  <version>21</version>
                </jdk>
              </toolchains>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Ensure that a release is capable of releasing Jackson v3 -->
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-jackson-v3</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <skip>${skipEnforcer}</skip>
                  <rules>
                    <requireActiveProfile>
                      <profiles>toolchain,Java21</profiles>
                    </requireActiveProfile>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
</project>
