<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements. See the NOTICE file distributed with this
  work for additional information regarding copyright ownership. The ASF
  licenses this file to You 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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>23</version>
  </parent>
  <groupId>org.apache.hugegraph</groupId>
  <artifactId>hugegraph-toolchain</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <name>${project.artifactId}</name>
  <description>hugegraph-toolchain is the integration project of a series of utilities for HugeGraph, it
        includes 4 main modules (loader/hubble/tools/client)</description>
  <url>https://github.com/apache/incubator-hugegraph-toolchain</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>Apache Hugegraph(Incubating)</id>
      <email>dev-subscribe@hugegraph.apache.org</email>
      <url>https://hugegraph.apache.org/</url>
    </developer>
  </developers>
  <mailingLists>
    <mailingList>
      <name>Developer List</name>
      <subscribe>dev-subscribe@hugegraph.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@hugegraph.apache.org</unsubscribe>
      <post>dev@hugegraph.incubator.apache.org</post>
    </mailingList>
    <mailingList>
      <name>Commits List</name>
      <subscribe>commits-subscribe@hugegraph.apache.org</subscribe>
      <unsubscribe>commits-unsubscribe@hugegraph.apache.org</unsubscribe>
      <post>commits@hugegraph.apache.org</post>
    </mailingList>
    <mailingList>
      <name>Issues List</name>
      <subscribe>issues-subscribe@hugegraph.apache.org</subscribe>
      <unsubscribe>issues-unsubscribe@hugegraph.apache.org</unsubscribe>
      <post>issues@hugegraph.apache.org</post>
    </mailingList>
  </mailingLists>
  <modules>
    <module>hugegraph-client</module>
    <module>hugegraph-loader</module>
    <module>hugegraph-tools</module>
    <module>hugegraph-hubble</module>
    <module>hugegraph-dist</module>
  </modules>
  <scm>
    <connection>scm:git:https://github.com/apache/hugegraph-toolchain.git</connection>
    <developerConnection>scm:git:https://github.com/apache/hugegraph-toolchain.git</developerConnection>
    <url>https://github.com/apache/hugegraph-toolchain</url>
  </scm>
  <issueManagement>
    <system>Github Issues</system>
    <url>https://github.com/apache/hugegraph-toolchain/issues</url>
  </issueManagement>
  <properties>
    <spark.version>3.2.2</spark.version>
    <assembly.static.dir>${assembly.dir}/static</assembly.static.dir>
    <scala.version>2.12</scala.version>
    <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
    <assembly.dir>${project.basedir}/assembly</assembly.dir>
    <docker.tag>${project.version}</docker.tag>
    <assembly.descriptor.dir>${assembly.dir}/descriptor</assembly.descriptor.dir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <hbase.version>2.2.3</hbase.version>
    <revision>1.0.0</revision>
    <release.name>${project.artifactId}</release.name>
    <docker.build.skip>true</docker.build.skip>
    <java.version>1.8</java.version>
    <compiler.source>1.8</compiler.source>
    <docker.hub>hugegraph</docker.hub>
    <shell-executable>bash</shell-executable>
    <docker.repo>${project.name}</docker.repo>
    <flink.scope>provided</flink.scope>
    <docker.push.skip>true</docker.push.skip>
    <flinkcdc.version>2.2.1</flinkcdc.version>
    <compiler.target>1.8</compiler.target>
    <spark.scope>provided</spark.scope>
    <flink.version>1.13.5</flink.version>
    <final.name>apache-${release.name}-incubating-${project.version}</final.name>
  </properties>
  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>staged-releases</id>
      <name>staged-releases</name>
      <url>https://repository.apache.org/content/groups/staging/</url>
    </repository>
  </repositories>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>${compiler.source}</source>
            <target>${compiler.target}</target>
            <encoding>${project.build.sourceEncoding}</encoding>
            <compilerArguments>
              <Xmaxerrs>500</Xmaxerrs>
            </compilerArguments>
            <compilerArgs>
              <arg>-Xlint:unchecked</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <configuration>
            <filesets>
              <fileset>
                <directory>${project.basedir}</directory>
                <includes>
                  <include>*.tar.gz</include>
                  <include>${final.name}/**</include>
                  <include>.flattened-pom.xml</include>
                </includes>
                <followSymlinks>false</followSymlinks>
              </fileset>
              <fileset>
                <directory>${final.name}</directory>
              </fileset>
            </filesets>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.19</version>
        <executions>
          <execution>
            <id>default-cli</id>
            <configuration>
              <acceptPomPackaging>true</acceptPomPackaging>
              <fileTemplate>/org/codehaus/mojo/license/third-party-file-groupByMultiLicense.ftl</fileTemplate>
              <licenseMerges>
                <licenseMerge>The Apache Software License, Version 2.0|The Apache
                                    License, Version 2.0</licenseMerge>
                <licenseMerge>The Apache Software License, Version 2.0|Apache
                                    License, Version 2.0</licenseMerge>
                <licenseMerge>The Apache Software License, Version 2.0|Apache Public
                                    License 2.0</licenseMerge>
                <licenseMerge>The Apache Software License, Version 2.0|Apache 2</licenseMerge>
                <licenseMerge>The Apache Software License, Version 2.0|Apache 2.0</licenseMerge>
                <licenseMerge>The Apache Software License, Version 2.0|Apache-2.0</licenseMerge>
                <licenseMerge>The Apache Software License, Version 2.0|Apache
                                    License 2.0</licenseMerge>
                <licenseMerge>The Apache Software License, Version 2.0|Apache
                                    License, version 2.0</licenseMerge>
                <licenseMerge>3-Clause BSD License|BSD 3-clause</licenseMerge>
                <licenseMerge>3-Clause BSD License|BSD 3-Clause</licenseMerge>
                <licenseMerge>Eclipse Public License v1.0|Eclipse Public License 1.0</licenseMerge>
                <licenseMerge>Eclipse Public License v1.0|Eclipse Public License - v
                                    1.0</licenseMerge>
                <licenseMerge>The MIT License|MIT License</licenseMerge>
              </licenseMerges>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.2</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>8.45</version>
          </dependency>
        </dependencies>
        <configuration>
          <configLocation>checkstyle.xml</configLocation>
          <encoding>UTF-8</encoding>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <linkXRef>false</linkXRef>
          <includeTestSourceDirectory>false</includeTestSourceDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*.versionsBackup</exclude>
            <exclude>**/*.log</exclude>
            <exclude>**/*.txt</exclude>
            <exclude>**/*.csv</exclude>
            <exclude>**/*.conf</exclude>
            <exclude>**/*.gitattributes</exclude>
            <exclude>dist/**/*</exclude>
            <exclude>docs/**/*</exclude>
            <exclude>scripts/dev/reviewers</exclude>
            <exclude>**/*.md</exclude>
            <exclude>**/logs/*.log</exclude>
            <exclude>**/target/*</exclude>
            <exclude>style/*</exclude>
            <exclude>ChangeLog</exclude>
            <exclude>CONFIG.ini</exclude>
            <exclude>GROUPS</exclude>
            <exclude>OWNERS</exclude>
            <exclude>DISCLAIMER</exclude>
            <exclude>**/*.json</exclude>
            <exclude>**/*.lock</exclude>
            <exclude>**/.prettierrc</exclude>
            <exclude>**/.stylelintrc</exclude>
            <exclude>**/check_server_status.feature</exclude>
            <exclude>**/file_with_empty_line</exclude>
            <exclude>**/file_without_empty_line</exclude>
            <exclude>node_modules/**/*</exclude>
            <exclude>**/*.svg</exclude>
            <exclude>.github/**/*</exclude>
            <exclude>**/*.iml</exclude>
            <exclude>**/*.iws</exclude>
            <exclude>**/*.ipr</exclude>
            <exclude>**/META-INF/MANIFEST.MF</exclude>
            <exclude>.repository/**</exclude>
            <exclude>**/.flattened-pom.xml</exclude>
          </excludes>
          <consoleOutput>true</consoleOutput>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.3.0</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>apache-release</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-source-plugin</artifactId>
              <executions>
                <execution>
                  <id>attach-sources</id>
                  <goals>
                    <goal>jar-no-fork</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
            <plugin>
              <artifactId>maven-javadoc-plugin</artifactId>
              <executions>
                <execution>
                  <id>attach-javadocs</id>
                  <goals>
                    <goal>jar</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <doclint>none</doclint>
                <failOnError>false</failOnError>
              </configuration>
            </plugin>
            <plugin>
              <artifactId>maven-gpg-plugin</artifactId>
              <executions>
                <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>sign</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <gpgArguments>
                  <arg>--pinentry-mode</arg>
                  <arg>loopback</arg>
                </gpgArguments>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
</project>
