<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.hectorclient</groupId>
    <artifactId>hector</artifactId>
		<version>2.0-0</version>
  </parent>
  
  <artifactId>hector-core</artifactId>
  <packaging>bundle</packaging>
  <name>hector-core</name>
  <properties>
    <!-- OSGi bundle properties -->
    <bundle.symbolicName>org.hectorclient.hector</bundle.symbolicName>
    <bundle.namespace>org.hectorclient</bundle.namespace>
  </properties>

  <build>
    <plugins>

      <!--
        run examples thusly: mvn exec:java
        -Dexec.mainClass="me.prettyprint.cassandra.examples.ExampleDao"
      -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.ops4j</groupId>
        <artifactId>maven-pax-plugin</artifactId>
        <version>1.4</version>
        <configuration>
          <provision>
            <param>--platform=equinox</param>
          </provision>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>1.4.3</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Embed-Dependency>
              libthrift;scope=compile|runtime;type=!pom;inline=false,
              cassandra;scope=compile|runtime;type=!pom;inline=false,
              <!-- *;scope=compile|runtime;type=!pom;inline=false -->
            </Embed-Dependency>

            <Export-Package>
              <!-- !${bundle.namespace}.internal.*, -->
              me.prettyprint.*;version="${project.version}"
            </Export-Package>

            <Import-Package>
              !org.apache.avro.*,
              !javax.jms.*,
              !javax.mail.*,
              !javax.servlet.*,
              !com.sun.*,
              !org.antlr.*,
              !jline.*,
              !sun.misc.*,
              org.apache.cassandra.thrift,
              *;resolution:=optional
            </Import-Package>
            <Private-Package>
              <!-- ${bundle.namespace}.internal.* -->
            </Private-Package>
            <_include>-osgi.bnd</_include>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkMode>always</forkMode>
          <argLine>-Xmx512M -Xms512M -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cassandra</groupId>
      <artifactId>cassandra-thrift</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.stephenc.eaio-uuid</groupId>
      <artifactId>uuid</artifactId>
    </dependency>
    <dependency>
      <groupId>com.ecyrd.speed4j</groupId>
      <artifactId>speed4j</artifactId>
    </dependency>
    <dependency>
      <groupId>com.yammer.metrics</groupId>
      <artifactId>metrics-core</artifactId>
    </dependency>
	<!-- Note the optional tag. If you need to use fastinfoset serialization, you must include this dependency in your project! -->
    <dependency>
      <artifactId>FastInfoset</artifactId>
      <groupId>com.sun.xml.fastinfoset</groupId>
      <version>1.2.2</version>
      <optional>true</optional>
    </dependency>

    <!-- OSGi deps -->
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi_R4_core</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi_R4_compendium</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>org.hectorclient</groupId>
      <artifactId>hector-test</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>      
    </dependency>     
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.stephenc</groupId>
      <artifactId>jamm</artifactId>
      <scope>test</scope>
    </dependency>    
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jul-to-slf4j</artifactId>
      <scope>test</scope>
    </dependency>    
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${org.springframework.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${org.springframework.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>${org.springframework.version}</version>
      <scope>test</scope>
    </dependency>
    
    <!--  override borked snappy version if you're running os x -->
    <dependency>
      <groupId>org.xerial.snappy</groupId>
      <artifactId>snappy-java</artifactId>
      <version>1.0.5-M4</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
