<?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-jex-parent</artifactId>
    <version>3.2</version>
  </parent>
  <groupId>benchmark</groupId>
  <artifactId>avaje-jex</artifactId>
  <version>1.0</version>

  <properties>
    <maven.compiler.release>24</maven.compiler.release>
    <slf4j.version>2.0.17</slf4j.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-config</artifactId>
    </dependency>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-http-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-inject</artifactId>
    </dependency>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-jex</artifactId>
    </dependency>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-jsonb</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
    </dependency>

    <dependency>
      <groupId>com.zaxxer</groupId>
      <artifactId>HikariCP</artifactId>
      <version>6.3.0</version>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>42.7.7</version>
    </dependency>

    <dependency>
      <groupId>io.jstach</groupId>
      <artifactId>jstachio</artifactId>
      <version>1.3.7</version>
    </dependency>
    
    <!-- Annotation Processors -->
    <dependency>
      <groupId>io.jstach</groupId>
      <artifactId>jstachio-apt</artifactId>
      <version>1.3.7</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-http-jex-generator</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-inject-generator</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-jsonb-generator</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>io.avaje</groupId>
        <artifactId>avaje-provides-maven-plugin</artifactId>
        <version>2.3</version>
      </plugin>
      
      <plugin>
        <groupId>com.spotify.fmt</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.25</version>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Create Modular Jar and copy dependencies -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <outputDirectory>${project.build.directory}/modules</outputDirectory>
          <archive>
            <manifest>
              <mainClass>benchmark.Main</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-modules</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/modules</outputDirectory>
              <includeScope>runtime</includeScope>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>robaho</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>io.github.robaho</groupId>
          <artifactId>httpserver</artifactId>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jetty</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-http-spi</artifactId>
          <version>12.0.19</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>