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

  <groupId>com.mainstreethub</groupId>
  <artifactId>ecr-maven-plugin</artifactId>
  <version>0.1.0</version>
  <packaging>maven-plugin</packaging>
  <name>Main Street Hub Maven ECR Plugin</name>
  <description>Maven plugin to manage obtaining ECR credentials.</description>
  <url>https://github.com/mainstreethub/ecr-maven-plugin</url>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Alex Wenckus</name>
      <email>alex.wenckus@mainstreethub.com</email>
      <organization>MainStreetHub</organization>
      <organizationUrl>http://www.mainstreethub.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/mainstreethub/ecr-maven-plugin</url>
    <connection>scm:git:git@github.com:mainstreethub/ecr-maven-plugin</connection>
    <developerConnection>scm:git:git@github.com:mainstreethub/ecr-maven-plugin</developerConnection>
    <tag>v0.1.0</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <java.minimum.version>1.8</java.minimum.version>

    <aws.version>1.10.71</aws.version>
    <maven.version>3.3.9</maven.version>
  </properties>

  <dependencies>
    <!-- MAVEN -->
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.4</version>
      <scope>provided</scope>
    </dependency>

    <!-- APP -->
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-java-sdk-ecr</artifactId>
      <version>${aws.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>19.0</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <phase>initialize</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.0</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>${java.minimum.version}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>${java.minimum.version}</source>
          <target>${java.minimum.version}</target>

          <compilerArgs>
            <arg>-Werror</arg>
            <arg>-Xlint:all</arg>

            <!--
              We have a lot of annotations that are just markers for things and not used by
              annotation processors.  This argument will make javac not produce a warning
              message for annotations that are used that lack processors.  This is important
              because we have the "treat all warnings as errors" flag set above.
            -->
            <arg>-Xlint:-processing</arg>
          </compilerArgs>

          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>

      <!-- Release tags should be v<VERSION>. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <tagNameFormat>v@{project.version}</tagNameFormat>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
        </configuration>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <configLocation>checkstyle.xml</configLocation>
              <violationSeverity>warning</violationSeverity>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- When releasing to Maven Central, all artifacts must be GPG signed. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
</project>