<!--

    Copyright (c) 2015 Bosch Software Innovations GmbH and others.

    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html

-->
<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>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>1.2.8.RELEASE</version>
   </parent>

   <groupId>org.eclipse.hawkbit</groupId>
   <artifactId>hawkbit-parent</artifactId>
   <version>0.2.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>hawkBit :: Parent</name>

   <modules>
      <module>hawkbit-core</module>
      <module>hawkbit-security-core</module>
      <module>hawkbit-rest-core</module>
      <module>hawkbit-mgmt-api</module>
      <module>hawkbit-mgmt-resource</module>
      <module>hawkbit-ddi-api</module>
      <module>hawkbit-ddi-dl-api</module>
      <module>hawkbit-ddi-resource</module>
      <module>hawkbit-dmf-api</module>
      <module>hawkbit-dmf-amqp</module>
      <module>hawkbit-repository</module>
      <module>hawkbit-security-integration</module>
      <module>hawkbit-http-security</module>
      <module>hawkbit-ui</module>
      <module>hawkbit-artifact-repository-mongo</module>
      <module>hawkbit-autoconfigure</module>
      <module>hawkbit-cache-redis</module>
      <module>hawkbit-test-report</module>
      <module>examples</module>
   </modules>


   <scm>
      <connection>${release.scm.connection}</connection>
      <developerConnection>${release.scm.developerConnection}</developerConnection>
      <url>${release.scm.url}</url>
   </scm>

   <repositories>
      <repository>
         <id>vaadin-addons</id>
         <url>http://maven.vaadin.com/vaadin-addons</url>
      </repository>
   </repositories>

   <properties>
      <java.version>1.8</java.version>
   
      <spring.boot.version>1.2.8.RELEASE</spring.boot.version>

      <!-- Spring boot version overrides (should be reviewed with every boot upgrade) - START -->
      <!-- Newer versions needed than defined in Boot-->
      <jackson.version>2.5.5</jackson.version>
      <hibernate-validator.version>5.2.4.Final</hibernate-validator.version>
      <spring-cloud-connectors.version>1.2.0.RELEASE</spring-cloud-connectors.version>
      <!--  Support for MongoDB 3 -->
      <spring-data-releasetrain.version>Fowler-SR1</spring-data-releasetrain.version>
      <mongodb.version>3.2.2</mongodb.version>
      <!-- Spring boot version overrides - END -->

      <!-- Vaadin versions - START -->
      <vaadin.spring.version>1.0.0</vaadin.spring.version>
      <vaadin.spring.addon.version>0.0.6.RELEASE</vaadin.spring.addon.version>
      <vaadin.version>7.6.5</vaadin.version>
      <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
      <vaadin.addon.vaadin-lazyquerycontainer.version>7.4.0.1</vaadin.addon.vaadin-lazyquerycontainer.version>
      <vaadin.addon.flexibleoptiongroup.version>2.2.0</vaadin.addon.flexibleoptiongroup.version>
      <vaadin.addon.tokenfield.version>7.0.1</vaadin.addon.tokenfield.version>
      <vaadin.addon.dbar-addon.version>1.2.0</vaadin.addon.dbar-addon.version>
      <vaadin.addon.contextmenu.version>4.5</vaadin.addon.contextmenu.version>
      <!-- Vaadin versions - END -->

      <!-- Misc libraries versions - START -->
      <validation-api.version>1.1.0.Final</validation-api.version>
      <fest-assert.version>1.4</fest-assert.version>
      <org.easytesting.version>2.0M10</org.easytesting.version>
      <allure.version>1.4.22</allure.version>
      <eclipselink.version>2.6.2</eclipselink.version>
      <org.powermock.version>1.5.4</org.powermock.version>
      <pl.pragmatists.version>1.0.2</pl.pragmatists.version>
      <json-path.version>0.9.1</json-path.version>
      <aspectj.version>1.8.5</aspectj.version>
      <guava.version>19.0</guava.version>
      <mariadb-java-client.version>1.4.3</mariadb-java-client.version>
      <embedded-mongo.version>1.50.2</embedded-mongo.version>
      <jersey-client.version>1.18.1</jersey-client.version>
      <javax.el-api.version>2.2.4</javax.el-api.version>
      <corn-cps.version>1.1.7</corn-cps.version>
      <jlorem.version>1.1</jlorem.version>
      <json-simple.version>1.1.1</json-simple.version>
      <commons-lang3.version>3.4</commons-lang3.version>
      <json.version>20141113</json.version>
      <rsql-parser.version>2.0.0</rsql-parser.version>
      <!-- Misc libraries versions - END -->

      <!-- Release - START -->
      <release.scm.connection>scm:git:https://github.com/eclipse/hawkbit.git</release.scm.connection>
      <release.scm.developerConnection>scm:git:https://github.com/eclipse/hawkbit.git</release.scm.developerConnection>
      <release.scm.url>https://github.com/eclipse/hawkbit.git</release.scm.url>
      <!-- Release - END -->

      <!-- Sonar - START-->
      <sonar.host.url>https://sonar.eu-gb.mybluemix.net</sonar.host.url>
      <sonar.github.repository>eclipse/hawkbit</sonar.github.repository>
      <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
      <sonar.links.homepage>https://projects.eclipse.org/projects/iot.hawkbit</sonar.links.homepage>
      <sonar.links.ci>https://circleci.com/gh/eclipse/hawkbit</sonar.links.ci>
      <!-- Jacoco version to use -->
      <jacoco.version>0.7.2.201409121644</jacoco.version>
      <!-- The Sonar Jacoco Listener for JUnit to extract coverage details
         per test -->
      <sonar-jacoco-listeners.version>1.4</sonar-jacoco-listeners.version>
      <!-- Don't let Sonar execute tests. We will ask it to Maven -->
      <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
      <!-- The system property jacoco.outputDir needs to be override on the
         command line with an absolute path if you want to merge results from all
         modules. Example in a Jenkisn build where ${WORKSPACE} is defined and your
         project in the root directory of the workspace : mvn clean install -Prun-its,coverage
         -Djacoco.outputDir=${WORKSPACE}/target Note that unfortunately using the
         following does not work because of http://jira.codehaus.org/browse/SONAR-3427:
         <jacoco.outputDir>${session.executionRootDirectory}/target/</jacoco.outputDir> -->
      <jacoco.outputDir>${project.basedir}/../target/</jacoco.outputDir>
      <!-- Jacoco output file for UTs -->
      <jacoco.out.ut.file>jacoco-ut.exec</jacoco.out.ut.file>
      <!-- Tells Sonar where the Jacoco coverage result file is located for
         Unit Tests -->
      <sonar.jacoco.reportPath>${jacoco.outputDir}/${jacoco.out.ut.file}</sonar.jacoco.reportPath>
      <!-- Jacoco output file for ITs -->
      <jacoco.out.it.file>jacoco-it.exec</jacoco.out.it.file>
      <!-- Tells Sonar where the Jacoco coverage result file is located for
         Integration Tests -->
      <sonar.jacoco.itReportPath>${jacoco.outputDir}/${jacoco.out.it.file}</sonar.jacoco.itReportPath>
      <!-- Sonar - END-->
   </properties>


   <build>
      <plugins>
         <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>2.11</version>
            <configuration>
               <header>LICENCE_HEADER_TEMPLATE.txt</header>
               <excludes>
                  <exclude>**/README</exclude>
                  <exclude>3rd-dependencies/**</exclude>
                  <exclude>**/.git*</exclude>
                  <exclude>.git*</exclude>
                  <exclude>**/*.sql</exclude>
                  <exclude>**/*.sql</exclude>
                  <exclude>eclipse_codeformatter.xml</exclude>
                  <exclude>**/addons.scss</exclude>
                  <exclude>**/VAADIN/widgetsets/**</exclude>
               </excludes>
               <mapping>
                  <scss>JAVADOC_STYLE</scss>
               </mapping>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
         </plugin>
         <plugin>
            <artifactId>maven-scm-plugin</artifactId>
            <version>1.9.4</version>
            <configuration>
               <tag>${project.version}</tag>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <executions>
               <execution>
                  <id>prepare-ut-agent</id>
                  <phase>process-test-classes</phase>
                  <goals>
                     <goal>prepare-agent</goal>
                  </goals>
                  <configuration>
                     <destFile>${sonar.jacoco.reportPath}</destFile>
                     <propertyName>jacoco.agent.ut.arg</propertyName>
                     <append>true</append>
                  </configuration>
               </execution>
               <execution>
                  <id>prepare-it-agent</id>
                  <phase>pre-integration-test</phase>
                  <goals>
                     <goal>prepare-agent</goal>
                  </goals>
                  <configuration>
                     <destFile>${sonar.jacoco.itReportPath}</destFile>
                     <propertyName>jacoco.agent.it.arg</propertyName>
                     <append>true</append>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <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>
      </plugins>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.eclipse.m2e</groupId>
               <artifactId>lifecycle-mapping</artifactId>
               <version>1.0.0</version>
               <configuration>
                  <lifecycleMappingMetadata>
                     <pluginExecutions>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-dependency-plugin</artifactId>
                              <versionRange>[2.8,)</versionRange>
                              <goals>
                                 <goal>copy-dependencies</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore/>
                           </action>
                        </pluginExecution>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>com.vaadin</groupId>
                              <artifactId>vaadin-maven-plugin</artifactId>
                              <versionRange>[7.3.0,)</versionRange>
                              <goals>
                                 <goal>resources</goal>
                                 <goal>update-widgetset</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore/>
                           </action>
                        </pluginExecution>
                     </pluginExecutions>
                  </lifecycleMappingMetadata>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>2.17</version>
               <configuration>
                  <reuseForks>true</reuseForks>
                  <forkCount>1</forkCount>
                  <argLine>
                     ${jacoco.agent.ut.arg}
                     -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                  </argLine>
                  <properties>
                     <property>
                        <name>listener</name>
                        <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
                     </property>
                  </properties>
                  <includes>
                     <include>**/*Tests.java</include>
                     <include>**/*Test.java</include>
                     <include>**/*IT.java</include>
                  </includes>
                  <excludes>
                     <exclude>**/Abstract*.java</exclude>
                  </excludes>
               </configuration>
               <dependencies>
                  <dependency>
                     <groupId>org.aspectj</groupId>
                     <artifactId>aspectjweaver</artifactId>
                     <version>${aspectj.version}</version>
                  </dependency>
               </dependencies>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-failsafe-plugin</artifactId>
               <configuration>
                  <reuseForks>true</reuseForks>
                  <forkCount>3</forkCount>
                  <argLine>-Xmx1024m ${jacoco.agent.ut.arg}
                     -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"</argLine>
                  <properties>
                     <property>
                        <name>listener</name>
                        <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
                     </property>
                  </properties>
               </configuration>
               <dependencies>
                  <dependency>
                     <groupId>org.aspectj</groupId>
                     <artifactId>aspectjweaver</artifactId>
                     <version>${aspectj.version}</version>
                  </dependency>
               </dependencies>
               <executions>
                  <execution>
                     <id>integration-test</id>
                     <phase>integration-test</phase>
                     <goals>
                        <goal>integration-test</goal>
                     </goals>
                  </execution>
               </executions>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-site-plugin</artifactId>
               <configuration>
                  <skip>true</skip>
                  <skipDeploy>true</skipDeploy>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.jacoco</groupId>
               <artifactId>jacoco-maven-plugin</artifactId>
               <version>${jacoco.maven.version}</version>
            </plugin>

         </plugins>
      </pluginManagement>
   </build>

   <dependencyManagement>
      <dependencies>
         <!-- Logging -->
         <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
         </dependency>
         <!-- Vaadin -->
         <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-spring-boot</artifactId>
            <version>${vaadin.spring.version}</version>
         </dependency>
         <dependency>
            <groupId>org.vaadin.spring.addons</groupId>
            <artifactId>vaadin-spring-addon-eventbus</artifactId>
            <version>${vaadin.spring.addon.version}</version>
         </dependency>
         <dependency>
            <groupId>org.vaadin.spring.extensions</groupId>
            <artifactId>vaadin-spring-ext-security</artifactId>
            <version>${vaadin.spring.addon.version}</version>
         </dependency>
         <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-server</artifactId>
            <version>${vaadin.version}</version>
         </dependency>
         <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-push</artifactId>
            <version>${vaadin.version}</version>
         </dependency>
         <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client</artifactId>
            <version>${vaadin.version}</version>
         </dependency>
         <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-themes</artifactId>
            <version>${vaadin.version}</version>
         </dependency>
         <dependency>
            <groupId>org.vaadin.addons.lazyquerycontainer</groupId>
            <artifactId>vaadin-lazyquerycontainer</artifactId>
            <version>${vaadin.addon.vaadin-lazyquerycontainer.version}</version>
         </dependency>
         <dependency>
            <groupId>org.vaadin.addons</groupId>
            <artifactId>flexibleoptiongroup</artifactId>
            <version>${vaadin.addon.flexibleoptiongroup.version}</version>
         </dependency>
         <dependency>
            <groupId>org.vaadin.addons</groupId>
            <artifactId>tokenfield</artifactId>
            <version>${vaadin.addon.tokenfield.version}</version>
         </dependency>
         <dependency>
            <groupId>org.vaadin.alump.distributionbar</groupId>
            <artifactId>dbar-addon</artifactId>
            <version>${vaadin.addon.dbar-addon.version}</version>
         </dependency>
         <dependency>
            <groupId>org.vaadin.addons</groupId>
            <artifactId>contextmenu</artifactId>
            <version>${vaadin.addon.contextmenu.version}</version>
         </dependency>

         <!-- Misc -->
         <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>${validation-api.version}</version>
         </dependency>
         <dependency>
            <groupId>javax.el</groupId>
            <artifactId>javax.el-api</artifactId>
            <version>${javax.el-api.version}</version>
         </dependency>
         <dependency>
            <groupId>net.sf.corn</groupId>
            <artifactId>corn-cps</artifactId>
            <version>${corn-cps.version}</version>
         </dependency>
         <dependency>
            <groupId>net._01001111</groupId>
            <artifactId>jlorem</artifactId>
            <version>${jlorem.version}</version>
         </dependency>
         <!-- Spring -->
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>${spring.boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring.boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <version>${spring.boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
            <version>${spring.boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-cloud-connectors</artifactId>
            <version>${spring.boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
            <version>${spring.boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
            <version>${spring.boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>${spring.boot.version}</version>
            <scope>provided</scope>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <version>${spring.boot.version}</version>
            <exclusions>
               <exclusion>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-entitymanager</artifactId>
               </exclusion>
               <exclusion>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-starter-logging</artifactId>
               </exclusion>
            </exclusions>
         </dependency>
         <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.jpa</artifactId>
            <version>${eclipselink.version}</version>
         </dependency>
         <!-- RSQL / FIQL parser -->
         <dependency>
            <groupId>cz.jirutka.rsql</groupId>
            <artifactId>rsql-parser</artifactId>
            <version>${rsql-parser.version}</version>
         </dependency>
         <!-- JSON PATH, used to e.g. parse vcap services from environment -->
         <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>${json-path.version}</version>
         </dependency>
         <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>${json-simple.version}</version>
            <exclusions>
               <exclusion>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
               </exclusion>
            </exclusions>
         </dependency>
          <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring.boot.version}</version>
            <exclusions>
               <exclusion>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-starter-logging</artifactId>
               </exclusion>
            </exclusions>
         </dependency>
         <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>${json.version}</version>
         </dependency>
         <dependency>
            <groupId>de.flapdoodle.embed</groupId>
            <artifactId>de.flapdoodle.embed.mongo</artifactId>
            <version>${embedded-mongo.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert</artifactId>
            <version>${fest-assert.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert-core</artifactId>
            <version>${org.easytesting.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-junit-adaptor</artifactId>
            <version>${allure.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>${jersey-client.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>pl.pragmatists</groupId>
            <artifactId>JUnitParams</artifactId>
            <version>${pl.pragmatists.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path-assert</artifactId>
            <version>${json-path.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
            <version>${mariadb-java-client.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
         </dependency>
      </dependencies>
   </dependencyManagement>
</project>