<!--

    Copyright DataStax, Inc.

    This software can be used solely with DataStax Enterprise. Please consult the license at
    http://www.datastax.com/terms/datastax-dse-driver-license-terms

-->
<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>com.datastax.dse</groupId>
    <artifactId>dse-java-driver-parent</artifactId>
    <version>2.2.0</version>
  </parent>

  <artifactId>dse-java-driver-mapper-runtime</artifactId>
  <packaging>bundle</packaging>

  <name>DataStax Enterprise Java Driver - object mapper runtime</name>
  <description>Mapper annotations, and utility classes used by the generated code.</description>

  <dependencies>
    <dependency>
      <groupId>com.datastax.dse</groupId>
      <artifactId>dse-java-driver-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.datastax.oss</groupId>
      <artifactId>java-driver-mapper-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>org.reactivestreams</groupId>
      <artifactId>reactive-streams</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.datastax.dse</groupId>
      <artifactId>dse-java-driver-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.reactivestreams</groupId>
      <artifactId>reactive-streams-tck</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.reactivex.rxjava2</groupId>
      <artifactId>rxjava</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <threadCount>1</threadCount>
          <properties>
            <property>
              <name>listener</name>
              <value>com.datastax.dse.driver.DriverRunListener</value>
            </property>
            <!-- tell TestNG not to run jUnit tests -->
            <property>
              <name>junit</name>
              <value>false</value>
            </property>
            <property>
              <name>suitename</name>
              <value>Reactive Streams TCK</value>
            </property>
          </properties>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>${surefire.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-testng</artifactId>
            <version>${surefire.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <executions>
          <execution>
            <goals>
              <goal>bundle</goal>
            </goals>
            <configuration>
              <instructions>
                <Bundle-SymbolicName>com.datastax.dse.driver.mapper-runtime</Bundle-SymbolicName>
                <!--
                Allow importing code from other packages
                (so reflection-based loading of policies works)
                -->
                <DynamicImport-Package>*</DynamicImport-Package>
                <!--
                Don't include the packages below because they aren't OSGi bundles,
                and the driver can live without them.
                -->
                <Import-Package>
                  !net.jcip.annotations.*,
                  !edu.umd.cs.findbugs.annotations.*,
                  *
                </Import-Package>
                <Export-Package>
                  com.datastax.dse.driver.*.mapper.*
                </Export-Package>
              </instructions>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <!--
            This module has no API classes, yet we need a javadoc JAR to pass Maven central
            validation rules.
            TODO remove this if we create types in api.* packages
          -->
          <execution>
            <id>javadoc-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>javadoc</classifier>
              <excludes>
                <exclude>**</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
