<!--

         Copyright (C) 2012-2015 DataStax Inc.

      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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
    <relativePath />
  </parent>

  <groupId>com.datastax.cassandra</groupId>
  <artifactId>cassandra-driver-parent</artifactId>
  <version>3.0.0-alpha4</version>
  <packaging>pom</packaging>
  <name>DataStax Java Driver for Apache Cassandra</name>
  <description>A driver for Apache Cassandra 1.2+ that works exclusively with the Cassandra Query Language version 3 (CQL3) and Cassandra's binary protocol.</description>
  <url>https://github.com/datastax/java-driver</url>
  <inceptionYear>2012</inceptionYear>

  <modules>
    <module>driver-core</module>
    <module>driver-mapping</module>
    <module>driver-examples</module>
    <module>driver-dse</module>
    <module>driver-dist</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <cassandra.version>3.0.0-rc1</cassandra.version>
    <java.version>1.6</java.version>
    <log4j.version>1.2.17</log4j.version>
    <slf4j-log4j12.version>1.7.6</slf4j-log4j12.version>
    <guava.version>16.0.1</guava.version>
    <netty.version>4.0.27.Final</netty.version>
    <metrics.version>3.0.2</metrics.version>
    <snappy.version>1.0.5</snappy.version>
    <lz4.version>1.2.0</lz4.version>
    <hdr.version>2.1.4</hdr.version>
    <!-- test dependency versions -->
    <testng.version>6.8.8</testng.version>
    <assertj.version>1.7.0</assertj.version>
    <mockito.version>1.10.8</mockito.version>
    <scassandra.version>0.10.0</scassandra.version>
    <main.basedir>${project.basedir}</main.basedir>
  </properties>

  <dependencies>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j-log4j12.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <javadoc.opts>-Xdoclint:none</javadoc.opts>
      </properties>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <optimize>true</optimize>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <!-- I can haz math in my javadoc (see http://zverovich.net/2012/01/14/beautiful-math-in-javadoc.html) -->
          <additionalparam>-header '&lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;'</additionalparam>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <additionalparam>${javadoc.opts}</additionalparam>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <version>2.6.1</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals><goal>check</goal></goals>
          </execution>
        </executions>
        <configuration>
          <comparisonVersion>3.0.0</comparisonVersion>
          <ignoredDifferencesFile>../clirr-ignores.xml</ignoredDifferencesFile>
          <excludes>
            <!-- Package-private, internal classes -->
            <exclude>com/datastax/driver/core/Frame$*</exclude>
            <exclude>com/datastax/driver/core/ProtocolEvent$*</exclude>
            <exclude>com/datastax/driver/core/Message$*</exclude>
            <exclude>com/datastax/driver/core/Requests$*</exclude>
            <exclude>com/datastax/driver/core/Responses$*</exclude>
            <exclude>com/datastax/driver/core/Connection$*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.9.1</version>
        <executions>
          <execution>
            <id>timestamp-property</id>
            <phase>initialize</phase>
            <goals>
              <goal>timestamp-property</goal>
            </goals>
            <configuration>
              <name>currentYear</name>
              <pattern>yyyy</pattern>
              <locale>en_US</locale>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!--
      To update license headers run:
      mvn license:format -DcurrentYear=XXXX
      -->
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <header>${main.basedir}/src/license/header.txt</header>
          <includes>
            <include>src/**/*.java</include>
            <include>src/**/*.xml</include>
            <include>src/**/*.properties</include>
            <include>**/pom.xml</include>
          </includes>
          <excludes>
            <exclude>**/src/main/config/ide/**</exclude>
          </excludes>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
            <properties>SCRIPT_STYLE</properties>
          </mapping>
          <strictCheck>true</strictCheck>
        </configuration>
        <executions>
          <execution>
            <id>check-license</id>
            <phase>initialize</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <properties>
                <currentYear>${currentYear}</currentYear>
              </properties>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>Apache License Version 2.0</comments>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:datastax/java-driver.git</connection>
    <developerConnection>scm:git:git@github.com:datastax/java-driver.git</developerConnection>
    <url>https://github.com/datastax/java-driver</url>
    <tag>3.0.0-alpha4</tag>
  </scm>

  <developers>
    <developer>
      <name>Various</name>
      <organization>DataStax</organization>
    </developer>
  </developers>
</project>
