<?xml version="1.0" encoding="UTF-8"?>
<!--
  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.apache.gluten</groupId>
  <artifactId>gluten-parent</artifactId>
  <version>1.3.0</version>
  <packaging>pom</packaging>

  <name>Gluten Parent Pom</name>
  <url>https://github.com/apache/incubator-gluten.git</url>
  <description>Apache Gluten(incubating)</description>

  <organization>
    <name>Apache</name>
    <url>http://gluten.apache.org</url>
  </organization>

  <scm>
    <connection>scm:git:git://github.com/apache/incubator-gluten.git</connection>
    <developerConnection>scm:git:ssh://github.com:apache/incubator-gluten.git</developerConnection>
    <url>http://github.com/apache/incubator-gluten/tree/main</url>
  </scm>

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

  <modules>
    <module>gluten-core</module>
    <module>gluten-substrait</module>
    <module>gluten-ui</module>
    <module>package</module>
    <module>shims</module>
    <module>gluten-ras</module>
  </modules>

  <properties>
    <java.version>1.8</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <caffeine.version>2.9.3</caffeine.version>
    <scala.binary.version>2.12</scala.binary.version>
    <scala.version>2.12.15</scala.version>
    <spark.major.version>3</spark.major.version>
    <sparkbundle.version>3.4</sparkbundle.version>
    <spark.version>3.4.3</spark.version>
    <sparkshim.artifactId>spark-sql-columnar-shims-spark34</sparkshim.artifactId>
    <iceberg.version>1.5.0</iceberg.version>
    <delta.package.name>delta-core</delta.package.name>
    <delta.version>2.4.0</delta.version>
    <delta.binary.version>24</delta.binary.version>
    <celeborn.version>0.5.2</celeborn.version>
    <uniffle.version>0.9.1</uniffle.version>
    <arrow.version>15.0.0</arrow.version>
    <arrow-gluten.version>15.0.0-gluten</arrow-gluten.version>
    <arrow-memory.artifact>arrow-memory-unsafe</arrow-memory.artifact>
    <hadoop.version>2.7.4</hadoop.version>
    <slf4j.version>2.0.7</slf4j.version>
    <log4j.version>2.20.0</log4j.version>
    <antlr4.version>4.9.3</antlr4.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.prefix>spark-sql-columnar</project.prefix>
    <jar.assembly.name.prefix>gluten</jar.assembly.name.prefix>
    <os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version>
    <!-- To build built-in backend c++ codes -->
    <scala.recompile.mode>all</scala.recompile.mode>
    <!-- For unit tests -->
    <clickhouse.lib.path>/usr/local/clickhouse/lib/libch.so</clickhouse.lib.path>
    <tpcds.data.path>/data/tpcds-data-sf1</tpcds.data.path>
    <fasterxml.version>2.13.5</fasterxml.version>
    <junit.version>4.13.1</junit.version>

    <!-- Package name to use when relocating shaded classes -->
    <gluten.shade.packageName>org.apache.gluten.shaded</gluten.shade.packageName>

    <!-- The original protobuf version -->
    <protobuf.version>3.23.4</protobuf.version>
    <!-- The custom protobuf version (based on 3.23.4) with recursion limit enlarged. -->
    <custom.protobuf.version>3.23.4-0</custom.protobuf.version>
    <guava.version>32.0.1-jre</guava.version>
    <!--spotless-->
    <spotless.version>2.27.2</spotless.version>
    <spotless.scalafmt.version>3.8.3</spotless.scalafmt.version>
    <spotless.delimiter>package</spotless.delimiter>
    <spotless.license.header>
/*
 * 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.
 */
    </spotless.license.header>

    <!-- plugin version-->
    <build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
    <scala.compiler.version>4.8.0</scala.compiler.version>
    <maven.compiler.plugin>3.12.1</maven.compiler.plugin>
    <maven.jar.plugin>3.2.2</maven.jar.plugin>
    <scalastyle.version>1.0.0</scalastyle.version>
    <scalatest-maven-plugin.version>2.2.0</scalatest-maven-plugin.version>
    <argLine/> <!-- Required since there is extensive setting of spark home through argLine-->
    <extraJavaTestArgs>
      -XX:+IgnoreUnrecognizedVMOptions <!-- For compatibility with java 8 and 11-->
      --add-opens=java.base/java.lang=ALL-UNNAMED
      --add-opens=java.base/java.lang.invoke=ALL-UNNAMED
      --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
      --add-opens=java.base/java.io=ALL-UNNAMED
      --add-opens=java.base/java.net=ALL-UNNAMED
      --add-opens=java.base/java.nio=ALL-UNNAMED
      --add-opens=java.base/java.util=ALL-UNNAMED
      --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
      --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
      --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
      --add-opens=java.base/sun.nio.ch=ALL-UNNAMED
      --add-opens=java.base/sun.nio.cs=ALL-UNNAMED
      --add-opens=java.base/sun.security.action=ALL-UNNAMED
      --add-opens=java.base/sun.util.calendar=ALL-UNNAMED
      -Djdk.reflect.useDirectMethodHandle=false
      -Dio.netty.tryReflectionSetAccessible=true
    </extraJavaTestArgs>
  </properties>

  <profiles>
    <profile>
      <id>scala-2.12</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <!--
         SPARK-34774 Add this property to ensure change-scala-version.sh can replace the public `scala.version`
         property correctly.
        -->
        <scala.version>2.12.15</scala.version>
        <scala.binary.version>2.12</scala.binary.version>
      </properties>
    </profile>
    <profile>
      <id>scala-2.13</id>
      <properties>
        <scala.version>2.13.8</scala.version>
        <scala.binary.version>2.13</scala.binary.version>
        <spotless.scalafmt.version>3.8.3</spotless.scalafmt.version>
      </properties>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>net.alchim31.maven</groupId>
              <artifactId>scala-maven-plugin</artifactId>
              <configuration>
                <!-- TODO: Fix the plugin scalawarts to support scala 2.13 in IDEA
                <compilerPlugins>
                  <compilerPlugin>
                    <groupId>org.wartremover</groupId>
                    <artifactId>wartremover_${scala.binary.version}</artifactId>
                    <version>3.1.6</version>
                  </compilerPlugin>
                </compilerPlugins>
                <dependencies>
                  <dependency>
                    <groupId>io.github.zhztheplayer.scalawarts</groupId>
                    <artifactId>scalawarts_${scala.binary.version}</artifactId>
                    <version>0.1.2</version>
                  </dependency>
                </dependencies> -->
                <recompileMode>${scala.recompile.mode}</recompileMode>
                <args>
                  <arg>-unchecked</arg>
                  <arg>-deprecation</arg>
                  <arg>-feature</arg>
                  <arg>-explaintypes</arg>
                  <arg>-target:jvm-1.8</arg>
                  <arg>-Wconf:cat=deprecation:wv,any:e</arg>
                  <arg>-Wunused:imports</arg>
                  <!--
                    TODO(SPARK-33805): Undo the corresponding deprecated usage suppression rule after fixed
                  -->
                  <arg>-Wconf:cat=scaladoc:wv</arg>
                  <arg>-Wconf:cat=lint-multiarg-infix:wv</arg>
                  <arg>-Wconf:cat=other-nullary-override:wv</arg>
                  <!--
                    SPARK-33775 Suppress compilation warnings that contain the following contents.
                    TODO(SPARK-33805): Undo the corresponding deprecated usage suppression rule after fixed.
                  -->
                  <arg>-Wconf:msg=^(?=.*?method|value|type|object|trait|inheritance)(?=.*?deprecated)(?=.*?since 2.13).+$:s</arg>
                  <arg>-Wconf:msg=^(?=.*?Widening conversion from)(?=.*?is deprecated because it loses precision).+$:s</arg>
                  <arg>-Wconf:msg=Auto-application to \`\(\)\` is deprecated:s</arg>
                  <arg>-Wconf:msg=method with a single empty parameter list overrides method without any parameter list:s</arg>
                  <arg>-Wconf:msg=method without a parameter list overrides a method with a single empty one:s</arg>
                  <!--
                    SPARK-35574 Prevent the recurrence of compilation warnings related to
                    `procedure syntax is deprecated`
                  -->
                  <arg>-Wconf:cat=deprecation&amp;msg=procedure syntax is deprecated:e</arg>
                  <!--
                    SPARK-35496 Upgrade Scala to 2.13.7 and suppress:
                    1. `The outer reference in this type test cannot be checked at run time`
                    2. `the type test for pattern TypeA cannot be checked at runtime because it
                     has type parameters eliminated by erasure`
                    3. `abstract type TypeA in type pattern Seq[TypeA] (the underlying of
                    Seq[TypeA]) is unchecked since it is eliminated by erasure`
                    4. `fruitless type test: a value of TypeA cannot also be a TypeB`
                  -->
                  <arg>-Wconf:cat=unchecked&amp;msg=outer reference:s</arg>
                  <arg>-Wconf:cat=unchecked&amp;msg=eliminated by erasure:s</arg>
                  <arg>-Wconf:msg=^(?=.*?a value of type)(?=.*?cannot also be).+$:s</arg>
                  <!--
                  <arg>-P:wartremover:traverser:io.github.zhztheplayer.scalawarts.InheritFromCaseClass</arg>
                  -->
                </args>
              </configuration>
              <executions>
                <execution>
                  <id>scala-compile-first</id>
                  <phase>process-resources</phase>
                  <goals>
                    <goal>add-source</goal>
                    <goal>compile</goal>
                  </goals>
                </execution>
                <execution>
                  <id>scala-test-compile-first</id>
                  <phase>process-test-resources</phase>
                  <goals>
                    <goal>testCompile</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>java-8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <java.version>1.8</java.version>
      </properties>
    </profile>
    <profile>
      <id>java-11</id>
      <activation>
        <jdk>11</jdk>
      </activation>
      <properties>
        <java.version>11</java.version>
        <caffeine.version>3.1.8</caffeine.version>
      </properties>
    </profile>
    <profile>
      <id>java-17</id>
      <activation>
        <jdk>17</jdk>
      </activation>
      <properties>
        <java.version>17</java.version>
        <caffeine.version>3.1.8</caffeine.version>
      </properties>
    </profile>
    <profile>
      <id>spark-3.2</id>
      <properties>
        <sparkbundle.version>3.2</sparkbundle.version>
        <sparkshim.artifactId>spark-sql-columnar-shims-spark32</sparkshim.artifactId>
        <spark.version>3.2.2</spark.version>
        <iceberg.version>1.3.1</iceberg.version>
        <delta.package.name>delta-core</delta.package.name>
        <delta.version>2.0.1</delta.version>
        <delta.binary.version>20</delta.binary.version>
        <antlr4.version>4.8</antlr4.version>
        <hudi.version>0.15.0</hudi.version>
      </properties>
    </profile>
    <profile>
      <id>spark-3.3</id>
      <properties>
        <sparkbundle.version>3.3</sparkbundle.version>
        <sparkshim.artifactId>spark-sql-columnar-shims-spark33</sparkshim.artifactId>
        <spark.version>3.3.1</spark.version>
        <!-- keep using iceberg v1.3.1 for parquet compatibilty. -->
        <iceberg.version>1.3.1</iceberg.version>
        <delta.package.name>delta-core</delta.package.name>
        <delta.version>2.3.0</delta.version>
        <delta.binary.version>23</delta.binary.version>
        <antlr4.version>4.8</antlr4.version>
        <hudi.version>0.15.0</hudi.version>
      </properties>
    </profile>
    <profile>
      <id>spark-3.4</id>
      <properties>
        <sparkbundle.version>3.4</sparkbundle.version>
        <sparkshim.artifactId>spark-sql-columnar-shims-spark34</sparkshim.artifactId>
        <spark.version>3.4.3</spark.version>
        <iceberg.version>1.5.0</iceberg.version>
        <delta.package.name>delta-core</delta.package.name>
        <delta.version>2.4.0</delta.version>
        <delta.binary.version>24</delta.binary.version>
        <antlr4.version>4.9.3</antlr4.version>
        <hudi.version>0.15.0</hudi.version>
      </properties>
    </profile>
    <profile>
      <id>spark-3.5</id>
      <properties>
        <sparkbundle.version>3.5</sparkbundle.version>
        <sparkshim.artifactId>spark-sql-columnar-shims-spark35</sparkshim.artifactId>
        <spark.version>3.5.1</spark.version>
        <iceberg.version>1.5.0</iceberg.version>
        <delta.package.name>delta-spark</delta.package.name>
        <delta.version>3.2.0</delta.version>
        <delta.binary.version>32</delta.binary.version>
        <hudi.version>0.15.0</hudi.version>
        <fasterxml.version>2.15.1</fasterxml.version>
        <hadoop.version>3.3.4</hadoop.version>
        <antlr4.version>4.9.3</antlr4.version>
      </properties>
      <dependencies>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
          <version>${slf4j.version}</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-slf4j2-impl</artifactId>
          <version>${log4j.version}</version>
          <scope>provided</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>hadoop-2.7.4</id>
      <properties>
        <hadoop.version>2.7.4</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>hadoop-3.2</id>
      <properties>
        <hadoop.version>3.2.0</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>hadoop-3.3</id>
      <properties>
        <hadoop.version>3.3.1</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>dataproc-2.2</id>
      <properties>
        <hadoop.version>3.3.6</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>emr-6.3.0</id>
      <properties>
        <hadoop.version>3.2.2</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>arrow-netty</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <id>arrow-netty</id>
        <arrow-memory.artifact>arrow-memory-netty</arrow-memory.artifact>
      </properties>
    </profile>

    <profile>
      <id>backends-clickhouse</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>backends-clickhouse</module>
      </modules>
      <properties>
        <backend_type>clickhouse</backend_type>
      </properties>
    </profile>
    <profile>
      <id>celeborn</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>gluten-celeborn</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>add-celeborn-sources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-celeborn/main/scala</source>
                    <source>${project.basedir}/src-celeborn/main/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-celeborn-resources</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-celeborn/main/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>add-celeborn-test-sources</id>
                <phase>generate-test-sources</phase>
                <goals>
                  <goal>add-test-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-celeborn/test/scala</source>
                    <source>${project.basedir}/src-celeborn/test/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-celeborn-test-resources</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>add-test-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-celeborn/test/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>uniffle</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>gluten-uniffle</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>add-uniffle-sources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-uniffle/main/scala</source>
                    <source>${project.basedir}/src-uniffle/main/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-uniffle-resources</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-uniffle/main/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>add-uniffle-test-sources</id>
                <phase>generate-test-sources</phase>
                <goals>
                  <goal>add-test-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-uniffle/test/scala</source>
                    <source>${project.basedir}/src-uniffle/test/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-uniffle-test-resources</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>add-test-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-uniffle/test/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>delta</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>gluten-delta</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>add-delta-sources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-delta/main/scala</source>
                    <source>${project.basedir}/src-delta/main/java</source>
                    <source>${project.basedir}/src-delta-${delta.binary.version}/main/scala</source>
                    <source>${project.basedir}/src-delta-${delta.binary.version}/main/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-delta-resources</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <!--Don't place multiple `directory` lines under the same `resource` entry.-->
                    <!--IDEA recognizes this kind of usage while Maven doesn't.-->
                    <resource>
                      <directory>${project.basedir}/src-delta/main/resources</directory>
                    </resource>
                    <resource>
                      <directory>${project.basedir}/src-delta-${delta.binary.version}/main/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>add-delta-test-sources</id>
                <phase>generate-test-sources</phase>
                <goals>
                  <goal>add-test-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-delta/test/scala</source>
                    <source>${project.basedir}/src-delta/test/java</source>
                    <source>${project.basedir}/src-delta-${delta.binary.version}/test/scala</source>
                    <source>${project.basedir}/src-delta-${delta.binary.version}/test/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-delta-test-resources</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>add-test-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-delta/test/resources</directory>
                    </resource>
                    <resource>
                      <directory>${project.basedir}/src-delta-${delta.binary.version}/test/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>iceberg</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>gluten-iceberg</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>add-iceberg-sources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-iceberg/main/scala</source>
                    <source>${project.basedir}/src-iceberg/main/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-iceberg-resources</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-iceberg/main/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>add-iceberg-test-sources</id>
                <phase>generate-test-sources</phase>
                <goals>
                  <goal>add-test-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-iceberg/test/scala</source>
                    <source>${project.basedir}/src-iceberg/test/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-iceberg-test-resources</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>add-test-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-iceberg/test/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>hudi</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>gluten-hudi</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>add-hudi-sources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-hudi/main/scala</source>
                    <source>${project.basedir}/src-hudi/main/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-hudi-resources</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-hudi/main/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>add-hudi-test-sources</id>
                <phase>generate-test-sources</phase>
                <goals>
                  <goal>add-test-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src-hudi/test/scala</source>
                    <source>${project.basedir}/src-hudi/test/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-hudi-test-resources</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>add-test-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src-hudi/test/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>backends-velox</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>gluten-arrow</module>
        <module>backends-velox</module>
      </modules>
      <properties>
        <backend_type>velox</backend_type>
      </properties>
    </profile>
    <profile>
      <id>backends-omni</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>gluten-arrow</module>
        <module>backends-omni</module>
      </modules>
      <properties>
        <backend_type>omni</backend_type>
        <omniruntime.version>2.2.0</omniruntime.version>
      </properties>
    </profile>
    <profile>
      <id>spark-ut</id>
      <modules>
        <module>gluten-ut</module>
      </modules>
    </profile>
    <profile>
      <!-- this profile for apache release. -->
      <id>apache-release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <dryRun>false</dryRun>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <skip>false</skip>
              <interactive>true</interactive>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>source-release-assembly</id>
                <phase>none</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <tarLongFileMode>gnu</tarLongFileMode>
                  <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                  <appendAssemblyId>true</appendAssemblyId>
                  <descriptors>
                    <descriptor>
                      src/assembly/source-assembly.xml
                    </descriptor>
                  </descriptors>
                  <finalName>apache-gluten-${project.version}</finalName>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Profiles for different platforms -->
    <profile>
      <id>darwin-x86</id>
      <activation>
        <os>
          <family>mac</family>
          <arch>x86_64</arch>
        </os>
      </activation>
      <properties>
        <platform>darwin</platform>
        <arch>x86_64</arch>
      </properties>
    </profile>
    <profile>
      <id>darwin-aarch64</id>
      <activation>
        <os>
          <family>mac</family>
          <arch>aarch64</arch>
        </os>
      </activation>
      <properties>
        <platform>darwin</platform>
        <arch>aarch64</arch>
      </properties>
    </profile>
    <profile>
      <id>linux-amd64</id>
      <activation>
        <os>
          <family>Linux</family>
          <arch>amd64</arch>
        </os>
      </activation>
      <properties>
        <platform>linux</platform>
        <arch>amd64</arch>
      </properties>
    </profile>
    <profile>
      <id>linux-aarch64</id>
      <activation>
        <os>
          <family>Linux</family>
          <arch>aarch64</arch>
        </os>
      </activation>
      <properties>
        <platform>linux</platform>
        <arch>aarch64</arch>
      </properties>
    </profile>
  </profiles>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.github.ben-manes.caffeine</groupId>
        <artifactId>caffeine</artifactId>
        <version>${caffeine.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-sql_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.apache.arrow</groupId>
            <artifactId>arrow-vector</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client-runtime</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-recipes</artifactId>
          </exclusion>
          <exclusion>
            <artifactId>protobuf-java</artifactId>
            <groupId>com.google.protobuf</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-hive_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client-runtime</artifactId>
          </exclusion>
          <exclusion>
            <artifactId>protobuf-java</artifactId>
            <groupId>com.google.protobuf</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-catalyst_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.arrow</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client-runtime</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-recipes</artifactId>
          </exclusion>
          <exclusion>
            <artifactId>protobuf-java</artifactId>
            <groupId>com.google.protobuf</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-yarn_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <scope>provided</scope>
      </dependency>
      <!-- test dependencies -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client-runtime</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-recipes</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <artifactId>protobuf-java</artifactId>
            <groupId>com.google.protobuf</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-catalyst_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.arrow</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-sql_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.arrow</groupId>
            <artifactId>*</artifactId>
          </exclusion>
          <exclusion>
            <artifactId>protobuf-java</artifactId>
            <groupId>com.google.protobuf</groupId>
          </exclusion>
        </exclusions>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-hive_${scala.binary.version}</artifactId>
        <version>${spark.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-client</artifactId>
        <version>${hadoop.version}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>io.netty</groupId>
            <artifactId>netty</artifactId>
          </exclusion>
          <exclusion>
            <artifactId>protobuf-java</artifactId>
            <groupId>com.google.protobuf</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>io.delta</groupId>
        <artifactId>${delta.package.name}_${scala.binary.version}</artifactId>
        <version>${delta.version}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.antlr</groupId>
            <artifactId>*</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest_${scala.binary.version}</artifactId>
        <version>3.2.16</version>
        <scope>test</scope>
      </dependency>
      <!-- Fasterxml -->
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${fasterxml.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${fasterxml.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${fasterxml.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${fasterxml.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-guava</artifactId>
        <version>${fasterxml.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
        <version>${fasterxml.version}</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <resources>
      <resource>
        <directory>${project.basedir}/src/main/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${project.basedir}/src/test/resources</directory>
      </testResource>
    </testResources>
    <extensions>
      <!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property -->
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>${os-maven-plugin.version}</version>
      </extension>
    </extensions>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven.jar.plugin}</version>
          <executions>
            <execution>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <classifier>${scala.binary.version}</classifier>
                <classifier>${sparkbundle.version}</classifier>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.compiler.plugin}</version>
          <configuration>
            <encoding>UTF-8</encoding>
            <maxmem>1024m</maxmem>
            <fork>true</fork>
            <compilerArgs>
              <arg>-Xlint:all,-serial,-path</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.scalatest</groupId>
          <artifactId>scalatest-maven-plugin</artifactId>
          <version>${scalatest-maven-plugin.version}</version>
          <configuration>
            <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
            <testFailureIgnore>false</testFailureIgnore>
            <junitxml>.</junitxml>
            <argLine>${argLine} ${extraJavaTestArgs}</argLine>
          </configuration>
          <executions>
            <execution>
              <id>test</id>
              <goals>
                <goal>test</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>net.alchim31.maven</groupId>
          <artifactId>scala-maven-plugin</artifactId>
          <version>${scala.compiler.version}</version>
          <configuration>
            <compilerPlugins>
              <compilerPlugin>
                <groupId>org.wartremover</groupId>
                <artifactId>wartremover_${scala.binary.version}</artifactId>
                <version>3.1.6</version>
              </compilerPlugin>
            </compilerPlugins>
            <dependencies>
              <dependency>
                <groupId>io.github.zhztheplayer.scalawarts</groupId>
                <artifactId>scalawarts_${scala.binary.version}</artifactId>
                <version>0.1.2</version>
              </dependency>
            </dependencies>
            <recompileMode>${scala.recompile.mode}</recompileMode>
            <args>
              <arg>-Wconf:msg=While parsing annotations in:silent,any:e</arg>
              <arg>-Ywarn-unused:imports</arg>
              <arg>-deprecation</arg>
              <arg>-feature</arg>
              <arg>-Wconf:cat=deprecation:wv,any:e</arg>
              <arg>-P:wartremover:traverser:io.github.zhztheplayer.scalawarts.InheritFromCaseClass</arg>
            </args>
          </configuration>
          <executions>
            <execution>
              <id>scala-compile-first</id>
              <phase>process-resources</phase>
              <goals>
                <goal>add-source</goal>
                <goal>compile</goal>
              </goals>
            </execution>
            <execution>
              <id>scala-test-compile-first</id>
              <phase>process-test-resources</phase>
              <goals>
                <goal>testCompile</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
            <failOnViolation>true</failOnViolation>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <sourceDirectories>
              <directory>${project.basedir}/src/main/java</directory>
              <directory>${project.basedir}/src/main/scala</directory>
            </sourceDirectories>
            <testSourceDirectories>
              <directory>${project.basedir}/src/test/java</directory>
            </testSourceDirectories>
            <configLocation>dev/checkstyle.xml</configLocation>
            <outputFile>${project.basedir}/target/checkstyle-output.xml</outputFile>
            <inputEncoding>UTF-8</inputEncoding>
            <outputEncoding>UTF-8</outputEncoding>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>8.29</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.scalastyle</groupId>
          <artifactId>scalastyle-maven-plugin</artifactId>
          <version>${scalastyle.version}</version>
          <configuration>
            <verbose>false</verbose>
            <failOnViolation>true</failOnViolation>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <failOnWarning>false</failOnWarning>
            <sourceDirectory>${project.basedir}/src/main/scala</sourceDirectory>
            <testSourceDirectory>${project.basedir}/src/test/scala</testSourceDirectory>
            <outputFile>${project.basedir}/scalastyle-output.xml</outputFile>
            <outputEncoding>UTF-8</outputEncoding>
            <configLocation>dev/scalastyle-config.xml</configLocation>
          </configuration>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.3.0</version>
          <configuration>
            <descriptorRefs>
              <descriptorRef>jar-with-dependencies</descriptorRef>
            </descriptorRefs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.4.1</version>
          <configuration>
            <createDependencyReducedPom>false</createDependencyReducedPom>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>${spotless.version}</version>
          <configuration>
            <java>
              <toggleOffOn/>
              <googleJavaFormat>
                <version>1.7</version>
              </googleJavaFormat>

              <!-- \# refers to the static imports -->
              <importOrder>
                <order>org.apache.gluten,io.substrait.spark,,javax,java,scala,\#</order>
              </importOrder>

              <removeUnusedImports/>
              <licenseHeader>
                <content>${spotless.license.header}</content>
                <delimiter>${spotless.delimiter}</delimiter>
              </licenseHeader>
            </java>
            <scala>
              <!--  make it works `// spotless:off `  -->
              <toggleOffOn/>
              <scalafmt>
                <version>${spotless.scalafmt.version}</version>
                <scalaMajorVersion>${scala.binary.version}</scalaMajorVersion>
                <file>.scalafmt.conf</file>
              </scalafmt>
              <licenseHeader>
                <content>${spotless.license.header}</content>
                <delimiter>${spotless.delimiter}</delimiter>
              </licenseHeader>
            </scala>
          </configuration>
          <executions>
            <execution>
              <id>spotless-check</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build-helper-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.xolstice.maven.plugins</groupId>
          <artifactId>protobuf-maven-plugin</artifactId>
          <version>0.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.antlr</groupId>
          <artifactId>antlr4-maven-plugin</artifactId>
          <version>${antlr4.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.6.3</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.15.0</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <!--We use build-helper-maven-plugin rather than maven-resources-plugin-->
        <!--to add base resources (generated-resources and other common extended resource folders).-->
        <!--So submodules could easily add their own resources through maven-resources-plugin-->
        <!--which is more compatible with Intellij IDEA (E.g., `targetPath` can be respected by-->
        <!--IDEA with maven-resources-plugin while it is not working with build-helper-maven-plugin).-->
        <executions>
          <execution>
          </execution>
          <execution>
            <id>add-generated-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>add-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <!-- Include the properties file to provide the build information. -->
                  <directory>${project.build.directory}/generated-resources</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>