<?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">
  <parent>
    <artifactId>nd4j-shade</artifactId>
    <groupId>org.nd4j</groupId>
    <version>0.9.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jackson</artifactId>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven-shade-plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer>
                  <resource>reference.conf</resource>
                </transformer>
                <transformer />
                <transformer />
              </transformers>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <shadedArtifactAttached>false</shadedArtifactAttached>
          <createDependencyReducedPom>true</createDependencyReducedPom>
          <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
          <artifactSet>
            <includes>
              <include>com.fasterxml.jackson:*</include>
              <include>com.fasterxml.jackson.*:*</include>
            </includes>
          </artifactSet>
          <relocations>
            <relocation>
              <pattern>com.fasterxml.jackson</pattern>
              <shadedPattern>org.nd4j.shade.jackson</shadedPattern>
            </relocation>
          </relocations>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>empty-javadoc-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <skip>false</skip>
              <classifier>javadoc</classifier>
              <classesDirectory>${basedir}/javadoc</classesDirectory>
            </configuration>
          </execution>
          <execution>
            <id>empty-sources-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
              <classesDirectory>${basedir}/src</classesDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.nd4j</groupId>
                  <artifactId>jackson</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/classes/</outputDirectory>
                  <includes>**/*.class,**/*.xml</includes>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>custom-lifecycle</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.portals.jetspeed-2</groupId>
            <artifactId>jetspeed-mvn-maven-plugin</artifactId>
            <version>2.3.1</version>
            <executions>
              <execution>
                <id>compile-and-pack</id>
                <phase>compile</phase>
                <goals>
                  <goal>mvn</goal>
                </goals>
                <configuration>
                  <targets>
                    <target>
                      <id>create-shaded-jars</id>
                      <dir>@rootdir@/nd4j-shade/jackson/</dir>
                      <goals>clean,compile,package</goals>
                      <properties>
                        <skip.custom.lifecycle>true</skip.custom.lifecycle>
                      </properties>
                    </target>
                  </targets>
                  <defaultTarget>create-shaded-jars</defaultTarget>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.shared</groupId>
                <artifactId>maven-invoker</artifactId>
                <version>2.2</version>
                <scope>compile</scope>
              </dependency>
            </dependencies>
            <configuration>
              <targets>
                <target>
                  <id>create-shaded-jars</id>
                  <dir>@rootdir@/nd4j-shade/jackson/</dir>
                  <goals>clean,compile,package</goals>
                  <properties>
                    <skip.custom.lifecycle>true</skip.custom.lifecycle>
                  </properties>
                </target>
              </targets>
              <defaultTarget>create-shaded-jars</defaultTarget>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <version>1.12</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>stax2-api</artifactId>
      <version>3.1.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.2</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>