<?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.inverno.dist</groupId>
		<artifactId>inverno-parent</artifactId>
		<version>1.12.0</version>
	</parent>
	<groupId>com.techempower</groupId>
	<artifactId>inverno-benchmark</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>jar</packaging>
	
	<name>inverno-benchmark</name>
	<description>Inverno framework benchmark test</description>
	
	<properties>
		<maven.compiler.source>21</maven.compiler.source>
		<maven.compiler.target>21</maven.compiler.target>
		<maven.compiler.release>21</maven.compiler.release>
	</properties>
	
	<dependencies>
		<dependency>
			<groupId>io.inverno</groupId>
			<artifactId>inverno-core</artifactId>
		</dependency>
		<dependency>
			<groupId>io.inverno.mod</groupId>
			<artifactId>inverno-boot</artifactId>
		</dependency>
		<dependency>
			<groupId>io.inverno.mod</groupId>
			<artifactId>inverno-configuration</artifactId>
		</dependency>
		<dependency>
			<groupId>io.inverno.mod</groupId>
			<artifactId>inverno-http-server</artifactId>
		</dependency>
		<dependency>
			<groupId>io.inverno.mod</groupId>
			<artifactId>inverno-irt</artifactId>
		</dependency>
		<dependency>
			<groupId>io.inverno.mod</groupId>
			<artifactId>inverno-sql-vertx</artifactId>
		</dependency>

		<dependency>
			<groupId>org.unbescape</groupId>
			<artifactId>unbescape</artifactId>
			<version>1.1.6.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>com.dslplatform</groupId>
			<artifactId>dsl-json</artifactId>
			<version>2.0.2</version>
		</dependency>
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-pg-client</artifactId>
		</dependency>
		
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-codec-dns</artifactId>
			<version>${version.netty}</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-codec-socks</artifactId>
			<version>${version.netty}</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-handler-proxy</artifactId>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-resolver-dns</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<executions>
					<execution>
						<id>default-compile</id>
						<configuration>
							<annotationProcessorPaths combine.children="append">
								<path>
									<groupId>com.dslplatform</groupId>
									<artifactId>dsl-json</artifactId>
									<version>2.0.2</version>
								</path>
							</annotationProcessorPaths>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>io.inverno.tool</groupId>
					<artifactId>inverno-maven-plugin</artifactId>
					<configuration>
						<moduleOverrides combine.children="append">
							<module>
								<name>com.dslplatform.dsl.json</name>
								<uses>
									<use>
										<type>com.dslplatform.json.Configuration</type>
									</use>
								</uses>
							</module>
						</moduleOverrides>
						<vmOptions>-Dlog4j2.simplelogLevel=INFO -Dlog4j2.level=INFO --add-reads com.techempower.inverno.benchmark=com.dslplatform.dsl.json --add-opens com.techempower.inverno.benchmark/com.techempower.inverno.benchmark.model=com.dslplatform.dsl.json</vmOptions>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>io.inverno.epoll</id>
			<dependencies>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-transport-native-epoll</artifactId>
					<classifier>linux-x86_64</classifier>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>io.inverno.tool</groupId>
						<artifactId>inverno-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>inverno-package-app</id>
								<phase>package</phase>
								<goals>
									<goal>package-app</goal>
								</goals>
								<configuration>
									<vm>server</vm>
									<launchers>
										<launcher>
											<name>inverno-benchmark</name>
											<vmOptions>-Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dlog4j2.level=OFF -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64 --add-reads com.techempower.inverno.benchmark=com.dslplatform.dsl.json --add-opens com.techempower.inverno.benchmark/com.techempower.inverno.benchmark.model=com.dslplatform.dsl.json</vmOptions>
										</launcher>
									</launchers>
									<archiveFormats>
										<archiveFormat>zip</archiveFormat>
									</archiveFormats>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>io.inverno.io_uring</id>
			<dependencies>
				<dependency>
					<groupId>io.netty.incubator</groupId>
					<artifactId>netty-incubator-transport-native-io_uring</artifactId>
					<classifier>linux-x86_64</classifier>
				</dependency>
		
				<dependency>
					<groupId>io.vertx</groupId>
					<artifactId>vertx-io_uring-incubator</artifactId>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>io.inverno.tool</groupId>
						<artifactId>inverno-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>inverno-package-app</id>
								<phase>package</phase>
								<goals>
									<goal>package-app</goal>
								</goals>
								<configuration>
									<vm>server</vm>
									<launchers>
										<launcher>
											<name>inverno-benchmark</name>
											<vmOptions>-Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dlog4j2.level=OFF -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.incubator.transport.classes.io_uring,io.netty.incubator.transport.io_uring.linux.x86_64 --add-reads com.techempower.inverno.benchmark=com.dslplatform.dsl.json --add-opens com.techempower.inverno.benchmark/com.techempower.inverno.benchmark.model=com.dslplatform.dsl.json</vmOptions>
										</launcher>
									</launchers>
									<archiveFormats>
										<archiveFormat>zip</archiveFormat>
									</archiveFormats>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>

