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

    <parent>
        <artifactId>spring-boot-starter-parent</artifactId>
        <groupId>org.springframework.boot</groupId>
        <version>1.3.6.RELEASE</version>
        <relativePath/>
    </parent>

    <groupId><%= packageName %></groupId>
    <artifactId><%= dasherizedBaseName %></artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name><%= humanizedBaseName %></name>
    <%_ if (devDatabaseType === 'oracle' || prodDatabaseType === 'oracle') { _%>

    <repositories>
        <repository>
            <id>Local-lib</id>
            <url>file://${project.basedir}/lib</url>
        </repository>
    </repositories>
    <%_ } _%>

    <prerequisites>
        <maven>3.0.0</maven>
    </prerequisites>

    <properties>
        <%_ if (databaseType === 'sql') { _%>
        <hikaricp.version>2.4.6</hikaricp.version>
        <%_ } _%>
        <assertj-core.version>3.3.0</assertj-core.version>
        <awaitility.version>1.7.0</awaitility.version>
        <%_ if (databaseType === 'cassandra' || applicationType === 'gateway') { _%>
        <commons-codec.version>1.10</commons-codec.version>
        <%_ } _%>
        <commons-io.version>2.4</commons-io.version>
        <commons-lang.version>2.6</commons-lang.version>
        <%_ if (testFrameworks.indexOf('cucumber') != -1) { _%>
        <cucumber.version>1.2.4</cucumber.version>
        <%_ } _%>
        <%_ if (!skipClient) { _%>
        <frontend-maven-plugin.version>1.0</frontend-maven-plugin.version>
        <%_ } _%>
        <%_ if (testFrameworks.indexOf('gatling') != -1) { _%>
        <gatling.version>2.1.7</gatling.version>
        <gatling-maven-plugin.version>2.1.7</gatling-maven-plugin.version>
        <%_ } _%>
        <%_ if (clusteredHttpSession === 'hazelcast' || hibernateCache === 'hazelcast') { _%>
        <hazelcast.version>3.6.1</hazelcast.version>
        <%_ } _%>
        <%_ if (databaseType === 'sql') { _%>
        <hibernate.version>4.3.11.Final</hibernate.version>
        <%_ } _%>
        <%_ if (databaseType === 'cassandra' || applicationType === 'gateway') { _%>
        <datastax-driver.version>3.0.1</datastax-driver.version>
        <%_ } _%>
        <java.version>1.<%= javaVersion %></java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <javax.inject.version>1</javax.inject.version>
        <%_ if (devDatabaseType === 'mariadb' || prodDatabaseType === 'mariadb') { _%>
        <mariadb.version>1.4.4</mariadb.version>
        <%_ } _%>
        <%_ if (databaseType === 'sql') { _%>
        <liquibase.version>3.4.2</liquibase.version>
        <liquibase-slf4j.version>1.2.1</liquibase-slf4j.version>
        <liquibase-hibernate4.version>3.5</liquibase-hibernate4.version>
        <%_ } _%>
        <%_ if (databaseType === 'cassandra' || applicationType === 'gateway') { _%>
        <lz4.version>1.3.0</lz4.version>
        <%_ } _%>
        <mapstruct.version>1.0.0.Final</mapstruct.version>
        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
        <maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
        <maven-resources-plugin.version>3.0.0</maven-resources-plugin.version>
        <sortpom-maven-plugin.version>2.5.0</sortpom-maven-plugin.version>
        <metrics-spark-reporter.version>1.2</metrics-spark-reporter.version>
        <metrics-spring.version>3.1.3</metrics-spring.version>
        <logstash-logback-encoder.version>4.6</logstash-logback-encoder.version>
        <%_ if (devDatabaseType === 'postgresql' || prodDatabaseType === 'postgresql') { _%>
        <postgresql.version>9.4-1203-jdbc42</postgresql.version>
        <%_ } _%>
        <run.addResources>false</run.addResources>
        <%_ if (applicationType === 'microservice' || applicationType === 'gateway' || applicationType === 'uaa') { _%>
        <spring-cloud.version>Brixton.SR3</spring-cloud.version>
        <%_ } _%>
        <spring-security.version>4.1.0.RELEASE</spring-security.version>
        <%_ if (authenticationType === 'oauth2' || authenticationType === 'uaa') { _%>
        <spring-security-oauth2.version>2.0.9.RELEASE</spring-security-oauth2.version>
        <%_ } _%>
        <springfox.version>2.5.0</springfox.version>
        <%_ if (enableSocialSignIn) { _%>
        <!-- Spring social -->
        <httpclient.version>4.5.1</httpclient.version>
        <spring-social-security.version>1.1.2.RELEASE</spring-social-security.version>
        <spring-social-google.version>1.0.0.RELEASE</spring-social-google.version>
        <spring-social-facebook.version>2.0.3.RELEASE</spring-social-facebook.version>
        <spring-social-twitter.version>1.1.2.RELEASE</spring-social-twitter.version>
        <%_ } _%>
        <!-- Sonar properties -->
        <project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
        <sonar-maven-plugin.version>3.0.2</sonar-maven-plugin.version>
        <jacoco-maven-plugin.version>0.7.6.201602180812</jacoco-maven-plugin.version>
        <sonar.exclusions><%= CLIENT_MAIN_SRC_DIR %>content/**/*.*, <%= CLIENT_MAIN_SRC_DIR %>bower_components/**/*.*, <%= CLIENT_DIST_DIR %>**/*.*</sonar.exclusions>
        <sonar.java.codeCoveragePlugin>jacoco</sonar.java.codeCoveragePlugin>
        <sonar.jacoco.itReportPath>${project.testresult.directory}/coverage/jacoco/jacoco-it.exec</sonar.jacoco.itReportPath>
        <sonar.jacoco.reportPath>${project.testresult.directory}/coverage/jacoco/jacoco.exec</sonar.jacoco.reportPath>

        <sonar.javascript.jstestdriver.reportsPath>${project.testresult.directory}/karma</sonar.javascript.jstestdriver.reportsPath>
        <sonar.javascript.lcov.reportPath>${project.testresult.directory}/coverage/report-lcov/lcov.info</sonar.javascript.lcov.reportPath>

        <sonar.sources>${project.basedir}/<%= MAIN_DIR %></sonar.sources>
        <sonar.surefire.reportsPath>${project.testresult.directory}/surefire-reports</sonar.surefire.reportsPath>
        <sonar.tests>${project.basedir}/<%= TEST_DIR %></sonar.tests>
        <!-- These remain empty unless the corresponding profile is active -->
        <profile.no-liquibase></profile.no-liquibase>
        <profile.swagger></profile.swagger>
    </properties>

    <%_ if (applicationType === 'microservice' || applicationType === 'gateway' || applicationType === 'uaa') { _%>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <%_ } _%>

    <dependencies>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-annotation</artifactId>
            <version>${dropwizard-metrics.version}</version>
        </dependency>
        <%_ if (hibernateCache === 'ehcache') { _%>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-ehcache</artifactId>
            <version>${dropwizard-metrics.version}</version>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-graphite</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-healthchecks</artifactId>
            <version>${dropwizard-metrics.version}</version>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-json</artifactId>
            <version>${dropwizard-metrics.version}</version>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-jvm</artifactId>
            <version>${dropwizard-metrics.version}</version>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-servlet</artifactId>
            <version>${dropwizard-metrics.version}</version>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-servlets</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>metrics-healthchecks</artifactId>
                    <groupId>io.dropwizard.metrics</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <%_ if (databaseType === 'sql') { _%>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-hibernate4</artifactId>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-hppc</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-json-org</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <%_ if (devDatabaseType != 'h2Disk' && devDatabaseType != 'h2Memory') { _%>
            <scope>test</scope>
            <%_ } _%>
        </dependency>
        <%_ if (hibernateCache === 'hazelcast' || clusteredHttpSession === 'hazelcast') { _%>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>
        <%_ } _%>
        <%_ if (hibernateCache === 'hazelcast') { _%>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-hibernate4</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-spring</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>
        <%_ } _%>
        <%_ if (clusteredHttpSession === 'hazelcast') { _%>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-wm</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>com.jayway.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${awaitility.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <scope>test</scope>
            <!-- parent POM declares this dependency in default (compile) scope -->
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${springfox.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mapstruct</groupId>
                    <artifactId>mapstruct</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <%_ if (databaseType === 'sql') { _%>
        <dependency>
            <groupId>com.mattbertolini</groupId>
            <artifactId>liquibase-slf4j</artifactId>
            <version>${liquibase-slf4j.version}</version>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>com.ryantenney.metrics</groupId>
            <artifactId>metrics-spring</artifactId>
            <version>${metrics-spring.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.codahale.metrics</groupId>
                    <artifactId>metrics-annotation</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.codahale.metrics</groupId>
                    <artifactId>metrics-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.codahale.metrics</groupId>
                    <artifactId>metrics-healthchecks</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <%_ if (databaseType === 'sql') { _%>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>tools</artifactId>
                    <groupId>com.sun</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- The HikariCP Java Agent is disabled by default, as it is experimental
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP-agent</artifactId>
            <version>${HikariCP.version}</version>
        </dependency>
        -->
        <%_ } %>
        <%_ if (databaseType === 'cassandra' || applicationType === 'gateway') { _%>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commons-codec.version}</version>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>${commons-lang.version}</version>
        </dependency>
        <%_ if (databaseType === 'mongodb') { _%>
        <dependency>
            <groupId>de.flapdoodle.embed</groupId>
            <artifactId>de.flapdoodle.embed.mongo</artifactId>
            <scope>test</scope>
        </dependency>
        <%_ } _%>
        <%_ if (testFrameworks.indexOf('gatling') != -1) { _%>
        <dependency>
            <groupId>io.gatling.highcharts</groupId>
            <artifactId>gatling-charts-highcharts</artifactId>
            <version>${gatling.version}</version>
            <scope>test</scope>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>${javax.inject.version}</version>
        </dependency>
        <%_ if (devDatabaseType === 'mysql' || prodDatabaseType === 'mysql') { _%>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <%_ } _%>
        <%_ if (devDatabaseType === 'mariadb' || prodDatabaseType === 'mariadb') { _%>
        <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
            <version>${mariadb.version}</version>
        </dependency>
        <%_ } _%>
        <%_ if (databaseType === 'cassandra' || applicationType === 'gateway') { _%>
        <dependency>
            <groupId>net.jpountz.lz4</groupId>
            <artifactId>lz4</artifactId>
            <version>${lz4.version}</version>
        </dependency>
        <%_ } _%>
        <%_ if (devDatabaseType === 'oracle' || prodDatabaseType === 'oracle') { _%>
        <dependency>
            <groupId>oracle</groupId>
            <artifactId>ojdbc</artifactId>
            <version>7</version>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj-core.version}</version>
            <scope>test</scope>
        </dependency>
        <%_ if (databaseType === 'cassandra') { _%>
        <dependency>
            <groupId>org.cassandraunit</groupId>
            <artifactId>cassandra-unit-spring</artifactId>
            <version>3.0.0.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <%_ } _%>
        <%_ if (hibernateCache === 'ehcache' && databaseType === 'sql') { _%>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-ehcache</artifactId>
            <version>${hibernate.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>net.sf.ehcache</groupId>
                    <artifactId>ehcache-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <%_ } _%>
        <%_ if (databaseType === 'sql') { _%>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-envers</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>jetty-servlet</artifactId>
                    <groupId>org.eclipse.jetty</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <%_ } _%>
        <%_ if (databaseType === 'mongodb') { _%>
        <dependency>
            <groupId>com.github.mongobee</groupId>
            <artifactId>mongobee</artifactId>
            <version>0.10</version>
        </dependency>
        <%_ } _%>
        <%_ if (devDatabaseType === 'postgresql' || prodDatabaseType === 'postgresql') { _%>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-jdk8</artifactId>
            <version>${mapstruct.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-loader-tools</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <%_ if (databaseType === 'sql') { _%>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <%_ } _%>
        <%_ if (searchEngine === 'elasticsearch') { _%>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
        </dependency>
        <%_ } _%>
        <%_ if (databaseType === 'mongodb') { _%>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <%_ if (websocket === 'spring-websocket') { _%>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>
        <%_ } _%>
        <%_ if (authenticationType === 'oauth2') { _%>
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
            <version>${spring-security-oauth2.version}</version>
        </dependency>
        <%_ } _%>
        <%_ if (authenticationType === 'jwt') { _%>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.6.0</version>
        </dependency>
        <%_ } _%>
        <%_ if (authenticationType === 'uaa') { _%>
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
            <version>${spring-security-oauth2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-jwt</artifactId>
        </dependency>
        <%_ } _%>
        <%_ if (databaseType === 'cassandra' || applicationType === 'gateway') { _%>
        <!-- DataStax driver -->
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
            <version>${datastax-driver.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.codahale.metrics</groupId>
                    <artifactId>metrics-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-extras</artifactId>
            <version>${datastax-driver.version}</version>
        </dependency>
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-mapping</artifactId>
            <version>${datastax-driver.version}</version>
        </dependency>
        <%_ } _%>
        <!-- Spring Cloud -->
        <%_ if (applicationType === 'gateway') { _%>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zuul</artifactId>
        </dependency>
        <%_ } _%>
        <%_ if (applicationType === 'microservice' || applicationType === 'gateway' || applicationType === 'uaa') { _%>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-ribbon</artifactId>
            <!-- netty's native is pulled, but is useless unless you explicitly add the native binary dependency.
                 Having it in the classpath without the binary can cause warnings -->
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport-native-epoll</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-spectator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.retry</groupId>
            <artifactId>spring-retry</artifactId>
        </dependency>
        <%_ } _%>
        <dependency>
            <groupId>net.logstash.logback</groupId>
            <artifactId>logstash-logback-encoder</artifactId>
            <version>${logstash-logback-encoder.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-access</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-cloudfoundry-connector</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-spring-service-connector</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-localconfig-connector</artifactId>
        </dependency>
        <!-- security -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-data</artifactId>
        </dependency>
        <%_ if (websocket === 'spring-websocket') { _%>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-messaging</artifactId>
            <version>${spring-security.version}</version>
        </dependency>
        <%_ } _%>
        <!-- reporting -->
        <dependency>
            <groupId>fr.ippon.spark.metrics</groupId>
            <artifactId>metrics-spark-reporter</artifactId>
            <version>${metrics-spark-reporter.version}</version>
        </dependency>
        <%_ if (enableSocialSignIn) { _%>
        <!-- social -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-google</artifactId>
            <version>${spring-social-google.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-facebook</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-twitter</artifactId>
        </dependency>
        <%_ } _%>
        <%_ if (testFrameworks.indexOf('cucumber') != -1) { _%>
        <!-- cucumber -->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-spring</artifactId>
            <version>${cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <%_ } _%>
        <!-- jh-genesis-needle-maven-add-dependency -->
    </dependencies>
    <build>
        <defaultGoal>spring-boot:run</defaultGoal>
        <%_ if (testFrameworks.indexOf('cucumber') != -1) { _%>
        <testResources>
            <testResource>
                <directory><%= SERVER_TEST_RES_DIR %></directory>
            </testResource>
            <testResource>
                <directory><%= TEST_DIR %>features</directory>
            </testResource>
        </testResources>
        <%_ } _%>
        <plugins>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
                <version>${sortpom-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sortProperties>true</sortProperties>
                    <nrOfIndentSpace>4</nrOfIndentSpace>
                    <sortDependencies>groupId,artifactId</sortDependencies>
                    <sortPlugins>groupId,artifactId</sortPlugins>
                    <keepBlankLines>true</keepBlankLines>
                    <expandEmptyElements>false</expandEmptyElements>
                </configuration>
            </plugin>
            <%_ if (testFrameworks.indexOf('gatling') != -1) { _%>
            <plugin>
                <groupId>io.gatling</groupId>
                <artifactId>gatling-maven-plugin</artifactId>
                <version>${gatling-maven-plugin.version}</version>
                <configuration>
                    <configFolder><%= TEST_DIR %>gatling/conf</configFolder>
                    <dataFolder><%= TEST_DIR %>gatling/data</dataFolder>
                    <resultsFolder>target/gatling/results</resultsFolder>
                    <bodiesFolder><%= TEST_DIR %>gatling/bodies</bodiesFolder>
                    <simulationsFolder><%= TEST_DIR %>gatling/simulations</simulationsFolder>
                    <!-- This will force Gatling to ask which simulation to run
                      This is useful when you have multiple simulations -->
                    <simulationClass>*</simulationClass>
                </configuration>
            </plugin>
            <%_ } _%>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <rules>
                        <requireMavenVersion>
                            <message>You are running an older version of Maven. JHGenesis requires at least Maven 3.0</message>
                            <version>[3.0.0,)</version>
                        </requireMavenVersion>
                        <requireJavaVersion>
                            <message>You are running an older version of Java. JHGenesis requires at least JDK ${java.version}</message>
                            <version>[${java.version}.0,)</version>
                        </requireJavaVersion>
                    </rules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven-resources-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/classes</outputDirectory>
                            <useDefaultDelimiters>false</useDefaultDelimiters>
                            <delimiters>
                                <delimiter>#</delimiter>
                            </delimiters>
                            <resources>
                                <resource>
                                    <directory><%= SERVER_MAIN_RES_DIR %></directory>
                                    <filtering>true</filtering>
                                    <includes>
                                        <include>**/*.xml</include>
                                        <include>**/*.yml</include>
                                    </includes>
                                </resource>
                                <resource>
                                    <directory><%= SERVER_MAIN_RES_DIR %></directory>
                                    <filtering>false</filtering>
                                    <excludes>
                                        <exclude>**/*.xml</exclude>
                                        <exclude>**/*.yml</exclude>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <%_ if (testFrameworks.indexOf('cucumber') != -1) { _%>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <excludes>
                                <exclude>**/Abstract*.java</exclude>
                                <exclude>**/*Cucumber*.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>without-cucumber</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                              <include>**/*Cucumber*.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
                <%_ } _%>
                <configuration>
                    <argLine>-Djava.security.egd=file:/dev/./urandom -Xmx256m ${surefireArgLine}</argLine>
                    <!-- Force alphabetical order to have a reproducible build -->
                    <runOrder>alphabetical</runOrder>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>pre-unit-tests</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->
                            <destFile>${project.testresult.directory}/coverage/jacoco/jacoco.exec</destFile>
                            <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
                            <propertyName>surefireArgLine</propertyName>
                        </configuration>
                    </execution>
                    <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run -->
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${project.testresult.directory}/coverage/jacoco/jacoco.exec</dataFile>
                            <outputDirectory>${project.testresult.directory}/coverage/jacoco</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>${sonar-maven-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <version>2.2.4</version>
                <configuration>
                    <defaultOutputDirectory>
                        ${project.build.directory}/generated-sources
                    </defaultOutputDirectory>
                    <processors>
                        <processor>org.mapstruct.ap.MappingProcessor</processor>
                    </processors>
                    <options>
                        <mapstruct.suppressGeneratorTimestamp>true</mapstruct.suppressGeneratorTimestamp>
                        <mapstruct.defaultComponentModel>spring</mapstruct.defaultComponentModel>
                    </options>
                </configuration>
                <executions>
                    <execution>
                        <id>process</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>process</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.mapstruct</groupId>
                        <artifactId>mapstruct-processor</artifactId>
                        <version>${mapstruct.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <%_ if (databaseType === 'sql') { _%>
            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>${liquibase.version}</version>
                <configuration>
                    <changeLogFile><%= SERVER_MAIN_RES_DIR %>config/liquibase/master.xml</changeLogFile>
                    <diffChangeLogFile><%= SERVER_MAIN_RES_DIR %>config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
                    <driver><% if (devDatabaseType === 'mysql') { %>com.mysql.jdbc.Driver<% } else if (devDatabaseType === 'mariadb') { %>org.mariadb.jdbc.Driver<% } else if (devDatabaseType === 'postgresql') { %>org.postgresql.Driver<% } else if (devDatabaseType === 'h2Disk') { %>org.h2.Driver<% } else if (devDatabaseType === 'oracle') { %>oracle.jdbc.OracleDriver<% } %></driver>
                    <url><% if (devDatabaseType === 'mysql') { %>jdbc:mysql://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'mariadb') { %>jdbc:mariadb://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'postgresql') { %>jdbc:postgresql://localhost:5432/<%= baseName %><% } else if (devDatabaseType === 'h2Disk') { %>jdbc:h2:file:./target/h2db/db/<%= lowercaseBaseName %><% } else if (devDatabaseType === 'oracle') { %>jdbc:oracle:thin:@localhost:1521:<%= baseName %><% } %></url>
                    <defaultSchemaName><% if (devDatabaseType === 'mysql') { %><%= baseName %><% } else if (devDatabaseType === 'postgresql') { %><% } %></defaultSchemaName>
                    <username><% if (devDatabaseType === 'mysql') { %>root<% } else if (devDatabaseType === 'postgresql' || devDatabaseType === 'h2Disk' || devDatabaseType === 'h2Memory') { %><%= baseName %><% } %></username>
                    <password></password>
                    <referenceUrl>hibernate:spring:<%=packageName%>.domain?dialect=<% if (devDatabaseType === 'mysql') { %>org.hibernate.dialect.MySQL5InnoDBDialect<% } else if (devDatabaseType === 'mariadb') { %>org.hibernate.dialect.MySQL5InnoDBDialect<% } else if (devDatabaseType === 'postgresql') { %>org.hibernate.dialect.PostgreSQL82Dialect<% } else if (devDatabaseType === 'h2Disk') { %>org.hibernate.dialect.H2Dialect<% } else if (devDatabaseType === 'oracle') { %>org.hibernate.dialect.Oracle10gDialect<% } %>&amp;hibernate.ejb.naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy</referenceUrl>
                    <verbose>true</verbose>
                    <logging>debug</logging>
                    <%_ if (authenticationType === 'oauth2') { _%>
                    <diffExcludeObjects>oauth_access_token, oauth_approvals, oauth_client_details, oauth_client_token, oauth_code, oauth_refresh_token</diffExcludeObjects>
                    <%_ } _%>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.javassist</groupId>
                        <artifactId>javassist</artifactId>
                        <version>3.18.2-GA</version>
                    </dependency>
                    <dependency>
                        <groupId>org.liquibase.ext</groupId>
                        <artifactId>liquibase-hibernate4</artifactId>
                        <version>${liquibase-hibernate4.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-data-jpa</artifactId>
                        <version>${project.parent.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <%_ } _%>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                    <!--
                    Enable the line below to have remote debugging of your application on port 5005
                    <jvmArguments>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</jvmArguments>
                    -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.10</version>
                <configuration>
                    <imageName><%= baseName.toLowerCase() %></imageName>
                    <dockerDirectory>src/main/docker</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.war</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
            <!-- jh-genesis-needle-maven-add-plugin -->
        </plugins>
        <pluginManagement>
            <plugins>
                <!--
                    This plugin's configuration is used to store Eclipse m2e settings only.
                    It has no influence on the Maven build itself.
                    Remove when the m2e plugin can correctly bind to Maven lifecycle
                -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.jacoco</groupId>
                                        <artifactId>
                                            jacoco-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            ${jacoco-maven-plugin.version}
                                        </versionRange>
                                        <goals>
                                            <goal>prepare-agent</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution><% if(!skipClient) {%>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>com.github.eirslett</groupId>
                                        <artifactId>
                                            frontend-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            ${frontend-maven-plugin.version}
                                        </versionRange>
                                        <goals>
                                            <goal>install-node-and-npm</goal>
                                            <goal>npm</goal>
                                            <goal>bower</goal>
                                            <goal>gulp</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution><% } %>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
             </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>no-liquibase</id>
            <properties>
                <profile.no-liquibase>,no-liquibase</profile.no-liquibase>
            </properties>
        </profile>
        <profile>
            <id>swagger</id>
            <properties>
                <profile.swagger>,swagger</profile.swagger>
            </properties>
        </profile>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-devtools</artifactId>
                    <optional>true</optional>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration><% if (!skipClient) { %>
                            <warSourceDirectory><%= CLIENT_MAIN_SRC_DIR %></warSourceDirectory><% } %>
                            <packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <!-- log configuration -->
                <logback.loglevel>DEBUG</logback.loglevel>
                <!-- default Spring profiles -->
                <spring.profiles.active>dev${profile.no-liquibase}</spring.profiles.active>
            </properties>
        </profile>
        <profile>
            <id>prod</id>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins><% if(!skipClient) {%>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>1.0</version>
                        <executions>
                            <execution>
                                <id>install node and npm</id>
                                <goals>
                                    <goal>install-node-and-npm</goal>
                                </goals>
                                <configuration>
                                    <nodeVersion>v4.4.7</nodeVersion>
                                    <npmVersion>3.10.5</npmVersion>
                                </configuration>
                            </execution>
                            <execution>
                                <id>npm install</id>
                                <goals>
                                    <goal>npm</goal>
                                </goals>
                                <configuration>
                                    <arguments>install</arguments>
                                </configuration>
                            </execution><% if(useSass) {%>
                            <execution>
                                <id>npm rebuild node-sass</id>
                                <goals>
                                    <goal>npm</goal>
                                </goals>
                                <configuration>
                                    <arguments>rebuild node-sass</arguments>
                                </configuration>
                            </execution><% } %>
                            <execution>
                                <id>bower install</id>
                                <goals>
                                    <goal>bower</goal>
                                </goals>
                                <configuration>
                                    <arguments>install --no-color</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>gulp build</id>
                                <goals>
                                    <goal>gulp</goal>
                                </goals>
                                <configuration>
                                    <arguments>build --no-notification</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>gulp test</id>
                                <goals>
                                    <goal>gulp</goal>
                                </goals>
                                <phase>test</phase>
                                <configuration>
                                    <arguments>test --no-notification</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin><% } %>
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <filesets>
                                <fileset>
                                    <directory><%= CLIENT_DIST_DIR %></directory>
                                </fileset>
                            </filesets>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration><% if (!skipClient) { %>
                            <warSourceDirectory><%= CLIENT_DIST_DIR %></warSourceDirectory><% } %>
                            <packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <executable>true</executable>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <!-- log configuration -->
                <logback.loglevel>INFO</logback.loglevel>
                <!-- default Spring profiles -->
                <spring.profiles.active>prod${profile.swagger}${profile.no-liquibase}</spring.profiles.active>
            </properties>
        </profile>
    </profiles>
</project>
