<?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>
  <groupId>com.amazonaws</groupId>
  <artifactId>aws-dynamodb-session-tomcat</artifactId>
  <name>Amazon DynamoDB Session Manager for Tomcat</name>
  <version>2.0.1</version>
  <description>The Amazon DynamoDB Session Manager for Tomcat provides a custom session manager for Tomcat 7 that stores session data in Amazon DynamoDB, Amazon's fully managed NoSQL database service.</description>
  <url>https://aws.amazon.com/java</url>
  <developers>
    <developer>
      <id>amazonwebservices</id>
      <organization>Amazon Web Services</organization>
      <organizationUrl>https://aws.amazon.com</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://aws.amazon.com/apache2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>https://github.com/aws/aws-dynamodb-session-tomcat.git</url>
  </scm>
  <build>
    <resources>
      <resource>
        <directory>${basedir}</directory>
        <includes>
          <include>LICENSE.txt</include>
          <include>NOTICE.txt</include>
          <include>README.md</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer />
                <transformer>
                  <addHeader>false</addHeader>
                </transformer>
              </transformers>
              <minimizeJar>true</minimizeJar>
              <relocations>
                <relocation>
                  <pattern>com.amazonaws</pattern>
                  <shadedPattern>com.amazonaws.tomcatsessionmanager.amazonaws</shadedPattern>
                  <excludes>
                    <exclude>com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager</exclude>
                  </excludes>
                </relocation>
                <relocation>
                  <pattern>org.apache.http</pattern>
                  <shadedPattern>com.amazonaws.tomcatsessionmanager.apache.http</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.logging</pattern>
                  <shadedPattern>com.amazonaws.tomcatsessionmanager.apache.commons.logging</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.codec</pattern>
                  <shadedPattern>com.amazonaws.tomcatsessionmanager.apache.commons.codec</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml</pattern>
                  <shadedPattern>com.amazonaws.tomcatsessionmanager.fasterxml</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.joda.time</pattern>
                  <shadedPattern>com.amazonaws.tomcatsessionmanager.joda.time</shadedPattern>
                </relocation>
              </relocations>
              <artifactSet>
                <includes>
                  <include>com.amazonaws:aws-java-sdk*</include>
                  <include>commons-logging:*</include>
                  <include>org.apache.httpcomponents:*</include>
                  <include>commons-codec:*</include>
                  <include>com.fasterxml.jackson.core:*</include>
                  <include>joda-time:*</include>
                </includes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>commons-logging:commons-logging</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.fasterxml.jackson.core:*</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>publishing</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.5.1</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>injected-nexus-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <serverId>sonatype-nexus-staging</serverId>
                  <nexusUrl>https://oss.sonatype.org</nexusUrl>
                  <releaseAfterClose>true</releaseAfterClose>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <serverId>sonatype-nexus-staging</serverId>
              <nexusUrl>https://oss.sonatype.org</nexusUrl>
              <releaseAfterClose>true</releaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-catalina</artifactId>
      <version>7.0.64</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>tomcat-servlet-api</artifactId>
          <groupId>org.apache.tomcat</groupId>
        </exclusion>
        <exclusion>
          <artifactId>tomcat-juli</artifactId>
          <groupId>org.apache.tomcat</groupId>
        </exclusion>
        <exclusion>
          <artifactId>tomcat-annotations-api</artifactId>
          <groupId>org.apache.tomcat</groupId>
        </exclusion>
        <exclusion>
          <artifactId>tomcat-api</artifactId>
          <groupId>org.apache.tomcat</groupId>
        </exclusion>
        <exclusion>
          <artifactId>tomcat-util</artifactId>
          <groupId>org.apache.tomcat</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.10.19</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-java-sdk-test-utils</artifactId>
      <version>1.10.20</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-core</artifactId>
      <version>7.0.64</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-jasper</artifactId>
      <version>7.0.64</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>tomcat-embed-el</artifactId>
          <groupId>org.apache.tomcat.embed</groupId>
        </exclusion>
        <exclusion>
          <artifactId>ecj</artifactId>
          <groupId>org.eclipse.jdt.core.compiler</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>

