<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright Kroxylicious Authors.

    Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-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.kroxylicious</groupId>
        <artifactId>kroxylicious-parent</artifactId>
        <version>0.19.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>kroxylicious-openmessaging-benchmarks</artifactId>
    <packaging>jar</packaging>

    <name>Kroxylicious OpenMessaging Benchmarks</name>
    <description>OpenMessaging Benchmark integration for Kroxylicious performance testing</description>

    <properties>
        <helm.chart.directory>${project.basedir}/helm/kroxylicious-benchmark</helm.chart.directory>
    </properties>

    <dependencies>
        <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Fabric8 Kubernetes models for type-safe resource parsing -->
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>kubernetes-model-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <directory>${project.build.sourceDirectory}</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>update-jbang-deps</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/jbang/generated-sources/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <helm.chart.directory>${helm.chart.directory}</helm.chart.directory>
                        <jbang.generated.sources>${project.build.directory}/jbang/generated-sources</jbang.generated.sources>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <ignoredUsedUndeclaredDependencies>
                                <ignoredUsedUndeclaredDependency>com.fasterxml.jackson.core:jackson-core</ignoredUsedUndeclaredDependency>
                            </ignoredUsedUndeclaredDependencies>
                            <ignoredNonTestScopedDependencies>
                                <ignoredNonTestScopedDependency>com.fasterxml.jackson.core:jackson-core</ignoredNonTestScopedDependency>
                            </ignoredNonTestScopedDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <!-- HELM_STYLE: like SCRIPT_STYLE but skips {{- if ... }} directives
                         before the license header. Conditional Helm templates must place
                         the directive before the # header to avoid emitting comment-only
                         YAML documents when the condition is false. -->
                    <headerDefinitions>
                        <headerDefinition>etc/license-header-definitions.xml</headerDefinition>
                    </headerDefinitions>
                    <mapping>
                        <yaml>HELM_STYLE</yaml>
                    </mapping>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
