<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>
	<groupId>com.techempower</groupId>
	<artifactId>vertx.benchmark</artifactId>
	<version>0.0.1-SNAPSHOT</version>

	<properties>
		<maven.compiler.source>17</maven.compiler.source>
		<maven.compiler.target>17</maven.compiler.target>
		<!-- the main class -->
		<main.class>vertx.App</main.class>
		<vertx.version>5.0.0.CR8</vertx.version>
		<netty.version>4.2.1.Final</netty.version>
		<jackson.version>2.16.1</jackson.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-core</artifactId>
			<version>${vertx.version}</version>
		</dependency>
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-core-logging</artifactId>
			<version>${vertx.version}</version>
		</dependency>
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-pg-client</artifactId>
			<version>${vertx.version}</version>
		</dependency>
		<dependency>
			<groupId>com.dslplatform</groupId>
			<artifactId>dsl-json</artifactId>
			<version>2.0.2</version>
		</dependency>
		<dependency>
			<groupId>com.julienviet</groupId>
			<artifactId>jsonsergen</artifactId>
			<version>0.0.5</version>
		</dependency>
		<dependency>
			<groupId>com.github.ben-manes.caffeine</groupId>
			<artifactId>caffeine</artifactId>
			<version>3.1.3</version>
		</dependency>
		<dependency>
			<groupId>com.fizzed</groupId>
			<artifactId>rocker-compiler</artifactId>
			<version>1.3.0</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.3.1</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.10.1</version>
				<configuration>
					<debug>false</debug>
				</configuration>
				<executions>
					<execution>
						<id>default-compile</id>
						<configuration>
							<annotationProcessors>
								<annotationProcessor>io.vertx.codegen.CodeGenProcessor</annotationProcessor>
							</annotationProcessors>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.fizzed</groupId>
				<artifactId>rocker-maven-plugin</artifactId>
				<version>1.3.0</version>
				<executions>
					<execution>
						<id>generate-rocker-templates</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>generate</goal>
						</goals>
						<configuration>
							<javaVersion>17</javaVersion>
							<templateDirectory>${basedir}/src/main/templates</templateDirectory>
							<outputDirectory>${basedir}/target/generated-sources/rocker</outputDirectory>
							<discardLogicWhitespace>true</discardLogicWhitespace>
							<addAsSources>true</addAsSources>
							<optimize>true</optimize>
							<failOnError>true</failOnError>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.4.1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<manifestEntries>
										<Main-Class>${main.class}</Main-Class>
									</manifestEntries>
								</transformer>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>META-INF/services/io.vertx.core.spi.VerticleFactory</resource>
								</transformer>
							</transformers>
							<artifactSet>
							</artifactSet>
							<outputFile>${project.build.directory}/${project.artifactId}-${project.version}-fat.jar</outputFile>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>

	</build>

	<profiles>
		<profile>
			<id>linux-x86_64</id>
			<activation>
				<os>
					<family>linux</family>
					<arch>x86_64</arch>
				</os>
			</activation>
			<dependencies>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-transport-native-io_uring</artifactId>
					<version>${netty.version}</version>
					<classifier>linux-x86_64</classifier>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>linux-amd64</id>
			<activation>
				<os>
					<family>linux</family>
					<arch>amd64</arch>
				</os>
			</activation>
			<dependencies>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-transport-native-io_uring</artifactId>
					<version>${netty.version}</version>
					<classifier>linux-x86_64</classifier>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>linux-aarch64</id>
			<activation>
				<os>
					<family>linux</family>
					<arch>aarch64</arch>
				</os>
			</activation>
			<dependencies>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-transport-native-io_uring</artifactId>
					<version>${netty.version}</version>
					<classifier>linux-aarch_64</classifier>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>osx-x86_64</id>
			<activation>
				<os>
					<family>mac</family>
					<arch>x86_64</arch>
				</os>
			</activation>
			<dependencies>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-resolver-dns-native-macos</artifactId>
					<version>${netty.version}</version>
					<classifier>osx-x86_64</classifier>
				</dependency>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-transport-native-kqueue</artifactId>
					<version>${netty.version}</version>
					<classifier>osx-x86_64</classifier>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>osx-aarch64</id>
			<activation>
				<os>
					<family>mac</family>
					<arch>aarch64</arch>
				</os>
			</activation>
			<dependencies>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-resolver-dns-native-macos</artifactId>
					<version>${netty.version}</version>
					<classifier>osx-aarch_64</classifier>
				</dependency>
				<dependency>
					<groupId>io.netty</groupId>
					<artifactId>netty-transport-native-kqueue</artifactId>
					<version>${netty.version}</version>
					<classifier>osx-aarch_64</classifier>
				</dependency>
			</dependencies>
		</profile>

	</profiles>

</project>
