<?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>1.0.0-M2.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jackson</artifactId>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <configuration>
          <shadedArtifactAttached>false</shadedArtifactAttached>
          <createDependencyReducedPom>true</createDependencyReducedPom>
          <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
          <artifactSet>
            <includes>
              <include>com.fasterxml.jackson:*</include>
              <include>com.fasterxml.jackson.*:*</include>
              <include>com.fasterxml.woodstox:*</include>
              <include>org.yaml*:*</include>
              <include>org.codehaus*:*</include>
            </includes>
            <excludes>
              <exclude>module-info.java</exclude>
            </excludes>
          </artifactSet>
          <relocations>
            <relocation>
              <pattern>com.fasterxml.jackson</pattern>
              <shadedPattern>org.nd4j.shade.jackson</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.ctc.wstx</pattern>
              <shadedPattern>org.nd4j.shade.wstx</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.yaml</pattern>
              <shadedPattern>org.nd4j.shade.yaml</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.codehaus</pattern>
              <shadedPattern>org.nd4j.shade.codehaus</shadedPattern>
            </relocation>
          </relocations>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/services/javax.xml.stream.XMLOutputFactory</exclude>
                <exclude>META-INF/services/javax.xml.stream.XMLInputFactory</exclude>
                <exclude>META-INF/services/javax.xml.stream.XMLEventFactory</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>empty-javadoc-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <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>
        <configuration>
          <forceCreation>true</forceCreation>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
      </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/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/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>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.10.8</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <properties>
    <skipTestResourceEnforcement>true</skipTestResourceEnforcement>
  </properties>
</project>
