<?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">
  <parent>
    <artifactId>wrangler</artifactId>
    <groupId>io.cdap.wrangler</groupId>
    <version>4.0.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>wrangler-transform</artifactId>
  <name>Wrangler Transform</name>

  <pluginRepositories>
    <pluginRepository>
      <id>sonatype</id>
      <url>https://oss.sonatype.org/content/groups/public/</url>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <dependency>
      <groupId>io.cdap.wrangler</groupId>
      <artifactId>wrangler-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.cdap.cdap</groupId>
      <artifactId>cdap-api</artifactId>
      <version>${cdap.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.cdap.cdap</groupId>
      <artifactId>cdap-etl-api</artifactId>
      <version>${cdap.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>io.cdap.cdap</groupId>
      <artifactId>hydrator-test</artifactId>
      <version>${cdap.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.cdap.cdap</groupId>
      <artifactId>cdap-unit-test</artifactId>
      <version>${cdap.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.hive</groupId>
          <artifactId>hive-exec</artifactId>
        </exclusion>
        <exclusion>
          <groupId>io.cdap.cdap</groupId>
          <artifactId>cdap-explore-jdbc</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.14.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>3.3.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Embed-Dependency>*;inline=false;scope=compile</Embed-Dependency>
            <Embed-Transitive>true</Embed-Transitive>
            <Embed-Directory>lib</Embed-Directory>
            <!--Only @Plugin classes in the export packages will be included as plugin-->
            <_exportcontents>io.cdap.wrangler.*</_exportcontents>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>bundle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.cdap</groupId>
        <artifactId>cdap-maven-plugin</artifactId>
        <version>1.1.0</version>
        <configuration>
          <cdapArtifacts>
            <parent>system:cdap-data-pipeline[6.0.0,7.0.0-SNAPSHOT)</parent>
            <parent>system:cdap-data-streams[6.0.0,7.0.0-SNAPSHOT)</parent>
            <parent>system:mmds-app[1.2.0,2.0.0-SNAPSHOT)</parent>
          </cdapArtifacts>
        </configuration>
        <executions>
          <execution>
            <id>create-artifact-config</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>create-plugin-json</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <!-- Profile for release. Includes signing of jars. -->
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Source JAR -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <configuration>
              <excludeResources>true</excludeResources>
            </configuration>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Javadoc jar -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <configuration>
              <links>
                <link>http://download.oracle.com/javase/${jee.version}/docs/api/</link>
              </links>
              <doctitle>${project.name} ${project.version}</doctitle>
              <bottom>
                <![CDATA[Copyright &#169; {currentYear} <a href="http://cdap.io" target="_blank">CCDAP</a> Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License, Version 2.0</a>.]]>
              </bottom>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadoc</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-scm-plugin</artifactId>
            <version>1.9.5</version>
            <configuration>
              <tag>${project.artifactId}-${project.version}</tag>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <configuration>
              <passphrase>${gpg.passphrase}</passphrase>
              <useAgent>${gpg.useagent}</useAgent>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
