<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright 2005-2014 Red Hat, Inc.

     Red Hat licenses this file to you under the Apache License, version
     2.0 (the "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
     implied.  See the License for the specific language governing
     permissions and limitations under the License.

-->
<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>io.fabric8.quickstarts</groupId>
    <artifactId>fabric8-quickstarts-springboot-parent</artifactId>
    <version>1.2.0.Beta2</version>
  </parent>

  <artifactId>springboot-webmvc</artifactId>

  <name>Fabric8 :: Quickstarts :: Spring-Boot :: WebMVC</name>
  <description>Shows how to use Spring Boot with WebMVC in the Java Container</description>

  <properties>
    <!-- Explicitly declaring the source encoding eliminates the following
               message: -->
    <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
        resources, i.e. build is platform dependent! -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <version.compiler.plugin>2.3.1</version.compiler.plugin>
    <version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>

    <!-- the version of the BOM, defining all the dependency versions -->
    <fabric8.bom.version>1.2.0.Beta2</fabric8.bom.version>
    <fabric.version>1.2.0.Beta2</fabric.version>

    <spring-version>4.0.6.RELEASE</spring-version>
    <spring-boot-version>1.1.5.RELEASE</spring-boot-version>

    <!-- maven-compiler-plugin -->
    <maven.compiler.target>1.7</maven.compiler.target>
    <maven.compiler.source>1.7</maven.compiler.source>

    <!-- fabric8 deploy profile configuration -->
    <fabric8.profile>quickstarts-spring.boot-webmvc</fabric8.profile>
    <fabric8.parentProfiles>containers-java.spring.boot</fabric8.parentProfiles>
  </properties>

    <dependencyManagement>
         <dependencies>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>process-spring-boot-bom</artifactId>
                <version>${fabric.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

  <dependencies>
        <!-- BOMs -->
        <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-parent</artifactId>
          <version>${spring-boot-version}</version>
          <type>pom</type>
          <scope>import</scope>
        </dependency>

          <!-- Fabric8 -->
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>process-spring-boot-container</artifactId>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>process-spring-boot-registry</artifactId>
        </dependency>

        <!-- Spring -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-rest-webmvc</artifactId>
        </dependency>

        <!-- Database driver -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

  <build>
    <plugins>
      <!-- Compiler plugin enforces Java 1.7 compatibility and activates annotation processors -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.compiler.plugin}</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>

      <plugin>
          <!--
            this plugin will use the fabric.* properties to configure its behaviour
            see the Properties section here: http://fabric8.io/gitbook/mavenPlugin.html
          -->
          <groupId>io.fabric8</groupId>
          <artifactId>fabric8-maven-plugin</artifactId>
          <version>${fabric.version}</version>
      </plugin>
    </plugins>
  </build>

</project>
