<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>1.1-1</version>
  </parent>
  <artifactId>hector-test</artifactId>
  <packaging>jar</packaging>
  <name>test</name>
  
  <properties>
    <!-- OSGi bundle properties -->
    <bundle.symbolicName>org.hectorclient.hector-test</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>${pom.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.*, -->
              ${bundle.namespace}.*;version="${pom.version}"
            </Export-Package>

            <Import-Package>
              !org.apache.avro.*,
              !javax.jms.*,
              !javax.mail.*,
              !javax.servlet.*,
              !com.sun.*,
              !org.antlr.*,
              !jline.*,
              !sun.misc.*,
              *;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>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.cassandra</groupId>
      <artifactId>cassandra-all</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.stephenc</groupId>
      <artifactId>jamm</artifactId>
      <scope>test</scope>
    </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>
  </dependencies>
</project>
