<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.oracle.oci.sdk</groupId>
  <artifactId>oci-hdfs</artifactId>
  <version>2.9.2.4</version>
  <packaging>pom</packaging>

  <name>Oracle Cloud Infrastructure HDFS Connector for Storage Service</name>
  <description>This project contains the HDFS connector used to integrate with the Oracle Cloud Infrastructure Object Storage Service</description>
  <url>https://docs.cloud.oracle.com/Content/API/SDKDocs/hdfsconnector.htm</url>
  <inceptionYear>2016</inceptionYear>

  <licenses>
    <license>
      <name>The Universal Permissive License (UPL), Version 1.0</name>
      <url>http://www.oracle.com/technetwork/licenses/upl-license-2927578.html</url>
      <distribution>repo</distribution>
    </license>
    <license>
      <name>Apache License 2.0</name>
      <url>http://apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>oracle</id>
      <name>Oracle</name>
      <organizationUrl>https://www.oracle.com</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:oracle/oci-hdfs-connector.git</connection>
    <url>https://github.com/oracle/oci-hdfs-connector</url>
  </scm>
  <distributionManagement>
    <repository>
        <id>bintray-${env.BINTRAY_GROUPNAME}-${env.BINTRAY_REPOSITORY_NAME}</id>
        <name>${env.BINTRAY_GROUPNAME}-${env.BINTRAY_REPOSITORY_NAME}</name>
        <url>https://api.bintray.com/maven/${env.BINTRAY_GROUPNAME}/${env.BINTRAY_REPOSITORY_NAME}/${env.JAVA_PROJECT_NAME}/;publish=${env.BINTRAY_PUBLISH}</url>
    </repository>
  </distributionManagement>

  <properties>
    <hadoop.version>2.9.2</hadoop.version>
  </properties>

  <profiles>
    <profile>
      <id>dev</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.theoryinpractise</groupId>
            <artifactId>googleformatter-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>timestamp-property</id>
                <goals>
                  <goal>timestamp-property</goal>
                </goals>
                <phase>validate</phase>
                <configuration>
                  <name>current.year</name>
                  <pattern>yyyy</pattern>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-sources</phase>
                <goals>
                  <goal>format</goal>
                </goals>
                <configuration>
                  <properties>
                    <current.year>${current.year}</current.year>
                  </properties>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>bintray-deploy</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <id>deploy-file</id>
                <phase>deploy</phase>
                <goals>
                    <goal>deploy-file</goal>
                </goals>
                <configuration>
                  <file>pom.xml</file>
                  <pomFile>pom.xml</pomFile>
                  <url>https://api.bintray.com/maven/${env.BINTRAY_GROUPNAME}/${env.BINTRAY_REPOSITORY_NAME}/${env.JAVA_PROJECT_NAME}/;publish=${env.BINTRAY_PUBLISH}</url>
                  <repositoryId>bintray-${env.BINTRAY_GROUPNAME}-${env.BINTRAY_REPOSITORY_NAME}</repositoryId>
                  <retryFailedDeploymentCount>5</retryFailedDeploymentCount>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <pluginManagement>
      <plugins>
        <!-- Auto formats all of the source code -->
        <plugin>
          <groupId>com.theoryinpractise</groupId>
          <artifactId>googleformatter-maven-plugin</artifactId>
          <version>1.0.5</version>
          <executions>
            <execution>
              <id>reformat-sources</id>
              <configuration>
                <includeStale>false</includeStale>
                <style>AOSP</style>
                <filterModified>true</filterModified>
                <skip>false</skip>
              </configuration>
              <goals>
                <goal>format</goal>
              </goals>
              <phase>process-sources</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.5.1</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok-maven-plugin</artifactId>
          <version>1.16.8.0</version>
          <executions>
            <execution>
              <id>delombok</id>
              <phase>process-sources</phase>
              <goals>
                <goal>delombok</goal>
              </goals>
              <configuration>
                <addOutputDirectory>false</addOutputDirectory>
                <outputDirectory>target/generated-sources-for-docs/delombok</outputDirectory>
                <sourceDirectory>src/main/java</sourceDirectory>
                <encoding>UTF-8</encoding>
                <formatPreferences>
                  <javaLangAsFQN>skip</javaLangAsFQN>
                  <generateDelombokComment>skip</generateDelombokComment>
                  <generated>skip</generated>
                  <indent>4</indent>
                  <suppressWarnings>skip</suppressWarnings>
                </formatPreferences>
                <verbose>true</verbose>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.12</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>3.0</version>
          <configuration>
            <aggregate>true</aggregate>
            <header>licenseheader.txt</header>
            <includes>
              <include>src/main/java/**/*.java</include>
              <include>src/test/java/**/*.java</include>
            </includes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>verify</phase>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
          <goals>
            <goal>jar</goal>
          </goals>
          <executions>
            <execution>
              <id>aggregate</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <!-- Exclude all of the internal 'store' classes from public Javadoc -->
            <excludePackageNames>*.store.*, *.util.*</excludePackageNames>
            <aggregate>true</aggregate>
            <minmemory>128m</minmemory>
            <maxmemory>1024m</maxmemory>
            <additionalparam>-Xdoclint:none</additionalparam>
            <sourcepath>target/generated-sources-for-docs/delombok</sourcepath>
            <links>
              <link>https://hadoop.apache.org/docs/r${hadoop.version}/api/</link>
            </links>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.6</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>
    <!-- Build only dependencies -->
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.16.7</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <modules>
    <module>hdfs-connector</module>
    <module>hdfs-example</module>
  </modules>
</project>
