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

    Copyright (C) 2010-2012, FuseSource Corp.  All rights reserved.

        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.mqtt-client</groupId>
    <artifactId>mqtt-client-project</artifactId>
    <version>1.10</version>
  </parent>
  
  <groupId>org.fusesource.mqtt-client</groupId>
  <artifactId>mqtt-client</artifactId>
  <version>1.10</version>
  <packaging>bundle</packaging>
  
  <name>${project.artifactId}</name>
  <description>
     mqtt-client provides an ASL 2.0 licensed API to MQTT. It takes care of 
     automatically reconnecting to your MQTT server and restoring your client 
     session if any network failures occur. Applications can use a blocking 
     API style, a futures based API, or a callback/continuations passing API 
     style.
  </description>
  
  <dependencies>

    <dependency>
      <groupId>org.fusesource.hawtdispatch</groupId>
      <artifactId>hawtdispatch-transport</artifactId>
      <version>${hawtdispatch-version}</version>
    </dependency>

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

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>${osgi-version}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <version>${osgi-version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>asm</groupId>
      <artifactId>asm-tree</artifactId>
      <version>${asm-version}</version>
      <optional>true</optional>
    </dependency>
    
    <!-- Testing Dependencies -->
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-broker</artifactId>
      <scope>test</scope>
      <version>${apollo-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-mqtt</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>

    <!-- to enable the webconsole in the apollo broker -->
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>apollo-web</artifactId>
      <version>${apollo-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.aggregate</groupId>
      <artifactId>jetty-all-server</artifactId>
      <version>7.1.6.v20100715</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <version>${junit-version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j-version}</version>
      <scope>test</scope>
    </dependency>

    
  </dependencies>

  <build>
    <plugins>
      <plugin>
        
        <groupId>com.github.wvengen</groupId>
        <artifactId>proguard-maven-plugin</artifactId>
        <version>2.0.5</version>
 
        <dependencies>
           <dependency>
               <groupId>net.sf.proguard</groupId>
               <artifactId>proguard-base</artifactId>
               <version>4.8</version>
               <scope>runtime</scope>
           </dependency>
        </dependencies>
 
        <executions>
           <execution>
             <phase>package</phase>
             <goals>
                <goal>proguard</goal>
             </goals>
           </execution>
        </executions>
        <configuration>
          <proguardVersion>4.8</proguardVersion>
          <injar>${project.build.finalName}.jar</injar>
          <outjar>${project.build.finalName}-uber.jar</outjar>          
          <attach>true</attach>
          <attachArtifactClassifier>uber</attachArtifactClassifier>
          <libs>
            <lib>${rt.jar.path}</lib>
            <lib>${jsse.jar.path}</lib>
          </libs>
          <assembly>
            <inclusions>
              <inclusion>
                <groupId>org.fusesource.hawtdispatch</groupId>
                <artifactId>hawtdispatch-transport</artifactId>
              </inclusion>
              <inclusion>
                <groupId>org.fusesource.hawtdispatch</groupId>
                <artifactId>hawtdispatch</artifactId>
              </inclusion>
              <inclusion>
                <groupId>org.fusesource.hawtbuf</groupId>
                <artifactId>hawtbuf</artifactId>
              </inclusion>
            </inclusions>
          </assembly>
          <obfuscate>false</obfuscate>
          <options>
            <option>-dontoptimize</option>
            <option>-keep class org.fusesource.mqtt.** { *; } </option>
          </options>
        </configuration>
      </plugin>

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