<?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>io.restx</groupId>
        <artifactId>restx-parent</artifactId>
        <version>1.0.0-rc2</version>
    </parent>

    <artifactId>restx-samplest-kotlin</artifactId>
    <packaging>jar</packaging>
    <name>restx-samplest-kotlin</name>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <kotlin.version>1.8.22</kotlin.version>
        <kotlin.compiler.incremental>false</kotlin.compiler.incremental>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-core-annotation-processor</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-factory</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-factory-admin</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-monitor-admin</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-server-simple</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-apidocs</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-specs-admin</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-barbarywatch</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.restx</groupId>
            <artifactId>restx-specs-tests</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>kotlin-maven-plugin</artifactId>
                <groupId>org.jetbrains.kotlin</groupId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                    <execution>
                        <id>kapt</id>
                        <goals>
                            <goal>kapt</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>src/main/kotlin</sourceDir>
                                <sourceDir>src/main/java</sourceDir>
                            </sourceDirs>
                            <annotationProcessorPaths>
                                <!-- Specify your annotation processors here. -->
                                <annotationProcessorPath>
                                    <groupId>io.restx</groupId>
                                    <artifactId>restx-factory-annotation-processor</artifactId>
                                    <version>${restx.version}</version>
                                </annotationProcessorPath>
                                <annotationProcessorPath>
                                    <groupId>io.restx</groupId>
                                    <artifactId>restx-core-annotation-processor</artifactId>
                                    <version>${restx.version}</version>
                                </annotationProcessorPath>
                            </annotationProcessorPaths>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <executions>
                    <!-- Replacing default-compile as it is treated specially by maven -->
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <!-- Replacing default-testCompile as it is treated specially by maven -->
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>java-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>java-test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <excludePackageNames>samplest;samplest.*</excludePackageNames>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <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>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
