<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2020-2022, K2N.IO.
  ~
  ~ This library 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 2.1 of the License, or (at your option) any later version.
  ~
  ~ This library 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 this library; if not, write to the Free Software
  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  ~
  -->

<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.gocypher.cybench.client</groupId>
    <artifactId>gocypher-cybench-client</artifactId>
    <version>1.3.2</version>
    <packaging>pom</packaging>

    <name>gocypher-cybench-client</name>

    <url>https://github.com/K2NIO/gocypher-cybench-java</url>
    <description>CyBench Launcher is a Java module designed to execute JMH benchmarks, collect results, add environment
        properties, build report and store it into external repository for further analysis.
    </description>
    <licenses>
        <license>
            <name>GNU Lesser General Public License v2.1</name>
            <url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
        </license>
    </licenses>
    <organization>
        <name>K2N.IO</name>
        <url>https://cybench.io</url>
    </organization>
    <developers>
        <developer>
            <name>CyBench Team</name>
            <email>info@cybench.io</email>
            <organization>K2N.IO</organization>
            <organizationUrl>https://cybench.io</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/K2NIO/gocypher-cybench-java</connection>
        <developerConnection>scm:git:git//github.com/K2NIO/gocypher-cybench-java</developerConnection>
        <url>https://github.com/K2NIO/gocypher-cybench-java</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>oss.sonatype.org</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>oss.sonatype.org</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.resources.encoding>UTF-8</project.resources.encoding>
        <project.java.version>1.8</project.java.version>
        <java.source.version>${project.java.version}</java.source.version>
        <java.target.version>${project.java.version}</java.target.version>
        <java.compiler.version>${project.java.version}</java.compiler.version>
        <java.compiler.debuglevel>source,lines,vars</java.compiler.debuglevel>
        <java.compiler.verbose>false</java.compiler.verbose>
        <license-name>CYBENCH_LICENSE*</license-name>
        <uberjar.name>gocypher-cybench-client</uberjar.name>
        <product.name.hr>CyBench-client</product.name.hr>
        <product.copyright.html>
            <![CDATA[<font size="-1">Copyright &#169; 2014-2022 ${project.organization.name}. All Rights Reserved.</font>]]>
        </product.copyright.html>

        <maven.source.skip>true</maven.source.skip>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <assembly.skipAssembly>true</assembly.skipAssembly>
        <gpg.skip>true</gpg.skip>

        <jmh.version>1.34</jmh.version>
        <jackson.version>2.13.1</jackson.version>
        <org.slf4j.version>1.7.35</org.slf4j.version>
        <log4j.version>2.17.1</log4j.version>
        <disruptor.version>3.4.4</disruptor.version>
        <httpclient.version>4.5.13</httpclient.version>
        <commons.lang3.version>3.12.0</commons.lang3.version>
        <junit.version>5.8.2</junit.version>
    </properties>

    <modules>
        <module>gocypher-cybench-runner</module>
        <module>gocypher-cybench-core</module>
        <module>gocypher-cybench-annotations</module>
        <module>gocypher-cybench-comparator</module>
    </modules>

    <profiles>
        <profile>
            <id>pack-bin</id>
            <properties>
                <assembly.skipAssembly>false</assembly.skipAssembly>
            </properties>
        </profile>
        <profile>
            <id>pack-all</id>
            <properties>
                <maven.source.skip>false</maven.source.skip>
                <maven.javadoc.skip>false</maven.javadoc.skip>
                <assembly.skipAssembly>false</assembly.skipAssembly>
            </properties>
        </profile>
        <profile>
            <id>pack-maven</id>
            <properties>
                <maven.source.skip>false</maven.source.skip>
                <maven.javadoc.skip>false</maven.javadoc.skip>
            </properties>
        </profile>
        <profile>
            <id>maven-release</id>
            <properties>
                <maven.source.skip>false</maven.source.skip>
                <maven.javadoc.skip>false</maven.javadoc.skip>
                <gpg.skip>false</gpg.skip>
            </properties>
        </profile>
    </profiles>

    <build>
        <defaultGoal>clean install</defaultGoal>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>../</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>${license-name}</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <inherited>true</inherited>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <verbose>${java.compiler.verbose}</verbose>
                    <compilerVersion>${java.compiler.version}</compilerVersion>
                    <source>${java.source.version}</source>
                    <target>${java.target.version}</target>
                    <debuglevel>${java.compiler.debuglevel}</debuglevel>
                </configuration>
            </plugin>
            <!-- Attach source jars-->
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <doctitle>${product.name.hr}</doctitle>
                    <windowtitle>${product.name.hr}</windowtitle>
                    <header>Version ${project.version}</header>
                    <bottom>${product.copyright.html}</bottom>
                    <show>protected</show>
                    <use>true</use>
                    <notree>false</notree>
                    <nonavbar>false</nonavbar>
                    <noindex>false</noindex>
                    <splitindex>true</splitindex>
                    <author>true</author>
                    <version>true</version>
                    <nodeprecatedlist>false</nodeprecatedlist>
                    <nodeprecated>false</nodeprecated>
                    <failOnError>false</failOnError>
                    <doclint>all</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>build-javadocs-module</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <gpgArguments>
                        <arg>--pinentry-mode</arg>
                        <arg>loopback</arg>
                    </gpgArguments>
                    <keyname>${gpg.keyname}</keyname>
                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>oss.sonatype.org</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
                <executions>
                    <execution>
                        <id>deploy-to-sonatype</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                            <!--<goal>release</goal>-->
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
