<?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>io.soabase.maple</groupId>
    <artifactId>maple-parent</artifactId>
    <packaging>pom</packaging>
    <version>3.1</version>
    <modules>
        <module>maple-core</module>
        <module>maple-slf4j</module>
        <module>maple-benchmarks</module>
        <module>maple-examples</module>
        <module>maple-airlift</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <jdk-version>1.8</jdk-version>

        <maven-compiler-plugin-version>3.8.1</maven-compiler-plugin-version>
        <maven-source-plugin-version>3.1.0</maven-source-plugin-version>
        <maven-license-plugin-version>1.9.0</maven-license-plugin-version>
        <maven-javadoc-plugin-version>3.1.1</maven-javadoc-plugin-version>
        <maven-gpg-plugin-version>1.6</maven-gpg-plugin-version>
        <maven-release-plugin-version>2.5.3</maven-release-plugin-version>
        <maven-deploy-plugin-version>3.0.0-M1</maven-deploy-plugin-version>
        <maven-install-plugin-version>3.0.0-M1</maven-install-plugin-version>
        <exec-maven-plugin-version>1.6.0</exec-maven-plugin-version>
        <maven-pmd-plugin-version>3.12.0</maven-pmd-plugin-version>
        <dependency-check-maven-version>6.0.3</dependency-check-maven-version>

        <byte-buddy-version>1.10.22</byte-buddy-version>
        <jackson-version>2.10.0</jackson-version>
        <slf4j-version>1.7.26</slf4j-version>
        <junit-version>5.5.2</junit-version>
        <assertj-version>3.13.2</assertj-version>
        <jmh-version>1.21</jmh-version>
        <logback-version>1.2.3</logback-version>
        <airlift-version>0.187</airlift-version>
    </properties>

    <name>Maple</name>
    <description>Structured Logging Facade for Java</description>
    <url>https://github.com/Randgalt/maple.git</url>
    <inceptionYear>2019</inceptionYear>

    <organization>
        <name>Jordan Zimmerman</name>
        <url>https://github.com/Randgalt</url>
    </organization>

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

    <developers>
        <developer>
            <name>Jordan Zimmerman</name>
            <email>jordan@jordanzimmerman.com</email>
            <timezone>-5</timezone>
            <url>https://github.com/Randgalt/</url>
            <roles>
                <role>Author</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/Randgalt/maple</url>
        <connection>scm:git:https://github.com/Randgalt/maple.git</connection>
        <developerConnection>scm:git:git@github.com:Randgalt/maple.git</developerConnection>
        <tag>maple-3.1</tag>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/Randgalt/maple/issues</url>
    </issueManagement>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus Staging</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.soabase.maple</groupId>
                <artifactId>maple-core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.soabase.maple</groupId>
                <artifactId>maple-slf4j</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${byte-buddy-version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson-version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-version}</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback-version}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit-version}</version>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-version}</version>
            </dependency>

            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>${jmh-version}</version>
            </dependency>

            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-generator-annprocess</artifactId>
                <version>${jmh-version}</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>log</artifactId>
                <version>${airlift-version}</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>log-manager</artifactId>
                <version>${airlift-version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-jdk14</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>log4j-over-slf4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>jcl-over-slf4j</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin-version}</version>
                    <configuration>
                        <source>${jdk-version}</source>
                        <target>${jdk-version}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin-version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <version>${maven-license-plugin-version}</version>
                    <configuration>
                        <header>src/etc/header.txt</header>
                        <excludes>
                            <exclude>**/.gitignore</exclude>
                            <exclude>**/.travis.yml</exclude>
                            <exclude>**/*.json</exclude>
                            <exclude>**/*.md</exclude>
                            <exclude>**/.idea/**</exclude>
                            <exclude>**/DISCLAIMER</exclude>
                            <exclude>**/DEPENDENCIES</exclude>
                            <exclude>**/KEYS</exclude>
                            <exclude>**/LICENSE</exclude>
                            <exclude>**/NOTICE</exclude>
                            <exclude>**/README</exclude>
                            <exclude>**/CHANGES</exclude>
                            <exclude>**/RELEASE-NOTES</exclude>
                            <exclude>**/generated/**</exclude>
                        </excludes>
                        <strictCheck>true</strictCheck>
                    </configuration>
                    <executions>
                        <execution>
                            <id>license</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>validate</phase>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin-version}</version>
                    <configuration>
                        <failOnError>false</failOnError>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin-version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin-version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin-version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven-release-plugin-version}</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <tagNameFormat>maple-@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin-version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${maven-pmd-plugin-version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>verify</phase>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${dependency-check-maven-version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>verify</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>oss</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                            <useAgent>true</useAgent>
                        </configuration>
                        <executions>
                            <execution>
                                <id>gpg</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
