<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) FuseSource, Inc.
  http://fusesource.com

  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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.fusesource.fuse-extra</groupId>
    <artifactId>fuse-scala</artifactId>
    <version>1.3</version>
    <relativePath>../../fuse-scala</relativePath>
  </parent>

  <artifactId>fusemq-apollo-mqtt</artifactId>
  <packaging>jar</packaging>

  <name>${project.artifactId}</name>
  <description>Fuse Extra :: MQTT Protocol hander for Apollo</description>
  
  <properties>
    <apollo-version>1.4</apollo-version>
    <karaf-version>2.2.2</karaf-version>
    <jetty-version>7.5.1.v20110908</jetty-version>
    <scalate-version>1.5.3</scalate-version>
    <mqtt-client-version>1.2</mqtt-client-version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-broker</artifactId>
      <version>${apollo-version}</version>
    </dependency>

    <dependency>
      <groupId>org.fusesource.mqtt-client</groupId>
      <artifactId>mqtt-client</artifactId>
      <version>${mqtt-client-version}</version>
    </dependency>

    <!-- Scala Support -->
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <scope>compile</scope>
      <version>${scala-version}</version>
    </dependency>

    <!-- Testing Dependencies -->
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-broker</artifactId>
      <version>${apollo-version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-util</artifactId>
      <version>${apollo-version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-bdb</artifactId>
      <version>${apollo-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-leveldb</artifactId>
      <version>${apollo-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-stomp</artifactId>
      <version>${apollo-version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-web</artifactId>
      <version>${apollo-version}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.eclipse.jetty.aggregate</groupId>
      <artifactId>jetty-all-server</artifactId>
      <version>${jetty-version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.fusesource.stompjms</groupId>
      <artifactId>stompjms-client</artifactId>
      <version>1.11</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <version>${junit-version}</version>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.9.1</artifactId>
      <version>${scalatest-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j-version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <!-- <plugin>
        <groupId>org.fusesource.mvnplugins</groupId>
        <artifactId>maven-fab-plugin</artifactId>
        <version>1.16-SNAPSHOT</version>
        <configuration>
          <descriptor>
            <Name>mqtt</Name>
            <Long-Description></Long-Description>
            <Extends>${project.groupId}:apollo-cli:${project.version}</Extends>
          </descriptor>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin> -->

      <!-- Generate a test jar for the test cases in this package -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.fusesource.scalate</groupId>
        <artifactId>maven-scalate-plugin</artifactId>
        <version>${scalate-version}</version>
        <executions>
          <execution>
            <goals>
              <goal>precompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.fusesource.hawtbuf</groupId>
        <artifactId>hawtbuf-protoc</artifactId>
        <version>${hawtbuf-version}</version>
        <configuration>
          <type>alt</type>
        </configuration>
         <executions>
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.fusesource.mvnplugins</groupId>
        <artifactId>maven-uberize-plugin</artifactId>
        <version>${mvnplugins-version}</version>
        <executions>
          <execution>
            <id>all</id>
            <phase>package</phase>
            <goals><goal>uberize</goal></goals>
          </execution>
        </executions>
        <configuration>
          <uberArtifactAttached>true</uberArtifactAttached>
          <uberClassifierName>uber</uberClassifierName>
          <artifactSet>
            <includes>
              <include>org.fusesource.mqtt-client:mqtt-client</include>
            </includes>
          </artifactSet>            
        </configuration>
      </plugin>

    </plugins>
  </build>
</project>
