<?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>

    <artifactId>fastnbt_nms_v1_20_6</artifactId>
    <packaging>jar</packaging>

    <parent>
        <artifactId>FastNbt</artifactId>
        <groupId>beer.devs</groupId>
        <version>1.4.2</version>
    </parent>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
    </properties>

    <build>
        <plugins>
            <!-- Spigot to Mojang mapping is different on each version, so I use this trick to generate the files on demand. -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.1.0</version>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>GenerateNms</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <executable>cmd</executable>
                            <workingDirectory>${project.parent.basedir}</workingDirectory>
                            <arguments>
                                <argument>/C</argument>
                                <argument>"node .mvn-exec/GenerateNms.js"</argument>
                                <argument>${project.basedir}</argument>
                            </arguments>
                        </configuration>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>ca.bkaw</groupId>
            <artifactId>paper-nms</artifactId>
            <version>1.20.6-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>beer.devs</groupId>
            <artifactId>FastNbt-core</artifactId>
            <version>1.4.2</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>