<?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>denizen-parent</artifactId>
    <groupId>com.denizenscript</groupId>
    <version>1.2.6-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>denizen-dist</artifactId>
  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
          <include>*.mid</include>
        </includes>
      </resource>
      <resource>
        <filtering>true</filtering>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
          <include>*.yml</include>
          <include>*.dsc</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.4.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <minimizeJar>true</minimizeJar>
              <filters>
                <filter>
                  <artifact>com.denizenscript:denizencore</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.denizenscript:denizen</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>org.json:json</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.denizenscript:denizen-v**</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.denizenscript:denizen-paper</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
                <filter>
                  <artifact>com.denizenscript:denizen-nmshandler</artifact>
                  <includes>
                    <include>**</include>
                  </includes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>com.freneticllc</pattern>
                  <shadedPattern>com.denizenscript.shaded.com.freneticllc</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.json</pattern>
                  <shadedPattern>com.denizenscript.shaded.org.json</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.ow2.asm</pattern>
                  <shadedPattern>com.denizenscript.shaded.org.ow2.asm</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.objectweb</pattern>
                  <shadedPattern>com.denizenscript.shaded.org.objectweb</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache</pattern>
                  <shadedPattern>com.denizenscript.shaded.org.apache</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.3.0</version>
        <configuration>
          <finalName>Denizen-${DENIZEN_VERSION}-b${BUILD_NUMBER}-${BUILD_CLASS}</finalName>
          <outputDirectory>../target</outputDirectory>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <classpathPrefix>Denizen/lib/</classpathPrefix>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.10.1</version>
        <configuration>
          <source>16</source>
          <target>16</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
