<?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">
  <modelVersion>4.0.0</modelVersion>

  <artifactId>vertx-super-s3</artifactId>
  <packaging>jar</packaging>
  <version>1.2.0</version>
  <name>Vert.x Super S3</name>
  <description>An S3 client library for the Vert.x toolkit</description>
  <url>http://projects.freelibrary.info/vertx-super-s3</url>

  <licenses>
    <license>
      <name>The MIT License</name>
      <url>https://opensource.org/licenses/MIT</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:ksclarke/vertx-super-s3.git</connection>
    <developerConnection>scm:git:git@github.com:ksclarke/vertx-super-s3.git</developerConnection>
    <url>git@github.com:ksclarke/vertx-super-s3.git</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/ksclarke/vertx-super-s3/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <email>ksclarke@ksclarke.io</email>
      <name>Kevin S. Clarke</name>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
  </developers>

  <properties>
    <!-- Dependency versions -->
    <freelib.utils.version>1.0.1</freelib.utils.version>
    <freelib.maven.version>0.0.3</freelib.maven.version>
    <aws.sdk.version>1.11.586</aws.sdk.version>
    <vertx.version>3.7.1</vertx.version>
    <jackson.version>2.10.0</jackson.version>
    <jackson.databind.version>2.10.0</jackson.databind.version>
    <jaxb.version>2.3.0.1</jaxb.version>
    <jaxb.runtime.version>2.4.0-b180830.0438</jaxb.runtime.version>

    <!-- Plug-in versions -->
    <codacy.plugin.version>1.0.2</codacy.plugin.version>
  </properties>

  <dependencies>
    <!-- Project dependencies -->
    <dependency>
      <groupId>info.freelibrary</groupId>
      <artifactId>freelib-utils</artifactId>
      <version>${freelib.utils.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.databind.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
      <version>${vertx.version}</version>
    </dependency>
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-java-sdk-s3</artifactId>
      <version>${aws.sdk.version}</version>
    </dependency>
    <!-- Below dependencies are only used for testing -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-unit</artifactId>
      <version>${vertx.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
      <version>${jaxb.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <version>${jaxb.runtime.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Generate our MessageCodes class from the messages resource file -->
      <plugin>
        <groupId>info.freelibrary</groupId>
        <artifactId>freelib-maven-plugins</artifactId>
        <version>${freelib.maven.version}</version>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>generate-codes</goal>
            </goals>
            <configuration>
              <generatedSourcesDirectory>${project.basedir}/src/main/generated</generatedSourcesDirectory>
              <messageFiles>
                <messageFile>${project.basedir}/src/main/resources/vertx-s3_messages.xml</messageFile>
              </messageFiles>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>info.freelibrary</groupId>
            <artifactId>freelib-resources</artifactId>
            <version>${freelib.resources.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <stylesheetfile>javadocs.css</stylesheetfile>
          <nonavbar>true</nonavbar>
          <show>public</show>
          <nosince>true</nosince>
          <notimestamp>true</notimestamp>
          <bottom> </bottom>
          <detectLinks>false</detectLinks>
          <additionalJOptions>
            <additionalJOption>-J-Dhttp.agent=maven-javadoc-plugin-${project.name}</additionalJOption>
            <!--<additionalJOption>-html5</additionalJOption> -->
          </additionalJOptions>
          <links>
            <link>https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/</link>
            <link>http://vertx.io/docs/apidocs/</link>
          </links>
          <sourcepath>${project.basedir}/src/main/java:${project.basedir}/src/main/generated</sourcepath>
        </configuration>
        <executions>
          <execution>
            <id>site-javadocs</id>
            <phase>site</phase>
            <goals>
              <goal>javadoc</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.gavinmogan</groupId>
        <artifactId>codacy-maven-plugin</artifactId>
        <version>${codacy.plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*IT.java</exclude>
            <exclude>**/*IntegrationTest.java</exclude>
          </excludes>
          <systemPropertyVariables>
            <vertx.logger-delegate-factory-class-name>io.vertx.core.logging.SLF4JLogDelegateFactory</vertx.logger-delegate-factory-class-name>
          </systemPropertyVariables>
          <argLine>${jacoco.agent.arg}</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jbake</groupId>
        <artifactId>jbake-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <!-- S3 integration tests can be run if an AWS/S3 access_key and private_key are supplied -->
  <profiles>
    <profile>
      <id>s3it</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <vertx.s3.bucket>${vertx.s3.bucket}</vertx.s3.bucket>
                <vertx.s3.access_key>${vertx.s3.access_key}</vertx.s3.access_key>
                <vertx.s3.secret_key>${vertx.s3.secret_key}</vertx.s3.secret_key>
                <vertx.s3.region>${vertx.s3.region}</vertx.s3.region>
              </systemPropertyVariables>
              <argLine>${jacoco.agent.arg}</argLine>
              <includes>
                <include>**/*IT.java</include>
                <include>**/*IntegrationTest.java</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <!-- Enables pushing project documentation up to an S3 bucket -->
  <distributionManagement>
    <site>
      <id>s3.site</id>
      <url>s3://projects.freelibrary.info/vertx-super-s3</url>
    </site>
  </distributionManagement>

  <!-- Pulls in standard FreeLibrary Project configuration options -->
  <parent>
    <artifactId>freelib-parent</artifactId>
    <groupId>info.freelibrary</groupId>
    <version>3.7.5</version>
  </parent>

</project>
