<?xml version="1.0" encoding="UTF-8"?>
<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>pw.krejci</groupId>
    <artifactId>tracedepth-log4j2-plugin</artifactId>
    <version>0.1.0</version>

    <name>TraceDepth Log4j2 Plugin</name>
    <description>
        A simple Log4j2 plugin to visualize method the depth of the traceEntry() and traceExit() call pairs.
    </description>

    <url>https://github.com/metlos/tracedepth-log4j2-plugin</url>

    <properties>
        <version.log4j2>2.12.1</version.log4j2>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${version.log4j2}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${version.log4j2}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <releaseProfiles>release,release-profile</releaseProfiles>
                    <pushChanges>false</pushChanges>
                    <preparationGoals>clean verify</preparationGoals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <configuration>
                            <!-- compile everything to ensure module-info contains right entries -->
                            <release>9</release>
                        </configuration>
                    </execution>
                    <execution>
                        <id>base-compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <!-- recompile everything for target VM except the module-info.java -->
                        <configuration>
                            <excludes>
                                <exclude>module-info.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
                <!-- defaults for compile and testCompile -->
                <configuration>
                    <!-- Only required when JAVA_HOME isn't at least Java 9 and when haven't configured the maven-toolchains-plugin -->
                    <jdkToolchain>
                        <version>9</version>
                    </jdkToolchain>
                    <release>8</release>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <inceptionYear>2019</inceptionYear>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>Lukas Krejci</name>
        <url>http://lukas.krejci.pw</url>
    </organization>

    <developers>
        <developer>
            <name>Lukas Krejci</name>
            <email>lukas@krejci.pw</email>
            <url>http://lukas.krejci.pw</url>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <issueManagement>
        <system>github-issues</system>
        <url>https://github.com/metlos/tracedepth-log4j2-plugin/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com/metlos/tracedepth-log4j2-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/metlos/tracedepth-log4j2-plugin.git</developerConnection>
        <url>https://github.com/metlos/tracedepth-log4j2-plugin</url>
        <tag>tracedepth-log4j2-plugin-0.1.0</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
