<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2020-2021.
  ~
  ~ This file is part of drasyl.
  ~
  ~  drasyl is free software: you can redistribute it and/or modify
  ~  it under the terms of the GNU Lesser General Public License as published by
  ~  the Free Software Foundation, either version 3 of the License, or
  ~  (at your option) any later version.
  ~
  ~  drasyl is distributed in the hope that it will be useful,
  ~  but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~  GNU Lesser General Public License for more details.
  ~
  ~  You should have received a copy of the GNU Lesser General Public License
  ~  along with drasyl.  If not, see <http://www.gnu.org/licenses />.
  -->

<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>
        <artifactId>parent</artifactId>
        <groupId>org.drasyl</groupId>
        <version>0.4.1</version>
    </parent>

    <artifactId>drasyl-performance-tests</artifactId>

    <name>drasyl: General-Purpose Overlay Network Framework - Performance Tests Package</name>
    <description>
        This package contains performance tests for drasyl.
    </description>
    <url>https://drasyl.org/</url>

    <properties>
        <!-- Skip tests by default; run only if -DskipTests=false is specified -->
        <skipTests>true</skipTests>
        <jmh.version>1.28</jmh.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-core</artifactId>
            <version>${jmh.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-generator-annprocess</artifactId>
            <version>${jmh.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>drasyl-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <!-- downgraded to 3.0.0-M4 because in 3.0.0-M5 STDOUT will only be printed after test is finished. This is annoying for long running tests (benchmarks) -->
                <version>3.0.0-M4</version>
                <configuration>
                    <includes>
                        <include>**/*Benchmark.java</include>
                    </includes>
                    <systemPropertyVariables>
                        <perfReportDir>${project.build.directory}/reports/performance/</perfReportDir>
                    </systemPropertyVariables>
                    <argLine>-Dio.netty.leakDetectionLevel=disabled</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
