<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>ch.zzeekk.spark</groupId>
  <artifactId>spark-temporalquery_2.12</artifactId>
  <version>3.0.0</version>
  <name>Spark Temporal Queries Library</name>
  <description>Implicit functions for querying interval data with Apache Spark/Scala</description>
  <url>https://github.com/zzeekk/spark-temporalquery</url>
  <inceptionYear>2018</inceptionYear>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>zzeekk</id>
      <name>Zach Kull</name>
      <email>zzeekk@gmx.net</email>
      <url>https://github.com/zzeekk</url>
    </developer>
    <developer>
      <id>kaelte</id>
      <name>Nikolaus Thiel</name>
      <email>klt@fsfe.org</email>
      <url>https://github.com/kaelte</url>
    </developer>
  </developers>
  <scm>
    <url>https://github.com/zzeekk/spark-temporalquery.git</url>
  </scm>
  <properties>
    <maven.compiler.release>17</maven.compiler.release>
    <maven.compiler.target>17</maven.compiler.target>
    <spark.version>3.5.5</spark.version>
    <maven.compiler.source>17</maven.compiler.source>
    <scala.minor.version>2.12</scala.minor.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <scala.version>2.12.20</scala.version>
    <fasterxml.jackson.version>2.18.3</fasterxml.jackson.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>${scala.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-reflect</artifactId>
      <version>${scala.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-sql_2.12</artifactId>
      <version>${spark.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.jackson</groupId>
          <artifactId>jackson-mapper-asl</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.12</artifactId>
      <version>3.2.19</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
      <version>${fasterxml.jackson.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <version>2.15.2</version>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>test-compile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.spurint.maven.plugins</groupId>
        <artifactId>scala-cross-maven-plugin</artifactId>
        <version>0.3.0</version>
        <executions>
          <execution>
            <id>rewrite-pom</id>
            <goals>
              <goal>rewrite-pom</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.3</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest-maven-plugin</artifactId>
        <version>2.2.0</version>
        <executions>
          <execution>
            <id>test</id>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <argLine>-Xmx16g -Duser.timezone=Europe/Zurich -Dfile.encoding=UTF-8 --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --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.cs=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED</argLine>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
          <junitxml>.</junitxml>
          <filereports>${project.artifactId}.txt</filereports>
          <stdout>WFT</stdout>
          <environmentVariables>
            <SPARK_LOCAL_IP>127.0.0.1</SPARK_LOCAL_IP>
          </environmentVariables>
          <argLine>--add-exports java.base/sun.nio.ch=ALL-UNNAMED --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</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>scala-2.13</id>
      <properties>
        <scala.minor.version>2.13</scala.minor.version>
        <scala.version>${scala.minor.version}.16</scala.version>
      </properties>
    </profile>
    <profile>
      <id>scala-2.12</id>
      <properties>
        <scala.minor.version>2.12</scala.minor.version>
        <scala.version>${scala.minor.version}.20</scala.version>
      </properties>
    </profile>
    <profile>
      <id>release-sonatype</id>
      <build>
        <plugins>
          <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>4.9.5</version>
            <executions>
              <execution>
                <id>scala-doc</id>
                <goals>
                  <goal>doc-jar</goal>
                </goals>
                <configuration>
                  <args>
                    <arg>-no-link-warnings</arg>
                  </args>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.7</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <tokenAuth>true</tokenAuth>
              <autoPublish>false</autoPublish>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <name>Central Sonatype Repository</name>
          <url>https://repo1.maven.org/maven2</url>
        </repository>
        <snapshotRepository>
          <id>central</id>
          <name>Central Sonatype Repository</name>
          <url>https://repo1.maven.org/maven2</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>
</project>
