<?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>

    <parent>
        <groupId>com.github.nbbrd.sasquatch</groupId>
        <artifactId>sasquatch-parent</artifactId>
        <version>1.1.2</version>
    </parent>

    <artifactId>sasquatch-cli</artifactId>
    <packaging>jar</packaging>

    <name>sasquatch-cli</name>
    <description>A java reader of SAS datasets - CLI</description>
    <url>https://github.com/nbbrd/sasquatch</url>

    <dependencies>
        <!-- compile only -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jspecify</groupId>
            <artifactId>jspecify</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- compile and runtime -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sasquatch-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sasquatch-ri</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli</artifactId>
            <version>4.7.7</version>
        </dependency>
        <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli-jansi-graalvm</artifactId>
            <version>1.2.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.nbbrd.picocsv</groupId>
            <artifactId>picocsv</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>com.github.nbbrd.java-io-util</groupId>
            <artifactId>java-io-base</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.nbbrd.java-io-util</groupId>
            <artifactId>java-io-picocsv</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.github.nbbrd.picocsv</groupId>
                    <artifactId>picocsv</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.github.nbbrd.java-console-properties</groupId>
            <artifactId>java-console-properties</artifactId>
            <version>1.4.1</version>
            <exclusions>
                <exclusion>
                    <groupId>info.picocli</groupId>
                    <artifactId>picocli</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.nbbrd.java-io-util</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.nbbrd.java-design-util</groupId>
                    <artifactId>java-design-processor</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Runtime only -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sasquatch-parso</artifactId>
            <version>${project.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sasquatch-sassy</artifactId>
            <version>${project.version}</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Generates a all-in-one executable jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>module-info.class</exclude>
                                <exclude>META-INF/MANIFEST.MF</exclude>
                            </excludes>
                        </filter>
                    </filters>
                    <transformers>
                        <transformer
                                implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                        <transformer
                                implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                            <mainClass>sasquatch.cli.MainCommand</mainClass>
                            <manifestEntries>
                                <Enable-Native-Access>ALL-UNNAMED</Enable-Native-Access>
                            </manifestEntries>
                        </transformer>
                    </transformers>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                    <shadedClassifierName>bin</shadedClassifierName>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>