<?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>org.leadpony.justify</groupId>
    <artifactId>justify-parent</artifactId>
    <version>2.0.0</version>
    <packaging>pom</packaging>
    <name>org.leadpony.justify.parent</name>

    <description>
    Justify is a JSON validator based on the JSON Schema specification
    and the JSON Processing API.
    </description>

    <modules>
        <module>justify</module>
        <module>justify-tests</module>
        <module>justify-cli</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jsonp.version>1.1.6</jsonp.version>
        <jsonb.version>1.0.2</jsonb.version>
        <junit.version>5.5.2</junit.version>
        <test.log.level>OFF</test.log.level>
        <jsonp.provider.groupId>org.glassfish</jsonp.provider.groupId>
        <jsonp.provider.artifactId>jakarta.json</jsonp.provider.artifactId>
        <jsonp.provider.version>${jsonp.version}</jsonp.provider.version>
        <jsonp.provider.classifier>module</jsonp.provider.classifier>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.ibm.icu</groupId>
                <artifactId>icu4j</artifactId>
                <version>65.1</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.14.0</version>
            </dependency>
            <dependency>
                <groupId>jakarta.json</groupId>
                <artifactId>jakarta.json-api</artifactId>
                <version>${jsonp.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.json</artifactId>
                <version>${jsonp.version}</version>
                <classifier>module</classifier>
            </dependency>
            <dependency>
                <groupId>org.leadpony.joy</groupId>
                <artifactId>joy</artifactId>
                <version>1.2.0</version>
            </dependency>
            <dependency>
                <groupId>jakarta.json.bind</groupId>
                <artifactId>jakarta.json.bind-api</artifactId>
                <version>${jsonb.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse</groupId>
                <artifactId>yasson</artifactId>
                <version>1.0.5</version>
            </dependency>
            <dependency>
                <groupId>org.fusesource.jansi</groupId>
                <artifactId>jansi</artifactId>
                <version>1.18</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>9.4.23.v20191118</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <configLocation>../checkstyle.xml</configLocation>
                        <excludes>**/module-info.java</excludes>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <includeTestResources>true</includeTestResources>
                    </configuration>
                    <executions>
                        <execution>
                            <id>checkstyle</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <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>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <archive>
                            <manifestEntries>
                                <Automatic-Module-Name>${project.name}</Automatic-Module-Name>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <docencoding>UTF-8</docencoding>
                        <charset>UTF-8</charset>
                        <additionalJOptions>
                            <!-- -locale option does not work -->
                            <additionalJOption>-J-Duser.language=en</additionalJOption>
                            <additionalJOption>-html5</additionalJOption>
                        </additionalJOptions>
                        <detectJavaApiLink>false</detectJavaApiLink>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadoc</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M3</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>verbose</id>
            <properties>
                <test.log.level>FINE</test.log.level>
            </properties>
        </profile>
        <profile>
            <id>test-with-johnzon</id>
            <properties>
                <jsonp.provider.groupId>org.apache.johnzon</jsonp.provider.groupId>
                <jsonp.provider.artifactId>johnzon-core</jsonp.provider.artifactId>
                <jsonp.provider.version>1.2.1</jsonp.provider.version>
                <jsonp.provider.classifier></jsonp.provider.classifier>
            </properties>
        </profile>
        <profile>
            <id>test-with-joy</id>
            <properties>
                <jsonp.provider.groupId>org.leadpony.joy</jsonp.provider.groupId>
                <jsonp.provider.artifactId>joy</jsonp.provider.artifactId>
                <jsonp.provider.version>1.2.0</jsonp.provider.version>
                <jsonp.provider.classifier></jsonp.provider.classifier>
            </properties>
        </profile>
    </profiles>

    <!-- project information  -->

    <url>https://github.com/leadpony/justify</url>
    <inceptionYear>2018</inceptionYear>

    <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>

    <scm>
        <connection>scm:git:https://github.com/leadpony/justify.git</connection>
        <developerConnection>scm:git:git@github.com:leadpony/justify.git</developerConnection>
        <url>https://github.com/leadpony/justify</url>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/leadpony/justify/issues</url>
    </issueManagement>

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

    <developers>
        <developer>
            <id>leadpony</id>
            <name>leadpony</name>
        </developer>
    </developers>

</project>
