<?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>net.morimekta.utils</groupId>
        <artifactId>terminal-pom</artifactId>
        <version>5.0.0</version>
    </parent>
    <artifactId>terminal-args</artifactId>
    <packaging>jar</packaging>
    <url>https://gitlab.com/morimekta/utils-terminal</url>

    <name>Terminal Utils : Arguments</name>
    <description>
        Argument parser for java and kotlin.
    </description>

    <dependencies>
        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>strings</artifactId>
        </dependency>
        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>io</artifactId>
        </dependency>
        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>collect</artifactId>
        </dependency>

        <!-- testing dependencies -->
        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>testing</artifactId>
            <version>5.6.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>testing-junit5</artifactId>
            <version>5.6.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.morimekta.utils</groupId>
            <artifactId>file</artifactId>
            <version>4.1.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.13</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <version>2.0.13</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
            <version>2.0.13</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.5.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.10.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>5.12.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <sourceFileIncludes>
                        <include>net/morimekta/terminal/args/**/*.java</include>
                    </sourceFileIncludes>
                    <sourceFileExcludes>
                        <!-- not exported -->
                        <exclude>net/morimekta/terminal/args/impl/*.java</exclude>
                        <exclude>net/morimekta/terminal/args/reference/*.java</exclude>
                        <!-- testing -->
                        <exclude>**/test/*.java</exclude>
                        <exclude>**/test/**/*.java</exclude>
                        <exclude>**/test/*.kt</exclude>
                        <exclude>**/test/**/*.kt</exclude>
                    </sourceFileExcludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>add-kotlin-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.basedir}/src/test/kotlin</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>

                <executions>
                    <execution>
                        <id>test-compile</id>
                        <phase>process-test-sources</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <source>src/test/java</source>
                                <source>src/test/kotlin</source>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>11</jvmTarget>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>testCompile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
