<?xml version="1.0" encoding="UTF-8"?>
<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>
  <groupId>com.couchbase.client</groupId>
  <artifactId>couchbase-jdbc-driver</artifactId>
  <name>Couchbase JDBC Driver</name>
  <version>1.0.2</version>
  <description>Couchbase JDBC Driver for Couchbase Analytics</description>
  <url>https://couchbase.com</url>
  <developers>
    <developer>
      <id>daschl</id>
      <name>Michael Nitschinger</name>
      <email>michael.nitschinger@couchbase.com</email>
    </developer>
    <developer>
      <id>dlychagin-cb</id>
      <name>Dmitry Lychagin</name>
      <email>dmitry.lychagin@couchbase.com</email>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git://github.com/couchbase/couchbase-jdbc-driver</connection>
    <developerConnection>scm:git:git://github.com/couchbase/couchbase-jdbc-driver</developerConnection>
    <url>https://github.com/couchbase/couchbase-jdbc-driver</url>
  </scm>
  <organization>
    <name>Couchbase, Inc.</name>
    <url>https://couchbase.com</url>
  </organization>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.10.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.3.2</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
          <shortRevisionLength>8</shortRevisionLength>
          <attach>true</attach>
          <addOutputDirectoryToResources>true</addOutputDirectoryToResources>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.2</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            <manifestEntries>
              <Build-Time>${maven.build.timestamp}</Build-Time>
              <Automatic-Module-Name>com.couchbase.client.jdbc</Automatic-Module-Name>
            </manifestEntries>
            <manifestSections>
              <manifestSection>
                <name>couchbase-jdbc-driver</name>
                <manifestEntries>
                  <Impl-Version>${project.version}</Impl-Version>
                  <Impl-Git-Revision>${buildNumber}</Impl-Git-Revision>
                </manifestEntries>
              </manifestSection>
              <manifestSection>
                <name>com/couchbase/client/jdbc/</name>
                <manifestEntries>
                  <Implementation-Version>${project.version}</Implementation-Version>
                </manifestEntries>
              </manifestSection>
            </manifestSections>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <relocations>
            <relocation>
              <pattern>com.fasterxml.jackson</pattern>
              <shadedPattern>org.apache.asterix.jdbc.core.deps.com.fasterxml.jackson</shadedPattern>
            </relocation>
          </relocations>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>module-info.class</exclude>
                <exclude>META-INF/services/reactor.blockhound.integration.BlockHoundIntegration</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>com.fasterxml.jackson.core:*</artifact>
              <excludes>
                <exclude>META-INF/maven/com.fasterxml.jackson.core/*/pom.properties</exclude>
                <exclude>META-INF/maven/com.fasterxml.jackson.core/*/pom.xml</exclude>
                <exclude>META-INF/services/**</exclude>
                <exclude>META-INF/NOTICE</exclude>
                <exclude>META-INF/LICENSE</exclude>
                <exclude>META-INF/MANIFEST.MF</exclude>
                <exclude>META-INF/versions/9/**</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.apache.asterix:*</artifact>
              <excludes>
                <exclude>META-INF/NOTICE</exclude>
                <exclude>META-INF/LICENSE</exclude>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.reactivestreams:reactive-streams</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>io.projectreactor:reactor-core</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>com.couchbase.client:java-client</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>com.couchbase.client:core-io</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
                <exclude>META-INF/NOTICE</exclude>
                <exclude>META-INF/LICENSE</exclude>
                <exclude>META-INF/NOTICE.txt</exclude>
                <exclude>META-INF/LICENSE.txt</exclude>
                <exclude>META-INF/versions/9/**</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.8.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <couchbase-sdk.version>3.3.1</couchbase-sdk.version>
    <maven.compiler.target>8</maven.compiler.target>
    <asterix-jdbc.version>0.9.8</asterix-jdbc.version>
    <maven.compiler.source>8</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
