<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>net.kawinski.logging</groupId>
    <artifactId>nktrace</artifactId>
    <!-- Add "-SNAPSHOT" for "nightly builds" -->
    <!-- TODO: Automatic 'build' increment -->
    <version>1.0.1.1</version>
    <packaging>jar</packaging>

    <name>NkTrace</name>
    <description>More readable logs with indentation</description>
    <url>https://github.com/NorbertKawinski/NkTrace</url>

    <organization>
        <name>net.kawinski</name>
        <url>https://github.com/NorbertKawinski</url>
    </organization>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/NorbertKawinski/NkTrace/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/NorbertKawinski/NkTrace/blob/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/NorbertKawinski/NkTrace</url>
        <connection>scm:git:git://github.com/NorbertKawinski/NkTrace.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:NorbertKawinski/NkTrace.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <name>Norbert Kawiński</name>
            <email>norbert@kawinski.net</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>
        <!-- Our base API we're conforming to -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.0-alpha1</version>
            <scope>compile</scope>
        </dependency>

        <!-- For automatic testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13</version>
            <scope>test</scope>
        </dependency>
        <!-- NkTrace isn't a standalone.
        We need to specify actual logging framework for integration tests -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.3.0-alpha5</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <!-- Provides 'mvn deploy' command -->
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Maybe I'll use this someday for automatic release flow on GIT -->
<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-release-plugin</artifactId>-->
<!--                <version>2.5.3</version>-->
<!--                <configuration>-->
<!--                    <localCheckout>true</localCheckout>-->
<!--                    <pushChanges>false</pushChanges>-->
<!--                    <mavenExecutorId>forked-path</mavenExecutorId>-->
<!--                    <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>-->
<!--                </configuration>-->
<!--                <dependencies>-->
<!--                    <dependency>-->
<!--                        <groupId>org.apache.maven.scm</groupId>-->
<!--                        <artifactId>maven-scm-provider-gitexe</artifactId>-->
<!--                        <version>1.9.5</version>-->
<!--                    </dependency>-->
<!--                </dependencies>-->
<!--            </plugin>-->

            <!-- Maybe I'll use this someday for automatic release of deployed artifacts on Nexus -->
<!--            <plugin>-->
<!--                <groupId>org.sonatype.plugins</groupId>-->
<!--                <artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--                <version>1.6.7</version>-->
<!--                <extensions>true</extensions>-->
<!--                <configuration>-->
<!--                    <serverId>ossrh</serverId>-->
<!--                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>-->
<!--                    <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
<!--                </configuration>-->
<!--            </plugin>-->

            <!-- Generates "-sources" .jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Generates "-javadoc" .jar for documentation purposes -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Signs the artifacts with our GPG key -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <!-- TODO: Create profile with "-sources", "-javadoc" and signing to speed up the base build time where we don't need to push the artifacts
        See section "Using a Profile": https://central.sonatype.org/pages/apache-maven.html -->
    </profiles>
</project>