<?xml version="1.0" encoding="UTF-8"?>
<!--
 SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 SPDX-License-Identifier: LicenseRef-NvidiaProprietary

 NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
 property and proprietary rights in and to this material, related
 documentation and any modifications thereto. Any use, reproduction,
 disclosure or distribution of this material and related documentation
 without an express license agreement from NVIDIA CORPORATION or
 its affiliates is strictly prohibited.
-->
<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>com.nvidia</groupId>
    <artifactId>rapids-4-spark-private-parent_2.13</artifactId>
    <version>26.06.0</version>
    <packaging>pom</packaging>

    <name>RAPIDS Accelerator for Apache Spark Private Plugin</name>
    <description>The RAPIDS Private plugin for Apache Spark</description>

    <url>http://nvidia.github.io/</url>
    <licenses>
        <license>
            <name>NVIDIA SPARK-RAPIDS PRIVATE LICENSE</name>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:http://nvidia.github.io/</connection>
        <developerConnection>scm:git:git@nvidia.github.io/</developerConnection>
        <tag>HEAD</tag>
        <url>http://nvidia.github.io/</url>
    </scm>
    <developers>
        <developer>
            <id>tgravescs</id>
            <name>Thomas Graves</name>
            <email>tgraves@nvidia.com</email>
            <roles>
                <role>Committer</role>
            </roles>
            <timezone>-6</timezone>
        </developer>
        <developer>
            <id>andygrove</id>
            <name>Andy Grove</name>
            <email>andygrove@nvidia.com</email>
            <roles>
                <role>Committer</role>
            </roles>
            <timezone>-6</timezone>
        </developer>
    </developers>

    <properties>
        <!-- start dyn.shim properties -->
        <dyn.shim.excluded.releases>
            <!-- #if scala-2.12 --><!--
            330db
            --><!-- #endif scala-2.12 -->
        </dyn.shim.excluded.releases>
        <!-- end dyn.shim properties -->

        <!-- 4.7.1 required: later versions auto-derive -release from -target,
             preventing JDK 17 boot classpath access with JDK 8 classfile output -->
        <scala.plugin.version>4.7.1</scala.plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.sourceEncoding>UTF-8</project.reporting.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <spark.version>${spark350.version}</spark.version>
        <scalatest-maven-plugin.version>2.0.2</scalatest-maven-plugin.version>
        <maven.scalastyle.skip>false</maven.scalastyle.skip>
        <maven.scaladoc.skip>false</maven.scaladoc.skip>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.jar.plugin.version>3.3.0</maven.jar.plugin.version>
        <scala.javac.args>-Xlint:all,-serial,-path,-try</scala.javac.args>
        <java.major.version>8</java.major.version>
        <scala.compiler.release>${java.major.version}</scala.compiler.release>
        <spark330.version>3.3.0</spark330.version>
        <spark331.version>3.3.1</spark331.version>
        <spark332.version>3.3.2</spark332.version>
        <spark333.version>3.3.3</spark333.version>
        <spark334.version>3.3.4</spark334.version>
        <spark340.version>3.4.0</spark340.version>
        <spark341.version>3.4.1</spark341.version>
        <spark342.version>3.4.2</spark342.version>
        <spark343.version>3.4.3</spark343.version>
        <spark344.version>3.4.4</spark344.version>
        <spark330db.version>3.3.0-databricks</spark330db.version>
        <spark341db.version>3.4.1-databricks</spark341db.version>
        <spark350.version>3.5.0</spark350.version>
        <spark350db143.version>3.5.0-databricks-143</spark350db143.version>
        <spark351.version>3.5.1</spark351.version>
        <spark352.version>3.5.2</spark352.version>
        <spark353.version>3.5.3</spark353.version>
        <spark354.version>3.5.4</spark354.version>
        <spark355.version>3.5.5</spark355.version>
        <spark356.version>3.5.6</spark356.version>
        <spark357.version>3.5.7</spark357.version>
        <spark358.version>3.5.8</spark358.version>
        <spark400.version>4.0.0</spark400.version>
        <spark400db173.version>4.0.0-databricks-173</spark400db173.version>
        <spark401.version>4.0.1</spark401.version>
        <spark402.version>4.0.2</spark402.version>
        <spark411.version>4.1.1</spark411.version>
        <spark.shim.dest>${project.basedir}/target/${spark.version.classifier}/generated/src</spark.shim.dest>
        <spark.version.classifier>spark${buildver}</spark.version.classifier>
        <target.classifier>${spark.version.classifier}</target.classifier>
        <mockito.version>4.6.1</mockito.version>
        <spark.rapids.jni.version>26.06.0</spark.rapids.jni.version>
        <spark.rapids.jni.classifier>cuda12</spark.rapids.jni.classifier>
        <scala.binary.version>2.13</scala.binary.version>
        <scala.version>2.13.18</scala.version>
        <maven.install.plugin.version>3.1.1</maven.install.plugin.version>
        <rapids.compressed.artifact>true</rapids.compressed.artifact>
        <rapids.default.jar.excludePattern/>
        <rapids.default.jar.phase>package</rapids.default.jar.phase>
        <shimplify.shims/>
        <rapids.module>.</rapids.module>
        <!-- SPARK-36796 for JDK-17 test-->
        <extraJavaTestArgs>
            -XX:+IgnoreUnrecognizedVMOptions
            --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/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
        </extraJavaTestArgs>
        <!-- setting an empty default value otherwise maven won't recognize ${argLine}
             substitution in scalatest if the user doesn't set it on the command line -->
        <argLine/>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.nvidia</groupId>
                <artifactId>spark-rapids-jni</artifactId>
                <version>${spark.rapids.jni.version}</version>
                <classifier>${spark.rapids.jni.classifier}</classifier>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-sql_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-sql_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
                <classifier>tests</classifier>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-catalyst_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
                <classifier>tests</classifier>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest_${scala.binary.version}</artifactId>
                <version>3.2.16</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.scalatestplus</groupId>
                <artifactId>mockito-4-11_${scala.binary.version}</artifactId>
                <version>3.2.16.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <modules>
        <module>core</module>
    </modules>
    <profiles>
        <profile>
            <id>emr</id>
            <activation>
                <!-- Activate when the EMR_VERSION environment variable is set
                     (e.g. EMR_VERSION=7.12 mvn ...). -->
                <property>
                    <name>env.EMR_VERSION</name>
                </property>
            </activation>
            <properties>
                <!-- attach-scaladocs/doc-jar does not see the same shim classpath as compile -->
                <maven.scaladoc.skip>true</maven.scaladoc.skip>
            </properties>
            <modules>
                <module>emr-deps</module>
            </modules>
        </profile>
        <profile>
            <id>noSnapshotsWithDatabricks</id>
            <properties>
                <dyn.shim.include.buildvers.skip>false</dyn.shim.include.buildvers.skip>
                <dyn.shim.buildver>no_snap_with_databricks</dyn.shim.buildver>
            </properties>
        </profile>
        <profile>
            <id>noSnapshots</id>
            <properties>
                <dyn.shim.include.buildvers.skip>false</dyn.shim.include.buildvers.skip>
                <dyn.shim.buildver>no_snapshots</dyn.shim.buildver>
            </properties>
        </profile>
        <profile>
            <id>snapshots</id>
            <properties>
                <dyn.shim.include.buildvers.skip>false</dyn.shim.include.buildvers.skip>
                <dyn.shim.buildver>snap_and_no_snap</dyn.shim.buildver>
            </properties>
        </profile>
        <profile>
            <id>snapshotsWithDatabricks</id>
            <properties>
                <dyn.shim.include.buildvers.skip>false</dyn.shim.include.buildvers.skip>
                <dyn.shim.buildver>snap_and_no_snap_with_databricks</dyn.shim.buildver>
            </properties>
        </profile>
        <!-- #if scala-2.12 --><!--
        <profile>
            <id>release330</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>buildver</name>
                    <value>330</value>
                </property>
            </activation>
            <properties>
                <buildver>330</buildver>
                <spark.version>${spark330.version}</spark.version>
                <spark.test.version>${spark330.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release331</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>331</value>
                </property>
            </activation>
            <properties>
                <buildver>331</buildver>
                <spark.version>${spark331.version}</spark.version>
                <spark.test.version>${spark331.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release332</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>332</value>
                </property>
            </activation>
            <properties>
                <buildver>332</buildver>
                <spark.version>${spark332.version}</spark.version>
                <spark.test.version>${spark332.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release333</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>333</value>
                </property>
            </activation>
            <properties>
                <buildver>333</buildver>
                <spark.version>${spark333.version}</spark.version>
                <spark.test.version>${spark333.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release334</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>334</value>
                </property>
            </activation>
            <properties>
                <buildver>334</buildver>
                <spark.version>${spark334.version}</spark.version>
                <spark.test.version>${spark334.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release340</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>340</value>
                </property>
            </activation>
            <properties>
                <buildver>340</buildver>
                <spark.version>${spark340.version}</spark.version>
                <spark.test.version>${spark340.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release341</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>341</value>
                </property>
            </activation>
            <properties>
                <buildver>341</buildver>
                <spark.version>${spark341.version}</spark.version>
                <spark.test.version>${spark341.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release342</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>342</value>
                </property>
            </activation>
            <properties>
                <buildver>342</buildver>
                <spark.version>${spark342.version}</spark.version>
                <spark.test.version>${spark342.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release343</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>343</value>
                </property>
            </activation>
            <properties>
                <buildver>343</buildver>
                <spark.version>${spark343.version}</spark.version>
                <spark.test.version>${spark343.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release344</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>344</value>
                </property>
            </activation>
            <properties>
                <buildver>344</buildver>
                <spark.version>${spark344.version}</spark.version>
                <spark.test.version>${spark344.version}</spark.test.version>
            </properties>

        </profile>
        --><!-- #endif scala-2.12 -->

        <!-- Note Databricks requires 2 properties -Ddatabricks and -Dbuildver=*db -->
        <!-- Downgrade scala plugin version due to: https://github.com/sbt/sbt/issues/4305 -->
        <!--
             Note that we are using the Spark version for all of the Databricks dependencies as well.
             The jenkins/databricks/build.sh script handles installing the jars as maven artifacts.
             This is to make it easier and not have to change version numbers for each individual dependency
             and deal with differences between Databricks versions
        -->
        <!-- #if scala-2.12 --><!--
        <profile>
            <id>release330db</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>330db</value>
                </property>
            </activation>
            <properties>
                <scala.plugin.version>3.4.4</scala.plugin.version>
                <spark.version.classifier>spark330db</spark.version.classifier>
                <spark.version>${spark330db.version}</spark.version>
                <spark.test.version>${spark330db.version}</spark.test.version>
                <hadoop.client.version>3.3.1</hadoop.client.version>
                <rat.consoleOutput>true</rat.consoleOutput>
            </properties>

        </profile>
        <profile>
            <id>release341db</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>341db</value>
                </property>
            </activation>
            <properties>
                <scala.plugin.version>3.4.4</scala.plugin.version>
                <spark.version.classifier>spark341db</spark.version.classifier>
                <spark.version>${spark341db.version}</spark.version>
                <spark.test.version>${spark341db.version}</spark.test.version>
                <hadoop.client.version>3.3.1</hadoop.client.version>
                <rat.consoleOutput>true</rat.consoleOutput>
            </properties>

        </profile>
        <profile>
            <id>release350db143</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>350db143</value>
                </property>
            </activation>
            <properties>
                <scala.plugin.version>3.4.4</scala.plugin.version>
                <spark.version.classifier>spark350db143</spark.version.classifier>
                <spark.version>${spark350db143.version}</spark.version>
                <spark.test.version>${spark350db143.version}</spark.test.version>
                <hadoop.client.version>3.3.1</hadoop.client.version>
                <rat.consoleOutput>true</rat.consoleOutput>
            </properties>

        </profile>
        --><!-- #endif scala-2.12 -->
        <profile>
            <id>release350</id>
            <activation>
                <!-- #if scala-2.13 -->
                <activeByDefault>true</activeByDefault>
                <!-- #endif scala-2.13 -->
                <property>
                    <name>buildver</name>
                    <value>350</value>
                </property>
            </activation>
            <properties>
                <buildver>350</buildver>
                <spark.version>${spark350.version}</spark.version>
                <spark.test.version>${spark350.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release351</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>351</value>
                </property>
            </activation>
            <properties>
                <buildver>351</buildver>
                <spark.version>${spark351.version}</spark.version>
                <spark.test.version>${spark351.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release352</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>352</value>
                </property>
            </activation>
            <properties>
                <buildver>352</buildver>
                <spark.version>${spark352.version}</spark.version>
                <spark.test.version>${spark352.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release353</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>353</value>
                </property>
            </activation>
            <properties>
                <buildver>353</buildver>
                <spark.version>${spark353.version}</spark.version>
                <spark.test.version>${spark353.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release354</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>354</value>
                </property>
            </activation>
            <properties>
                <buildver>354</buildver>
                <spark.version>${spark354.version}</spark.version>
                <spark.test.version>${spark354.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release355</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>355</value>
                </property>
            </activation>
            <properties>
                <buildver>355</buildver>
                <spark.version>${spark355.version}</spark.version>
                <spark.test.version>${spark355.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release356</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>356</value>
                </property>
            </activation>
            <properties>
                <buildver>356</buildver>
                <spark.version>${spark356.version}</spark.version>
                <spark.test.version>${spark356.version}</spark.test.version>
            </properties>
            
        </profile>
        <profile>
            <id>release357</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>357</value>
                </property>
            </activation>
            <properties>
                <buildver>357</buildver>
                <spark.version>${spark357.version}</spark.version>
                <spark.test.version>${spark357.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release358</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>358</value>
                </property>
            </activation>
            <properties>
                <buildver>358</buildver>
                <spark.version>${spark358.version}</spark.version>
                <spark.test.version>${spark358.version}</spark.test.version>
            </properties>
            <modules>
                <module>core</module>
            </modules>
        </profile>
	<!-- #if scala-2.13 -->
        <profile>
            <id>release400</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>400</value>
                </property>
            </activation>
            <properties>
                <buildver>400</buildver>
                <spark.version>${spark400.version}</spark.version>
                <spark.test.version>${spark400.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release401</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>401</value>
                </property>
            </activation>
            <properties>
                <buildver>401</buildver>
                <spark.version>${spark401.version}</spark.version>
                <spark.test.version>${spark401.version}</spark.test.version>
            </properties>

        </profile>
        <profile>
            <id>release402</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>402</value>
                </property>
            </activation>
            <properties>
                <buildver>402</buildver>
                <spark.version>${spark402.version}</spark.version>
                <spark.test.version>${spark402.version}</spark.test.version>
            </properties>
            <modules>
                <module>core</module>
            </modules>
        </profile>
        <profile>
            <id>release411</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>411</value>
                </property>
            </activation>
            <properties>
                <buildver>411</buildver>
                <spark.version>${spark411.version}</spark.version>
                <spark.test.version>${spark411.version}</spark.test.version>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>net.alchim31.maven</groupId>
                            <artifactId>scala-maven-plugin</artifactId>
                            <configuration>
                                <release combine.self="override"/>
                                <target>${java.major.version}</target>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>

        </profile>
        <profile>
            <id>release400db173</id>
            <activation>
                <property>
                    <name>buildver</name>
                    <value>400db173</value>
                </property>
            </activation>
            <properties>
                <buildver>400db173</buildver>
                <scala.plugin.version>3.4.4</scala.plugin.version>
                <spark.version.classifier>spark400db173</spark.version.classifier>
                <spark.version>${spark400db173.version}</spark.version>
                <spark.test.version>${spark400db173.version}</spark.test.version>
                <hadoop.client.version>3.3.1</hadoop.client.version>
                <rat.consoleOutput>true</rat.consoleOutput>
            </properties>

        </profile>
        <!-- #endif scala-2.13 -->
        <profile>
            <id>source-javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.0</version>
                        <executions>
                            <execution>
                                <id>attach-source</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>aggregate-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <show>package</show>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>scala-2.12</id>
            <properties>
                <scala.binary.version>2.12</scala.binary.version>
                <scala.version>2.12.21</scala.version>
            </properties>
        </profile>
        <profile>
            <id>scala-2.13</id>
            <properties>
                <scala.binary.version>2.13</scala.binary.version>
                <scala.version>2.13.18</scala.version>
            </properties>
        </profile>
    </profiles>
    <build>
        <directory>${project.basedir}/target/${target.classifier}</directory>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>shimplify-shim-sources</id>
                            <goals><goal>run</goal></goals>
                            <phase>generate-sources</phase>
                            <configuration>
                                <target xmlns:ac="antlib:net.sf.antcontrib">
                                    <property name="dyn.shim.buildver" value="all.buildvers"/>
                                    <script language="jython" src="${spark.rapids.source.basedir}/build/dyn_shim_detection.py"/>
                                    <scriptdef name="shimplify" language="jython" src="${spark.rapids.source.basedir}/build/shimplify.py">
                                        <attribute name="if"/>
                                    </scriptdef>
                                    <shimplify if="shimplify"/>
                                </target>
                            </configuration>
                        </execution>
                        <execution>
                            <id>generate-build-info</id>
                            <phase>generate-resources</phase>
                            <configuration>
                                <!-- Execute the shell script to generate the plugin build information. -->
                                <target name="build-info">
                                    <mkdir dir="${project.build.directory}/extra-resources"/>
                                    <mkdir dir="${project.build.directory}/tmp"/>
                                    <exec executable="bash"
                                          output="${project.build.directory}/extra-resources/rapids4spark-private-version-info.properties"
                                          resultproperty="build-info.exitCode"
                                          errorproperty="build-info.errorMsg"
                                          failonerror="false">
                                        <arg value="${spark.rapids.source.basedir}/build/build-info"/>
                                        <arg value="${project.version}"/>
                                    </exec>
                                    <fail message="exec build-info.sh failed, exit code is ${build-info.exitCode}, error msg is ${build-info.errorMsg}">
                                        <condition>
                                            <not>
                                                <equals arg1="${build-info.exitCode}" arg2="0"/>
                                            </not>
                                        </condition>
                                    </fail>
                                </target>
                            </configuration>

                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant</artifactId>
                            <version>1.10.12</version>
                        </dependency>
                        <dependency>
                            <groupId>ant-contrib</groupId>
                            <artifactId>ant-contrib</artifactId>
                            <version>1.0b3</version>
                        </dependency>
                        <dependency>
                            <groupId>org.python</groupId>
                            <artifactId>jython-standalone</artifactId>
                            <version>2.7.2</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.plugin.version}</version>
                    <!--
                        Packaging type jar requires an output artifact without a classifier a.k.a.
                        main artifact. Modules whose real "main" output artifact is a shim jar
                        should comply by outputing a main jar without the class bytecode. In the pom
                        of such a module set
                          exludePattern to **/*
                          rapids.shim.jar.phase to package to attach the shim artifact
                       Modules feededing into dist need not be compressed.
                        Set rapids.compressed.artifact to false
                    -->
                    <executions>
                        <execution>
                            <id>default-jar</id>
                            <goals><goal>jar</goal></goals>
                            <phase>${rapids.default.jar.phase}</phase>
                            <configuration>
                                <excludes>
                                    <exclude>${rapids.default.jar.excludePattern}</exclude>
                                </excludes>
                                <archive>
                                    <compress>${rapids.compressed.artifact}</compress>
                                </archive>
                            </configuration>
                        </execution>
                        <execution>
                            <id>create-${spark.version.classifier}-jar</id>
                            <goals><goal>jar</goal></goals>
                            <phase>${rapids.shim.jar.phase}</phase>
                            <configuration>
                                <classifier>${spark.version.classifier}</classifier>
                                <archive>
                                    <compress>${rapids.compressed.artifact}</compress>
                                </archive>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-test-jar</id>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                            <configuration>
                                <classifier>${spark.version.classifier}tests</classifier>
                                <skipIfEmpty>true</skipIfEmpty>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>default-compile</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>default-testCompile</id>
                            <phase>none</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>eclipse-add-source</id>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>scala-compile-first</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>scala-test-compile-first</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>attach-scaladocs</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>doc-jar</goal>
                            </goals>
                            <configuration>
                                <skip>${maven.scaladoc.skip}</skip>
                                <args>
                                    <arg>
                                        -doc-external-doc:${java.home}/lib/rt.jar#https://docs.oracle.com/javase/${java.major.version}/docs/api/index.html
                                    </arg>
                                    <arg>
                                        -doc-external-doc:${settings.localRepository}/${scala.local-lib.path}#https://scala-lang.org/api/${scala.version}/
                                    </arg>
                                    <arg>
                                        -doc-external-doc:${settings.localRepository}/org/apache/spark/spark-sql_${scala.binary.version}/${spark.version}/spark-sql_${scala.binary.version}-${spark.version}.jar#https://spark.apache.org/docs/${spark.version}/api/scala/index.html
                                    </arg>
                                </args>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <release>${scala.compiler.release}</release>
                        <scalaVersion>${scala.version}</scalaVersion>
                        <checkMultipleScalaVersions>true</checkMultipleScalaVersions>
                        <!--TODO
[WARNING]  Expected all dependencies to require Scala version: 2.12.15
[WARNING]  org.scalatest:scalatest_2.12:3.0.8 requires scala version: 2.12.8
[WARNING] Multiple versions of scala libraries detected!
                        <failOnMultipleScalaVersions>false</failOnMultipleScalaVersions>
                        -->
                        <recompileMode>${scala.recompileMode}</recompileMode>
                        <args>
                            <arg>-unchecked</arg>
                            <arg>-deprecation</arg>
                            <arg>-feature</arg>
                            <arg>-explaintypes</arg>
                            <arg>-Ywarn-unused:imports</arg>
                            <arg>-Xlint:adapted-args</arg>
                            <arg>-Xlint:missing-interpolator</arg>
                            <!-- #if scala-2.12 --><!--
                            <arg>-Xfatal-warnings</arg>
                            --><!-- #endif scala-2.12 -->
                            <arg>-Wconf:cat=lint-adapted-args:e</arg>
                            <arg>-Xsource:2.13</arg>
                            <!-- #if scala-2.13 -->
                            <arg>-Wconf:cat=deprecation:wv,any:e</arg>
                            <arg>-Wconf:cat=scaladoc:wv</arg>
                            <arg>-Wconf:cat=other-nullary-override:wv</arg>
                            <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>
                            <arg>-Wconf:cat=deprecation&amp;msg=procedure syntax is deprecated:e</arg>
                            <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>
                            <!-- #endif scala-2.13 -->
                        </args>
                        <jvmArgs>
                            <jvmArg>-Xms1024m</jvmArg>
                            <jvmArg>-Xmx1024m</jvmArg>
                        </jvmArgs>
                        <addJavacArgs>${scala.javac.args}</addJavacArgs>
                        <secondaryCacheDir>${spark.rapids.project.basedir}/target/${spark.version.classifier}/.sbt/1.0/zinc/org.scala-sbt</secondaryCacheDir>
                        <!-- #if scala-2.13 -->
                        <compilerPlugins combine.self="override">
                        </compilerPlugins>
                        --><!-- #endif -->
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <descriptorRefs>
                            <descriptorRef>jar-with-dependencies</descriptorRef>
                        </descriptorRefs>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </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>
                        <junitxml>.</junitxml>
                        <filereports>scala-test-output.txt</filereports>
                        <argLine>${argLine} -ea -Xmx4g -Xss4m ${extraJavaTestArgs}</argLine>
                        <stderr/>
                        <systemProperties>
                            <java.awt.headless>true</java.awt.headless>
                            <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
                            <spark.ui.enabled>false</spark.ui.enabled>
                            <spark.ui.showConsoleProgress>false</spark.ui.showConsoleProgress>
                            <spark.unsafe.exceptionOnMemoryLeak>true</spark.unsafe.exceptionOnMemoryLeak>
                        </systemProperties>
                        <tagsToExclude>${test.exclude.tags}</tagsToExclude>
                        <tagsToInclude>${test.include.tags}</tagsToInclude>
                    </configuration>
                    <executions>
                        <execution>
                            <id>test</id>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <message>Minimum Maven version 3.6.x required</message>
                                    <version>[3.6,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <message>Java 17+ required for build</message>
                                    <version>[17,)</version>
                                </requireJavaVersion>
                                <!-- #if scala-2.12 --><!--
                                <requireProperty>
                                    <property>buildver</property>
                                    <regex>^(33[0-4]|34[0-4]|35[0-8]|341db|350db143)$</regex>
                                    <regexMessage>Unsupported buildver value ${buildver} for a Scala 2.12 build. Supported Scala 2.12 buildver values are: 330, 331, 332, 333, 334, 340, 341, 342, 343, 344, 350, 351, 352, 353, 354, 355, 356, 357, 358, 341db, 350db143. For Scala 2.13/Spark 4.x builds, use -f scala2.13/pom.xml with a supported Scala 2.13 buildver such as 350, 400, or 411.</regexMessage>
                                </requireProperty>
                                --><!-- #endif scala-2.12 -->
                                <!-- #if scala-2.13 -->
                                <requireProperty>
                                    <property>buildver</property>
                                    <regex>^(35[0-8]|40[0-2]|411|400db173)$</regex>
                                    <regexMessage>Unsupported buildver value ${buildver} for a Scala 2.13 build. Supported Scala 2.13 buildver values are: 350, 351, 352, 353, 354, 355, 356, 357, 358, 400, 401, 402, 411, 400db173. Spark 3.3.x and 3.4.x builds use Scala 2.12; for example, build Spark 330 with the root pom.xml instead of scala2.13/pom.xml.</regexMessage>
                                </requireProperty>
                                <!-- #endif scala-2.13 -->
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--use this plugin to configure "spark.rapids.project.basedir" property-->
            <plugin>
                <groupId>org.commonjava.maven.plugins</groupId>
                <artifactId>directory-maven-plugin</artifactId>
                <version>0.1</version>
                <executions>
                    <execution>
                        <id>directories</id>
                        <goals>
                            <goal>highest-basedir</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <property>spark.rapids.project.basedir</property>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>update-highest-source-dir</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <name>spark.rapids.source.basedir</name>
                            <value>${spark.rapids.project.basedir}</value>
                            <regex>\/scala[0-9.]+</regex>
                            <replacement></replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                    <execution>
                        <id>update-base-source-dir</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <name>origbasedir</name>
                            <value>${project.basedir}</value>
                            <regex>\/scala[0-9.]+</regex>
                            <replacement></replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                    <execution>
                        <id>update-shimplify-base-source-dir</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <name>shimplify.src.basedir</name>
                            <value>${project.basedir}</value>
                            <regex>\/scala[0-9.]+</regex>
                            <replacement></replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <!-- #if scala-2.12 --><!--
                                <source>${project.basedir}/src/main/scala-${scala.binary.version}</source>
                                --><!-- #endif scala-2.12 -->
                                <!-- #if scala-2.13 -->
                                <source>${project.basedir}/../../${rapids.module}/src/main/java</source>
                                <source>${project.basedir}/../../${rapids.module}/src/main/scala</source>
                                <source>${project.basedir}/../../${rapids.module}/src/main/scala-${scala.binary.version}</source>
                                <!-- #endif scala-2.13 -->
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <!-- #if scala-2.12 --><!--
                                <source>${project.basedir}/src/test/scala-${scala.binary.version}</source>
                                --><!-- #endif scala-2.12 -->
                                <!-- #if scala-2.13 -->
                                <source>${project.basedir}/../../${rapids.module}/src/test/java</source>
                                <source>${project.basedir}/../../${rapids.module}/src/test/scala</source>
                                <source>${project.basedir}/../../${rapids.module}/src/test/scala-${scala.binary.version}</source>
                                <!-- #endif scala-2.13 -->
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-shimple-sources</id>
                        <phase>generate-sources</phase>
                        <goals><goal>add-source</goal></goals>
                        <configuration>
                            <sources>
                                <source>${spark.shim.dest}/main/scala</source>
                                <source>${spark.shim.dest}/main/java</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-shimple-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals><goal>add-test-source</goal></goals>
                        <configuration>
                            <sources>
                                <source>${spark.shim.dest}/test/scala</source>
                                <source>${spark.shim.dest}/test/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.1.0</version>
                <!-- parent-pom only executions -->
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <!--
                        This is an alternative implementation of the scalastyle check invocation,
                        a replacement for scalastyle-maven-plugin. It's motivated to address the following:
                        - All scala files are checked at once regardless of the module, so the developer
                        can focus on addressing violations without being distracted by the build issues
                        in-between
                        - We don't have to hardcode the source code roots added dynamically by other maven
                        plugins to the project
                        - The scalastyle launch cost is amortized across all modules
                        -->
                        <id>scalastyle-all-modules</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <skip>${maven.scalastyle.skip}</skip>
                            <target>
                                <pathconvert property="scalastyle.dirs" pathsep=" ">
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/main/scala"/>
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/main/*/scala"/>
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/test/scala"/>
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/test/*/scala"/>
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/main/scala-${scala.binary.version}"/>
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/main/*/scala-${scala.binary.version}"/>
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/test/scala-${scala.binary.version}"/>
                                    <dirset dir="${spark.rapids.source.basedir}" includes="**/src/test/*/scala-${scala.binary.version}"/>
                                </pathconvert>
                                <echo>Checking scalastyle for all modules using following paths:
                                    ${scalastyle.dirs}
                                </echo>
                                <java classname="org.scalastyle.Main" failonerror="true">
                                    <arg line="--verbose false"/>
                                    <arg line="--warnings false"/>
                                    <arg line="--config ${spark.rapids.source.basedir}/scalastyle-config.xml"/>
                                    <arg line="--xmlOutput ${project.basedir}/target/scalastyle-output.xml"/>
                                    <arg line="--inputEncoding ${project.build.sourceEncoding}"/>
                                    <arg line="--xmlEncoding ${project.reporting.outputEncoding}"/>
                                    <arg line="${scalastyle.dirs}"/>
                                </java>
                            </target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>clean-all-modules</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <skip>${maven.cleanall.skip}</skip>
                            <target>
                                <dirset dir="${project.basedir}" includes="**/target" id="target.dirs.for.clean"/>
                                <pathconvert property="target.dirs.str" pathsep=" ">
                                    <dirset refid="target.dirs.for.clean"/>
                                </pathconvert>
                                <echo>Cleaning build directories of all modules ${target.dirs.str}</echo>
                                <!-- workaround ant delete does not work with dirset -->
                                <exec dir="${project.basedir}" executable="rm">
                                    <arg value="-rf"/>
                                    <arg line="${target.dirs.str}"/>
                                </exec>
                            </target>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.beautiful-scala</groupId>
                        <artifactId>scalastyle_${scala.binary.version}</artifactId>
                        <version>1.5.1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven.install.plugin.version}</version>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <!-- Please build with 'mvn -s jenkins/settings.xml' to use the artifactory with credentials-->
        <repository>
            <id>snapshots-repo</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>apache-snapshots-repo</id>
            <url>https://repository.apache.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
</project>
