<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2022 The graph-support project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~  http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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.graphper</groupId>
  <artifactId>graph-support</artifactId>
  <version>1.5.2</version>
  <packaging>pom</packaging>

  <name>${project.artifactId}</name>
  <description>Java re-implementation of tiny graphviz</description>
  <url>https://github.com/jamisonjiang/graph-support</url>

  <modules>
    <module>core</module>
    <module>dot</module>
    <module>test</module>
    <module>cli</module>
  </modules>

  <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>

  <developers>
    <developer>
      <name>Jamison Jiang</name>
      <email>jamisongo01.jiang@gmail.com</email>
      <organization>Jamison Jiang</organization>
      <organizationUrl>https://github.com/jamisonjiang</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/jamisonjiang/graph-support</connection>
    <developerConnection>scm:git:https://github.com/jamisonjiang/graph-support</developerConnection>
    <url>https://github.com/jamisonjiang/graph-support</url>
    <tag>v1.5.2</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>central</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>central</id>
      <url>https://central.sonatype.com/repository/maven-releases/</url>
    </repository>
  </distributionManagement>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/jamisonjiang/graph-support/issues</url>
  </issueManagement>

  <properties>
    <java-version>1.8</java-version>
    <mvn-command-version>3.6.0</mvn-command-version>
    <encoder-type>UTF-8</encoder-type>
    <javadoc-version>3.2.0</javadoc-version>
    <source-version>2.2.1</source-version>
    <batik-version>1.9</batik-version>
    <fop-version>2.4</fop-version>
    <slf4j-version>1.7.32</slf4j-version>
    <junit-version>4.13.2</junit-version>
    <junit-param-version>5.8.2</junit-param-version>
    <assembly-version>2.4.1</assembly-version>
    <gpg-version>1.6</gpg-version>
    <sonatype-version>0.8.0</sonatype-version>
    <log4j-version>1.8.0-alpha2</log4j-version>
    <org.antlr-version>4.13.2</org.antlr-version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-version}</version>
      </dependency>
      <!-- test dependencies -->
      <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>batik-codec</artifactId>
        <version>${batik-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>batik-transcoder</artifactId>
        <version>${batik-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>fop</artifactId>
        <version>${fop-version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${log4j-version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${junit-param-version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit-param-version}</version>
      </dependency>
      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-runtime</artifactId>
        <version>${org.antlr-version}</version>
      </dependency>
    </dependencies>

  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${mvn-command-version}</version>
        <configuration>
          <source>${java-version}</source>
          <target>${java-version}</target>
          <encoding>${encoder-type}</encoding>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc-version}</version>
        <configuration>
          <charset>${encoder-type}</charset>
          <encoding>${encoder-type}</encoding>
          <docencoding>${encoder-type}</docencoding>
          <additionalOptions>
            <additionalOption>-Xdoclint:none</additionalOption>
            <additionalOption>-quiet</additionalOption> <!-- Optional: Suppress other warnings -->
          </additionalOptions>
        </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>${gpg-version}</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-source-plugin</artifactId>
        <version>${source-version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M4</version>
        <dependencies>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-param-version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${sonatype-version}</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
          <waitUntil>published</waitUntil>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${assembly-version}</version>
      </plugin>
    </plugins>
  </build>
</project>