<?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>

  <parent>
    <groupId>com.groupbyinc</groupId>
    <artifactId>parent-oss</artifactId>
    <version>6</version>
  </parent>

  <artifactId>quickstart-java</artifactId>
  <version>2.2.57</version>

  <packaging>war</packaging>

  <name>GroupBy - QuickStart - Java</name>
  <description>${project.name}</description>

  <!-- # required for Github plugin -->
  <scm>
    <url>https://github.com/groupby/quickstart-java</url>
    <connection>scm:git:git@github.com:groupby/quickstart-java.git</connection>
    <developerConnection>scm:git:git@github.com:groupby/quickstart-java.git</developerConnection>
    <tag>v2.2.57</tag>
  </scm>

  <properties>

    <!-- # Build params-->
    <project.build.jdkVersion>1.6</project.build.jdkVersion>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.build.locale>en_US</project.build.locale>
    <repo.upload.retryAttempts>3</repo.upload.retryAttempts>

    <groupbyinc.api.version>2.2.57</groupbyinc.api.version>
    <groupbyinc.common.version>45</groupbyinc.common.version>

    <!-- # 3rd-Party Dependency params-->
    <tomcat.embed.version>7.0.64</tomcat.embed.version>
    <tomcat.embed.port>8080</tomcat.embed.port>
    <logger.type>log4j12</logger.type>
    <slf4j.version>1.7.13</slf4j.version>
    <log4j.version>1.2.17</log4j.version>
    <api.servlet.version>2.5</api.servlet.version>
    <api.jsp.version>2.1</api.jsp.version>
    <quickstart.spring.version>4.2.2.RELEASE</quickstart.spring.version>

  </properties>

  <dependencies>

    <!-- ### GroupBy -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>api-java-flux</artifactId>
      <version>${groupbyinc.api.version}</version>
      <classifier>uber</classifier>
    </dependency>
    <dependency>
      <groupId>com.groupbyinc</groupId>
      <artifactId>common-util</artifactId>
      <version>${groupbyinc.common.version}</version>
    </dependency>

    <!-- ### Servlet/JSP/JSTL -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${api.servlet.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>${api.jsp.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.2</version>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
    </dependency>


    <!-- ### Spring -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${quickstart.spring.version}</version>
    </dependency>

    <!-- ### Test -->
    <dependency>
      <groupId>spring</groupId>
      <artifactId>spring-mock</artifactId>
      <version>1.0.2</version>
      <scope>test</scope>
    </dependency>

    <!-- ### Misc -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.4</version>
      <exclusions>
        <exclusion>
          <groupId>commons-lang</groupId>
          <artifactId>commons-lang</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

  </dependencies>

  <build>

    <pluginManagement>

      <plugins>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.3</version>
          <configuration>
            <source>${project.build.jdkVersion}</source>
            <target>${project.build.jdkVersion}</target>
            <compilerVersion>${project.build.jdkVersion}</compilerVersion>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.5</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.6.1</version>
          <configuration>
            <filesets>
              <fileset>
                <directory>${project.basedir}</directory>
                <includes>
                  <include>dependency-reduced-pom.xml</include>
                </includes>
              </fileset>
            </filesets>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <forceCreation>true</forceCreation>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                <packageName />
              </manifest>
              <manifestEntries>
                <Jdk-Compatibility-Version>${project.build.jdkVersion}</Jdk-Compatibility-Version>
                <Maven-Version>${maven.version}</Maven-Version>
                <Encoding>${project.build.sourceEncoding}</Encoding>
                <Built-By>${project.organization.name}</Built-By>
                <Created-By>${project.organization.name}</Created-By>
                <Created-Date>${date.current}</Created-Date>
                <Vendor>${project.organization.name}</Vendor>
                <Vendor-Url>${project.organization.url}</Vendor-Url>
                <Copyright>Copyright (c) ${date.current.year} ${project.organization.name}</Copyright>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <failOnMissingWebXml>false</failOnMissingWebXml>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                <packageName />
              </manifest>
              <manifestEntries>
                <Jdk-Compatibility-Version>${project.build.jdkVersion}</Jdk-Compatibility-Version>
                <Maven-Version>${maven.version}</Maven-Version>
                <Encoding>${project.build.sourceEncoding}</Encoding>
                <Built-By>${project.organization.name}</Built-By>
                <Created-By>${project.organization.name}</Created-By>
                <Created-Date>${date.current}</Created-Date>
                <Vendor>${project.organization.name}</Vendor>
                <Vendor-Url>${project.organization.url}</Vendor-Url>
                <Copyright>Copyright (c) ${date.current.year} ${project.organization.name}</Copyright>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.18.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>2.18.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.2</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
            <tagNameFormat>v@{project.version}</tagNameFormat>
            <pomFileName>pom.xml</pomFileName>
            <releaseProfiles>attach-and-sign</releaseProfiles>
            <preparationGoals>clean versions:update-parent versions:update-properties verify</preparationGoals>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
          <configuration>
            <retryFailedDeploymentCount>${repo.upload.retryAttempts}</retryFailedDeploymentCount>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.9.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.3-SNAPSHOT</version>
          <dependencies>
            <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
              <version>${slf4j.version}</version>
            </dependency>
            <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-${logger.type}</artifactId>
              <version>${slf4j.version}</version>
            </dependency>
            <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>jcl-over-slf4j</artifactId>
              <version>${slf4j.version}</version>
            </dependency>
            <dependency>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
              <version>${log4j.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat.embed</groupId>
              <artifactId>tomcat-embed-core</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-util</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-coyote</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-api</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-jdbc</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-dbcp</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-servlet-api</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-jsp-api</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-jasper</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-jasper-el</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-el-api</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-catalina</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-tribes</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-catalina-ha</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-annotations-api</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat</groupId>
              <artifactId>tomcat-juli</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat.embed</groupId>
              <artifactId>tomcat-embed-logging-juli</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.tomcat.embed</groupId>
              <artifactId>tomcat-embed-logging-log4j</artifactId>
              <version>${tomcat.embed.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>de.jutzig</groupId>
          <artifactId>github-release-plugin</artifactId>
          <version>1.1.1</version>
          <configuration>
            <description>Release v${project.version}</description>
            <releaseName>v${project.version}</releaseName>
            <tag>v${project.version}</tag>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.5</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>

      </plugins>

    </pluginManagement>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <configuration>
          <charset>${project.build.sourceEncoding}</charset>
          <uriEncoding>${project.build.sourceEncoding}</uriEncoding>
          <port>${tomcat.embed.port}</port>
          <path>/quickstart-java</path>
          <systemProperties>
            <file.encoding>${project.build.sourceEncoding}</file.encoding>
          </systemProperties>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <!-- ### set project.version.lowercase property -->
          <execution>
            <id>set-project.version.lowercase-property</id>
            <goals>
              <goal>regex-property</goal>
            </goals>
            <configuration>
              <name>project.version.lowercase</name>
              <value>${project.version}</value>
              <regex>SNAPSHOT</regex>
              <replacement>snapshot</replacement>
              <failIfNoMatch>false</failIfNoMatch>
            </configuration>
          </execution>
          <!-- ### set parsedVersion property (parsed project.version into components) -->
          <execution>
            <id>set-parsedVersion-property</id>
            <goals>
              <goal>parse-version</goal>
            </goals>
          </execution>
          <!-- ### set maven.version property -->
          <execution>
            <id>set-maven.version-property</id>
            <goals>
              <goal>maven-version</goal>
            </goals>
          </execution>
          <!-- ### set date.current property -->
          <execution>
            <id>set-date.current-property</id>
            <goals>
              <goal>timestamp-property</goal>
            </goals>
            <configuration>
              <name>date.current</name>
              <locale>${project.build.locale}</locale>
              <pattern>yyyy-MM-dd'T'HH:mm:ssZ</pattern>
            </configuration>
          </execution>
          <!-- ### set date.current.year property -->
          <execution>
            <id>set-date.current.year-property</id>
            <goals>
              <goal>timestamp-property</goal>
            </goals>
            <configuration>
              <name>date.current.year</name>
              <locale>${project.build.locale}</locale>
              <pattern>yyyy</pattern>
            </configuration>
          </execution>
          <!-- ### set date.current.humanReadable property -->
          <execution>
            <id>set-date.current.humanReadable-property</id>
            <goals>
              <goal>timestamp-property</goal>
            </goals>
            <configuration>
              <name>date.current.humanReadable</name>
              <locale>${project.build.locale}</locale>
              <pattern>MMMM d, yyyy</pattern>
            </configuration>
          </execution>
          <!-- ### remove old installed artifacts from local repo to free up local disk space -->
          <execution>
            <id>remove-old-installers</id>
            <goals>
              <goal>remove-project-artifact</goal>
            </goals>
            <configuration>
              <removeAll>false</removeAll>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <configuration>
          <includes>
            <include>${project.groupId}</include>
          </includes>
          <excludeReactor>true</excludeReactor>
          <properties>
            <property>
              <name>groupbyinc.common.version</name>
              <dependencies>
                <dependency>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>common</artifactId>
                </dependency>
              </dependencies>
            </property>
            <property>
              <name>groupbyinc.api.version</name>
              <dependencies>
                <dependency>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>api-java-flux</artifactId>
                </dependency>
              </dependencies>
            </property>
          </properties>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <directory>${project.build.sourceDirectory}</directory>
              <targetPath>WEB-INF/classes</targetPath>
            </resource>
          </webResources>
        </configuration>
      </plugin>

      <plugin>
        <groupId>de.jutzig</groupId>
        <artifactId>github-release-plugin</artifactId>
        <executions>
          <execution>
            <id>github-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>release</goal>
            </goals>
            <configuration>
              <artifact>${project.build.directory}/${project.artifactId}-${project.version}.war</artifact>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>

  </build>

  <profiles>

    <profile>
      <id>attach-and-sign</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <encoding>${project.build.sourceEncoding}</encoding>
                  <docencoding>${project.build.sourceEncoding}</docencoding>
                  <charset>${project.build.sourceEncoding}</charset>
                  <detectOfflineLinks>false</detectOfflineLinks>
                  <detectJavaApiLink>false</detectJavaApiLink>
                  <detectLinks>false</detectLinks>
                  <validateLinks>false</validateLinks>
                  <additionalparam>-Xdoclint:none</additionalparam>
                  <quiet>true</quiet>
                  <keywords>true</keywords>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

  <repositories>

    <repository>
      <id>sonatype-releases</id>
      <name>Sonatype - Releases</name>
      <url>https://oss.sonatype.org/content/repositories/releases/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <distributionManagement>

    <repository>
      <id>ossrh</id>
      <name>Sonatype OSS - Releases</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>

    <snapshotRepository>
      <id>ossrh</id>
      <name>Sonatype OSS - Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>

  </distributionManagement>

</project>
