<?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>io.avaje</groupId>
    <artifactId>avaje-http-parent</artifactId>
    <version>3.3</version>
  </parent>

  <artifactId>avaje-http-client</artifactId>

  <scm>
    <developerConnection>scm:git:git@github.com:avaje/avaje-http-client.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <surefire.useModulePath>false</surefire.useModulePath>
  </properties>

  <dependencies>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-applog</artifactId>
      <version>1.0</version>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.18.3</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-jsonb</artifactId>
      <version>3.3</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-json-node</artifactId>
      <version>3.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-inject</artifactId>
      <version>11.4</version>
      <optional>true</optional>
    </dependency>

    <!-- test dependencies  -->

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-applog-slf4j</artifactId>
      <version>1.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.javalin</groupId>
      <artifactId>javalin</artifactId>
      <version>6.6.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-http-api</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-http-hibernate-validator</artifactId>
      <version>3.5-RC3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.avaje.composite</groupId>
      <artifactId>logback</artifactId>
      <version>1.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin> <!-- Multi-Release with 21 -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.3.0</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Multi-Release>true</Multi-Release>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.0</version>
        <executions>
          <execution>
            <id>default-testCompile</id>
            <configuration>
              <annotationProcessorPaths>
                <path>
                  <groupId>io.avaje</groupId>
                  <artifactId>avaje-inject-generator</artifactId>
                  <version>11.4</version>
                </path>
              </annotationProcessorPaths>
            </configuration>
          </execution>
          <!-- Compile for base version Java 11 -->
          <execution>
            <id>base</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <release>11</release>
              <compileSourceRoots>
                <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>
              </compileSourceRoots>
            </configuration>
          </execution>
          <!-- Compile for Java 21 -->
          <execution>
            <id>java21</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <release>21</release>
              <compileSourceRoots>
                <compileSourceRoot>${project.basedir}/src/main/java21</compileSourceRoot>
              </compileSourceRoots>
              <outputDirectory>${project.build.outputDirectory}/META-INF/versions/21</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- generated by avaje inject -->
      <plugin>
        <groupId>io.avaje</groupId>
        <artifactId>avaje-inject-maven-plugin</artifactId>
        <version>11.4</version>
        <executions>
          <execution>
            <?m2e execute?>
            <phase>process-sources</phase>
            <goals>
              <goal>provides</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
