<!--

    Copyright © 2016 The Thingsboard Authors

    Licensed 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>
    <groupId>org.thingsboard</groupId>
    <artifactId>thingsboard</artifactId>
    <version>1.1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>Thingsboard</name>
    <url>http://thingsboard.io</url>
    <inceptionYear>2016</inceptionYear>

    <properties>
        <main.dir>${basedir}</main.dir>
        <spring-boot.version>1.4.2.RELEASE</spring-boot.version>
        <spring.version>4.3.4.RELEASE</spring.version>
        <spring-security.version>4.2.0.RELEASE</spring-security.version>
        <jjwt.version>0.7.0</jjwt.version>
        <joda-time.version>2.4</joda-time.version>
        <json-path.version>2.2.0</json-path.version>
        <junit.version>4.12</junit.version>
        <slf4j.version>1.7.7</slf4j.version>
        <logback.version>1.1.7</logback.version>
        <mockito.version>1.9.5</mockito.version>
        <rat.version>0.10</rat.version>
        <cassandra.version>3.0.0</cassandra.version>
        <cassandra-unit.version>3.0.0.1</cassandra-unit.version>
        <takari-cpsuite.version>1.2.7</takari-cpsuite.version>
        <guava.version>18.0</guava.version>
        <commons-lang3.version>3.4</commons-lang3.version>
        <commons-validator.version>1.5.0</commons-validator.version>
        <jackson.version>2.7.3</jackson.version>
        <json-schema-validator.version>2.2.6</json-schema-validator.version>
        <scala.version>2.11</scala.version>
        <akka.version>2.4.2</akka.version>
        <californium.version>1.0.2</californium.version>
        <gson.version>2.6.2</gson.version>
        <velocity.version>1.7</velocity.version>
        <velocity-tools.version>2.0</velocity-tools.version>
        <mail.version>1.4.3</mail.version>
        <curator.version>2.11.0</curator.version>
        <protobuf.version>3.0.2</protobuf.version>
        <grpc.version>1.0.0</grpc.version>
        <lombok.version>1.16.10</lombok.version>
        <paho.client.version>1.1.0</paho.client.version>
        <netty.version>4.1.3.Final</netty.version>
        <os-maven-plugin.version>1.5.0</os-maven-plugin.version>
        <rabbitmq.version>3.6.5</rabbitmq.version>
        <kafka.version>0.9.0.0</kafka.version>
        <hazelcast.version>3.6.6</hazelcast.version>
        <hazelcast-zookeeper.version>3.6.1</hazelcast-zookeeper.version>
        <surfire.version>2.19.1</surfire.version>
        <jar-plugin.version>3.0.2</jar-plugin.version>
        <springfox-swagger.version>2.6.1</springfox-swagger.version>
    </properties>

    <modules>
        <module>common</module>
        <module>dao</module>
        <module>extensions-api</module>
        <module>extensions-core</module>
        <module>extensions</module>
        <module>transport</module>
        <module>ui</module>
        <module>tools</module>
        <module>application</module>
    </modules>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
    </profiles>

    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.5.0.Final</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.fortasoft</groupId>
                    <artifactId>gradle-maven-plugin</artifactId>
                    <version>1.0.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>copy-protoc</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>com.google.protobuf</groupId>
                                        <artifactId>protoc</artifactId>
                                        <version>${protobuf.version}</version>
                                        <classifier>${os.detected.classifier}</classifier>
                                        <type>exe</type>
                                        <overWrite>true</overWrite>
                                        <outputDirectory>${project.build.directory}</outputDirectory>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.xolstice.maven.plugins</groupId>
                    <artifactId>protobuf-maven-plugin</artifactId>
                    <version>0.5.0</version>
                    <configuration>
                        <!--
                          The version of protoc must match protobuf-java. If you don't depend on
                          protobuf-java directly, you will be transitively depending on the
                          protobuf-java version that grpc depends on.
                        -->
                        <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
                        </protocArtifact>
                        <pluginId>grpc-java</pluginId>
                        <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.0:exe:${os.detected.classifier}
                        </pluginArtifact>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>compile</goal>
                                <goal>compile-custom</goal>
                                <goal>test-compile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.12</version>
                    <executions>
                        <execution>
                            <id>add-source</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>${basedir}/target/generated-sources</source>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <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-antrun-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.3,)
                                        </versionRange>
                                        <goals>
                                            <goal>run</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                    <configuration>
                        <header>${main.dir}/license-header-template.txt</header>
                        <properties>
                            <owner>The Thingsboard Authors</owner>
                        </properties>
                        <excludes>
                            <exclude>**/.env</exclude>
                            <exclude>**/.eslintrc</exclude>
                            <exclude>**/.babelrc</exclude>
                            <exclude>**/.jshintrc</exclude>
                            <exclude>**/.gradle/**</exclude>
                            <exclude>**/nightwatch</exclude>
                            <exclude>**/README</exclude>
                            <exclude>**/LICENSE</exclude>
                            <exclude>**/banner.txt</exclude>
                            <exclude>node_modules/**</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>src/test/resources/**</exclude>
                            <exclude>src/vendor/**</exclude>
                            <exclude>src/font/**</exclude>
                            <exclude>src/sh/**</exclude>
                            <exclude>src/main/scripts/control/**</exclude>
                        </excludes>
                        <mapping>
                            <proto>JAVADOC_STYLE</proto>
                            <cql>DOUBLEDASHES_STYLE</cql>
                            <scss>JAVADOC_STYLE</scss>
                            <jsx>SLASHSTAR_STYLE</jsx>
                            <conf>SCRIPT_STYLE</conf>
                            <gradle>JAVADOC_STYLE</gradle>
                        </mapping>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.thingsboard</groupId>
                <artifactId>extensions-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard</groupId>
                <artifactId>extensions-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.extensions</groupId>
                <artifactId>extension-rabbitmq</artifactId>
                <classifier>extension</classifier>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.extensions</groupId>
                <artifactId>extension-rest-api-call</artifactId>
                <classifier>extension</classifier>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.extensions</groupId>
                <artifactId>extension-kafka</artifactId>
                <classifier>extension</classifier>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.common</groupId>
                <artifactId>data</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.common</groupId>
                <artifactId>message</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.common</groupId>
                <artifactId>transport</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.transport</groupId>
                <artifactId>http</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.transport</groupId>
                <artifactId>coap</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard.transport</groupId>
                <artifactId>mqtt</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard</groupId>
                <artifactId>dao</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.thingsboard</groupId>
                <artifactId>tools</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.thingsboard</groupId>
                <artifactId>dao</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-security</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-websocket</artifactId>
                <version>${spring-boot.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-autoconfigure</artifactId>
                <version>${spring-boot.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <version>${spring-boot.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-test</artifactId>
                <version>${spring-security.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt</artifactId>
                <version>${jjwt.version}</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${joda-time.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity</artifactId>
                <version>${velocity.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity-tools</artifactId>
                <version>${velocity-tools.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.rabbitmq</groupId>
                <artifactId>amqp-client</artifactId>
                <version>${rabbitmq.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>${mail.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-recipes</artifactId>
                <version>${curator.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-test</artifactId>
                <scope>test</scope>
                <version>${curator.version}</version>
            </dependency>
            <dependency>
                <groupId>com.jayway.jsonpath</groupId>
                <artifactId>json-path</artifactId>
                <version>${json-path.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>io.netty</groupId>
                <artifactId>netty-all</artifactId>
                <version>${netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-handler</artifactId>
                <version>${netty.version}</version>
            </dependency>
            <dependency>
                <groupId>com.datastax.cassandra</groupId>
                <artifactId>cassandra-driver-core</artifactId>
                <version>${cassandra.version}</version>
            </dependency>
            <dependency>
                <groupId>com.datastax.cassandra</groupId>
                <artifactId>cassandra-driver-mapping</artifactId>
                <version>${cassandra.version}</version>
            </dependency>
            <dependency>
                <groupId>com.datastax.cassandra</groupId>
                <artifactId>cassandra-driver-extras</artifactId>
                <version>${cassandra.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-validator</groupId>
                <artifactId>commons-validator</artifactId>
                <version>${commons-validator.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.fge</groupId>
                <artifactId>json-schema-validator</artifactId>
                <version>${json-schema-validator.version}</version>
            </dependency>
            <dependency>
                <groupId>com.typesafe.akka</groupId>
                <artifactId>akka-actor_${scala.version}</artifactId>
                <version>${akka.version}</version>
            </dependency>
            <dependency>
                <groupId>com.typesafe.akka</groupId>
                <artifactId>akka-slf4j_${scala.version}</artifactId>
                <version>${akka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.californium</groupId>
                <artifactId>californium-core</artifactId>
                <version>${californium.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>${protobuf.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-netty</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-protobuf</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-stub</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.takari.junit</groupId>
                <artifactId>takari-cpsuite</artifactId>
                <version>${takari-cpsuite.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.cassandraunit</groupId>
                <artifactId>cassandra-unit</artifactId>
                <version>${cassandra-unit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka_2.10</artifactId>
                <version>${kafka.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.paho</groupId>
                <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
                <version>${paho.client.version}</version>
            </dependency>
            <dependency>
                <groupId>com.hazelcast</groupId>
                <artifactId>hazelcast-spring</artifactId>
                <version>${hazelcast.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-x-discovery</artifactId>
                <version>${curator.version}</version>
            </dependency>
            <dependency>
                <groupId>com.hazelcast</groupId>
                <artifactId>hazelcast-zookeeper</artifactId>
                <version>${hazelcast-zookeeper.version}</version>
            </dependency>
            <dependency>
                <groupId>com.hazelcast</groupId>
                <artifactId>hazelcast</artifactId>
                <version>${hazelcast.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>central</id>
            <url>http://repo1.maven.org/maven2/</url>
        </repository>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>typesafe</id>
            <name>Typesafe Repository</name>
            <url>http://repo.typesafe.com/typesafe/releases/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public</url>
        </repository>
    </repositories>

</project>
