<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.gpudb</groupId>
    <artifactId>gpudb-api</artifactId>
    <version>7.0.3.0</version>
    <packaging>jar</packaging>
    <name>Kinetica Java API</name>
    <distributionManagement>
       <repository>
          <id>releases</id>
          <name>Releases</name>
          <url>http://files.kinetica.com/nexus/content/repositories/releases</url>
       </repository>
       <snapshotRepository>
          <id>snapshots</id>
          <name>Snapshots</name>
          <url>http://files.kinetica.com/nexus/content/repositories/snapshots</url>
       </snapshotRepository>
    </distributionManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
            <version>1.8.1</version>
        </dependency>
        <dependency>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang3</artifactId>
          <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <version>1.1.1.3</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
    </dependencies>
    <properties>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gpudb-api.version>7.0.3.0</gpudb-api.version>
    </properties>
    <profiles>
        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <javadoc.opts>-Xdoclint:none</javadoc.opts>
            </properties>
        </profile>
    </profiles>
    <pluginRepositories>
        <pluginRepository>
            <id>clojars.org</id>
            <url>http://clojars.org/repo</url>
        </pluginRepository>
        <pluginRepository>
            <id>sonatype-releases</id>
            <url>http://oss.sonatype.org/content/repositories/releases</url>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <relocations>
                                <relocation>
                                    <pattern>org.apache.avro</pattern>
                                    <shadedPattern>com.gpudb.avro</shadedPattern>
                                </relocation>
                                <!--
                                <relocation>
                                    <pattern>org.apache.avro.Schema</pattern>
                                    <shadedPattern>com.gpudb.avro.Schema</shadedPattern>
                                </relocation>
                                -->
                            </relocations>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>avroshaded</shadedClassifierName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.code54.mojo</groupId>
                <artifactId>buildversion-plugin</artifactId>
                <version>1.0.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>set-properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <additionalparam>${javadoc.opts}</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/gpudb-api-build.properties</include>
                </includes>
            </resource>
        </resources>
    </build>
</project>
