<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.jkoolcloud</groupId>
    <artifactId>tnt4j</artifactId>
    <version>2.14</version>
    <packaging>pom</packaging>

    <name>tnt4j</name>
    <url>https://github.com/Nastel/TNT4J</url>
    <description>Streaming, Tracking and Logging API</description>
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <organization>
        <name>jKool, LLC</name>
        <url>https://www.jkoolcloud.com/</url>
    </organization>
    <developers>
        <developer>
            <name>jKool Team</name>
            <email>support@jkoolcloud.com</email>
            <organization>jKool</organization>
            <organizationUrl>http://www.jkoolcloud.com</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/Nastel/TNT4J</connection>
        <developerConnection>scm:git:git//github.com/Nastel/TNT4J</developerConnection>
        <url>https://github.com/Nastel/TNT4j</url>
    </scm>
    <distributionManagement>
        <repository>
            <id>bintray-amavashev2-jkoolcloud</id>
            <name>amavashev2-jkoolcloud</name>
            <url>https://api.bintray.com/maven/amavashev2/jkoolcloud/tnt4j/;publish=1;override=1</url>
        </repository>
    </distributionManagement>

    <properties>
        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.resources.encoding>UTF-8</project.resources.encoding>
        <product.vendor>${project.organization.name}</product.vendor>
        <product.name>${project.name}</product.name>
        <product.name.hr>TNT4J</product.name.hr>
        <product.copyright.html>
            <![CDATA[<font size="-1">Copyright &#169; 2014-2020 ${project.organization.name}. All Rights Reserved.</font>]]></product.copyright.html>

        <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>
        <java.compiler.fork>false</java.compiler.fork>

        <skip.source.pack>true</skip.source.pack>
        <skip.javadoc.pack>true</skip.javadoc.pack>
        <skip.assembly.pack>true</skip.assembly.pack>
        <skip.gpg.sign>true</skip.gpg.sign>
    </properties>

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

    <build>
        <defaultGoal>clean install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <archive>
                        <!--<index>true</index>-->
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        <manifest>
                            <addClasspath>true</addClasspath>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Vendor>${product.vendor}</Implementation-Vendor>
                            <Implementation-Title>${project.name}</Implementation-Title>
                            <Implementation-Version>${project.version}-${maven.build.timestamp}</Implementation-Version>
                            <Premain-Class>com.jkoolcloud.tnt4j.utils.SizeOf</Premain-Class>
                            <X-Compile-Source-JDK>${java.source.version}</X-Compile-Source-JDK>
                            <X-Compile-Target-JDK>${java.target.version}</X-Compile-Target-JDK>
                        </manifestEntries>
                    </archive>
                </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>
                    <fork>${java.compiler.fork}</fork>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <encoding>${project.resources.encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <skipSource>${skip.source.pack}</skipSource>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <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>
                    <skip>${skip.javadoc.pack}</skip>
                </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>
                    <skip>${skip.gpg.sign}</skip>
                </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>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>tnt4j-core</module>
        <module>tnt4j-kafka-sink</module>
        <module>tnt4j-mqtt-sink</module>
        <module>tnt4j--distribution</module>
    </modules>
</project>