<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017 - 2019 EasyFXML project and contributors
  ~
  ~    Licensed under the Apache License, Version 2.0 (the "License");
  ~    you may not use this file except in compliance with the License.
  ~    You may obtain a copy of the License at
  ~
  ~        http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~    Unless required by applicable law or agreed to in writing, software
  ~    distributed under the License is distributed on an "AS IS" BASIS,
  ~    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~    See the License for the specific language governing permissions and
  ~    limitations under the License.
  -->

<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>
        <artifactId>easyfxml-parent</artifactId>
        <groupId>moe.tristan</groupId>
        <version>3.3.0</version>
    </parent>

    <name>EasyFXML - Common module configuration</name>
    <artifactId>easyfxml-module-base</artifactId>
    <packaging>pom</packaging>

    <properties>
        <jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
        <maven-surefire-plugin.version>3.0.0-M3</maven-surefire-plugin.version>

        <maven-source-plugin.version>3.1.0</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>

        <!-- OpenJFX / TestFX -->
        <openjfx.version>11.0.2</openjfx.version>
        <testfx.version>4.0.15-alpha</testfx.version>
        <testfx-monocle.version>jdk-11+26</testfx-monocle.version>

        <!-- Miscellaneous -->
        <vavr.version>0.9.2</vavr.version>
        <immutables.version>2.7.5</immutables.version>

        <!-- Testing -->
        <awaitility.version>3.1.6</awaitility.version>
        <reflections.version>0.9.11</reflections.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <release>${java.version}</release>
                    <annotationProcessorPaths>
                        <dependency>
                            <groupId>org.immutables</groupId>
                            <artifactId>value</artifactId>
                            <version>${immutables.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-configuration-processor</artifactId>
                            <version>${spring.boot.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-autoconfigure-processor</artifactId>
                            <version>${spring.boot.version}</version>
                        </dependency>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <useModulePath>false</useModulePath>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>7.0</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <detectJavaApiLink>true</detectJavaApiLink>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc</id>
                        <phase>post-site</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.fxml</include>
                </includes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </testResource>
            <testResource>
                <directory>src/test/java</directory>
                <includes>
                    <include>**/*.fxml</include>
                </includes>
            </testResource>
        </testResources>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>moe.tristan</groupId>
                <artifactId>easyfxml</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>moe.tristan</groupId>
                <artifactId>easyfxml-fxkit</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>moe.tristan</groupId>
                <artifactId>easyfxml-junit</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>moe.tristan</groupId>
                <artifactId>easyfxml-native</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>moe.tristan</groupId>
                <artifactId>easyfxml-platform</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>moe.tristan</groupId>
                <artifactId>easyfxml-settings</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- region OpenJFX / TestFX -->
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-base</artifactId>
                <version>${openjfx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-graphics</artifactId>
                <version>${openjfx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-controls</artifactId>
                <version>${openjfx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-fxml</artifactId>
                <version>${openjfx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>testfx-core</artifactId>
                <version>${testfx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>testfx-junit</artifactId>
                <version>${testfx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>openjfx-monocle</artifactId>
                <version>${testfx-monocle.version}</version>
            </dependency>
            <!-- endregion -->

            <!-- Miscellaneous -->
            <dependency>
                <groupId>org.immutables</groupId>
                <artifactId>value</artifactId>
                <version>${immutables.version}</version>
            </dependency>
            <dependency>
                <groupId>io.vavr</groupId>
                <artifactId>vavr</artifactId>
                <version>${vavr.version}</version>
            </dependency>

            <!-- Testing -->
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${awaitility.version}</version>
            </dependency>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${reflections.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- region Spring Boot -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure-processor</artifactId>
        </dependency>
        <!-- endregion -->

        <!-- Runtime dependencies -->
        <dependency>
            <groupId>io.vavr</groupId>
            <artifactId>vavr</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
