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

    Copyright 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>com.datastax.oss</groupId>
    <artifactId>java-driver-parent</artifactId>
    <version>4.8.0</version>
  </parent>
  <artifactId>java-driver-mapper-processor</artifactId>
  <name>DataStax Java driver for Apache Cassandra(R) - object mapper processor</name>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>java-driver-bom</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.datastax.oss</groupId>
      <artifactId>java-driver-mapper-runtime</artifactId>
      <exclusions>
        <!--
          Exclude the dependency to SLF4J, otherwise this causes a warning when the processor is
          configured with -processorpath, because no SLF4J backend is present (JAVA-2800).

          Note however that some of the code generated by the processor does reference SLF4J types
          (see LoggingGenerator). In those cases we have to resort to ClassName.get(String, String)
          instead of using the SLF4J classes directly.
        -->
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.datastax.oss</groupId>
      <artifactId>java-driver-shaded-guava</artifactId>
    </dependency>
    <dependency>
      <groupId>com.squareup</groupId>
      <artifactId>javapoet</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.stephenc.jcip</groupId>
      <artifactId>jcip-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.testing.compile</groupId>
      <artifactId>compile-testing</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.tngtech.java</groupId>
      <artifactId>junit-dataprovider</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.datastax.oss</groupId>
      <artifactId>java-driver-core</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <includes>
          <include>project.properties</include>
        </includes>
        <filtering>true</filtering>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
        <excludes>
          <exclude>project.properties</exclude>
        </excludes>
        <filtering>false</filtering>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <proc>none</proc>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>com.datastax.oss.driver.mapper.processor</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
        <executions>
          <!--
            This module only has internal classes, yet we need a javadoc JAR to pass Maven central
            validation rules.
          -->
          <execution>
            <id>javadoc-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>javadoc</classifier>
              <excludes>
                <exclude>**</exclude>
              </excludes>
            </configuration>
          </execution>
          <execution>
            <id>test-jar</id>
            <goals>
              <goal>test-jar</goal>
            </goals>
            <configuration>
              <excludes>
                <exclude>logback-test.xml</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-dependency-list</id>
            <goals>
              <goal>list</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <includeScope>runtime</includeScope>
              <outputScope>true</outputScope>
              <excludeGroupIds>com.datastax.cassandra,com.datastax.dse</excludeGroupIds>
              <outputFile>${project.build.outputDirectory}/com/datastax/dse/driver/internal/mapper/processor/deps.txt</outputFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
