<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>lakefs-parent</artifactId>
    <groupId>io.lakefs</groupId>
    <version>0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.lakefs</groupId>
  <artifactId>hadoop-lakefs-assembly</artifactId>
  <name>hadoop-lakefs${name-suffix}</name>
  <version>test-central.0</version>
  <url>https://lakefs.io</url>
  <developers>
    <developer>
      <name>Treeverse lakeFS dev</name>
      <email>services@treeverse.io</email>
      <organization>lakefs.io</organization>
      <organizationUrl>https://lakefs.io</organizationUrl>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>apache2</name>
      <url>http://www.apache.org/licenses/</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:treeverse/lakeFS.git</connection>
    <developerConnection>scm:git:git@github.com:treeverse/lakeFS.git</developerConnection>
    <url>https://github.com/treeverse/lakeFS</url>
  </scm>
  <build>
    <finalName>${finalName}</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.1.2</version>
        <configuration>
          <excludes>
            <exclude>${exclude.tests}</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <testExcludes>
            <testExclude>${exclude.tests}</testExclude>
          </testExcludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.gkatzioura.maven.cloud</groupId>
        <artifactId>s3-storage-wagon</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <id>upload-jar</id>
            <goals>
              <goal>s3-upload</goal>
            </goals>
            <configuration>
              <path>target/${project.artifactId}-${project.version}.jar</path>
              <bucket>treeverse-clients-us-east</bucket>
              <region>us-east-1</region>
              <key>hadoop/${project.artifactId}-${project.version}.jar</key>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>contract-tests-hadoop2</id>
      <build>
        <resources>
          <resource>
            <directory>${contract_tests.resource_dir}</directory>
          </resource>
        </resources>
      </build>
      <properties>
        <contract_tests.resource_dir>../../test/lakefsfs_contract/</contract_tests.resource_dir>
        <exclude.tests>io/lakefs/contract/hadoop3/**</exclude.tests>
        <hadoop.version>2.7.7</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>contract-tests-hadoop3</id>
      <build>
        <resources>
          <resource>
            <directory>${contract_tests.resource_dir}</directory>
          </resource>
        </resources>
      </build>
      <properties>
        <contract_tests.resource_dir>../../test/lakefsfs_contract/</contract_tests.resource_dir>
        <exclude.tests>io/lakefs/contract/hadoop2/**</exclude.tests>
        <hadoop.version>3.1.4</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>contract-tests-hadoop3-presigned</id>
      <build>
        <resources>
          <resource>
            <directory>${contract_tests.resource_dir}</directory>
          </resource>
        </resources>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.1.2</version>
            <configuration>
              <systemPropertyVariables>
                <lakefs.access_mode>presigned</lakefs.access_mode>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <properties>
        <contract_tests.resource_dir>../../test/lakefsfs_contract/</contract_tests.resource_dir>
        <exclude.tests>io/lakefs/contract/hadoop2/**</exclude.tests>
        <hadoop.version>3.1.4</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <source>1.8</source>
                  <doclint>none</doclint>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>assembly</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.4.1</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <filters>
                    <filter>
                      <artifact>*:*</artifact>
                      <excludes>
                        <exclude>module-info.class</exclude>
                        <exclude>META-INF/maven/**</exclude>
                        <exclude>META-INF/*.SF</exclude>
                        <exclude>META-INF/*.DSA</exclude>
                        <exclude>META-INF/*.RSA</exclude>
                      </excludes>
                    </filter>
                  </filters>
                  <relocations>
                    <relocation>
                      <pattern>org.apache.httpcomponents</pattern>
                      <shadedPattern>io.lakefs.hadoopfs.shade.org.apache.httpcomponents</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>okio</pattern>
                      <shadedPattern>io.lakefs.hadoopfs.shade.okio</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>okhttp3</pattern>
                      <shadedPattern>io.lakefs.hadoop.shade.okhttp3</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>com.google.gson</pattern>
                      <shadedPattern>io.lakefs.hadoop.shade.gson</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>io.gsonfire</pattern>
                      <shadedPattern>io.lakefs.hadoop.shade.gsonfire</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>io.lakefs.clients.sdk</pattern>
                      <shadedPattern>io.lakefs.hadoop.shade.sdk</shadedPattern>
                    </relocation>
                  </relocations>
                  <transformers>
                    <transformer>
                      <manifestEntries>
                        <Implementation-Version>${project.version}</Implementation-Version>
                      </manifestEntries>
                    </transformer>
                  </transformers>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <name-suffix>-assembly</name-suffix>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>2.7.7</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>2.7.7</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-aws</artifactId>
      <version>2.7.7</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.aventrix.jnanoid</groupId>
      <artifactId>jnanoid</artifactId>
      <version>2.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>1.16.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>duct-tape</artifactId>
          <groupId>org.rnorth.duct-tape</groupId>
        </exclusion>
        <exclusion>
          <artifactId>docker-java-api</artifactId>
          <groupId>com.github.docker-java</groupId>
        </exclusion>
        <exclusion>
          <artifactId>docker-java-transport-zerodep</artifactId>
          <groupId>com.github.docker-java</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>mockwebserver</artifactId>
      <version>4.10.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.13.4.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.12.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>2.12.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-junit-rule-no-dependencies</artifactId>
      <version>5.14.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-core</artifactId>
      <version>5.15.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>disruptor</artifactId>
          <groupId>com.lmax</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.servlet-api</artifactId>
          <groupId>javax.servlet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-buffer</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-codec</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-codec-http</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-codec-http2</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-codec-socks</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-handler</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-handler-proxy</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-transport</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-tcnative-boringssl-static</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jzlib</artifactId>
          <groupId>com.jcraft</groupId>
        </exclusion>
        <exclusion>
          <artifactId>java-uuid-generator</artifactId>
          <groupId>com.fasterxml.uuid</groupId>
        </exclusion>
        <exclusion>
          <artifactId>bcprov-jdk18on</artifactId>
          <groupId>org.bouncycastle</groupId>
        </exclusion>
        <exclusion>
          <artifactId>bcpkix-jdk18on</artifactId>
          <groupId>org.bouncycastle</groupId>
        </exclusion>
        <exclusion>
          <artifactId>nimbus-jose-jwt</artifactId>
          <groupId>com.nimbusds</groupId>
        </exclusion>
        <exclusion>
          <artifactId>velocity-engine-scripting</artifactId>
          <groupId>org.apache.velocity</groupId>
        </exclusion>
        <exclusion>
          <artifactId>velocity-engine-core</artifactId>
          <groupId>org.apache.velocity</groupId>
        </exclusion>
        <exclusion>
          <artifactId>velocity-tools-generic</artifactId>
          <groupId>org.apache.velocity.tools</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jmustache</artifactId>
          <groupId>com.samskivert</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-unit-core</artifactId>
          <groupId>net.javacrumbs.json-unit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-schema-validator</artifactId>
          <groupId>com.networknt</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-path</artifactId>
          <groupId>com.jayway.jsonpath</groupId>
        </exclusion>
        <exclusion>
          <artifactId>swagger-parser</artifactId>
          <groupId>io.swagger.parser.v3</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlunit-core</artifactId>
          <groupId>org.xmlunit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlunit-placeholders</artifactId>
          <groupId>org.xmlunit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-text</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
        <exclusion>
          <artifactId>classgraph</artifactId>
          <groupId>io.github.classgraph</groupId>
        </exclusion>
        <exclusion>
          <artifactId>simpleclient</artifactId>
          <groupId>io.prometheus</groupId>
        </exclusion>
        <exclusion>
          <artifactId>simpleclient_httpserver</artifactId>
          <groupId>io.prometheus</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.immutables</groupId>
      <artifactId>value</artifactId>
      <version>2.9.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>32.1.2-jre</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>failureaccess</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
        <exclusion>
          <artifactId>listenablefuture</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
        <exclusion>
          <artifactId>checker-qual</artifactId>
          <groupId>org.checkerframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>error_prone_annotations</artifactId>
          <groupId>com.google.errorprone</groupId>
        </exclusion>
        <exclusion>
          <artifactId>j2objc-annotations</artifactId>
          <groupId>com.google.j2objc</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <exclude.tests>io/lakefs/contract/**</exclude.tests>
    <finalName>${project.artifactId}-${project.version}</finalName>
    <hadoop.version>2.7.7</hadoop.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
