<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>
    <groupId>net.raumzeitfalle.fx</groupId>
    <artifactId>filechooser</artifactId>
    <version>0.0.9</version>
    <description>A custom file chooser with live filtering JavaFX and Swing</description>
    <inceptionYear>2017</inceptionYear>
    <organization>
        <name>Oliver Loeffler, Raumzeitfalle.net</name>
        <url>http://www.raumzeitfalle.net</url>
    </organization>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <java.version>1.8</java.version>

        <junit.platform.version>1.9.1</junit.platform.version>
        <junit.jupiter.version>5.9.1</junit.jupiter.version>
        <awaitility.version>4.2.0</awaitility.version>

        <testfx.version>4.0.8-alpha</testfx.version>
        <testfx.monocle.version>8u76-b04</testfx.monocle.version> <!-- jdk-9+181 for Java 9 -->

        <maven.jacoco.plugin.version>0.8.8</maven.jacoco.plugin.version>
        <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
        <maven.javadoc.plugin.version>3.4.1</maven.javadoc.plugin.version>
        <maven.jar.plugin.version>3.3.0</maven.jar.plugin.version>
        <maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version>
        <maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>

        <maven.nexus.staging.plugin.version>1.6.13</maven.nexus.staging.plugin.version>
        <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
        <maven.release.plugin.version>3.0.0-M7</maven.release.plugin.version>
        <maven.license.plugin.version>2.0.0</maven.license.plugin.version>

    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/fireworks/</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>./</directory>
                <includes>
                    <include>NOTICE</include>
                    <include>LICENSE</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <excludes>
                        <exclude>module-info.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${maven.jacoco.plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>target/jacoco.exec</dataFile>
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <exclude>**/demos/</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <url>${project.url}</url>
                            <Bundle-License>http://www.apache.org/licenses/LICENSE-2.0.txt</Bundle-License>
                            <Bundle-Attributions>see NOTICE for attributions</Bundle-Attributions>
                        </manifestEntries>
                    </archive>
                    <excludes>
                        <exclude>**/fireworks/</exclude>
                        <exclude>**/demos/</exclude>
                        <exclude>**/filechooser.properties</exclude>
                        <exclude>**/directorychooser.properties</exclude>
                        <exclude>**/*.svg</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <configuration>
                    <excludes>
                        <exclude>**/fireworks/</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <sourceFileExcludes>module-info.java</sourceFileExcludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${maven.nexus.staging.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release.plugin.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.ec4j.maven</groupId>
                <artifactId>editorconfig-maven-plugin</artifactId>
                <version>0.1.1</version>
                <executions>
                    <execution>
                        <id>check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>8.45.1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${maven.license.plugin.version}</version>
                <configuration>
                    <verbose>true</verbose>
                    <licenseName>apache_v2</licenseName>
                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                    <includes>
                        <includes>**/*.java</includes>
                        <includes>**/*.fxml</includes>
                        <includes>**/*.css</includes>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>download-licenses</id>
                        <goals>
                            <goal>download-licenses</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generate-license-headers</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <roots>
                                <root>src/main/java</root>
                                <root>src/main/resources</root>
                                <root>src/test/java</root>
                            </roots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!--
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-base</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-swing</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>${javafx.version}</version>
            </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        //-->
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${awaitility.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
        </dependency>
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>testfx-core</artifactId>
            <version>${testfx.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>testfx-junit5</artifactId>
            <version>${testfx.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>openjfx-monocle</artifactId>
            <version>${testfx.monocle.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <issueManagement>
        <system>Github</system>
        <url>https://github.com/Oliver-Loeffler/FXFileChooser/issues</url>
    </issueManagement>

    <scm>
        <url>https://github.com/Oliver-Loeffler/FXFileChooser</url>
        <connection>scm:git:git@github.com/oliver-loeffler/fxfilechooser.git</connection>
        <developerConnection>scm:git:git@github.com:oliver-loeffler/fxfilechooser.git</developerConnection>
        <tag>0.0.9</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache License version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Oliver Loeffler</name>
            <url>https://github.com/oliver-loeffler</url>
            <id>oloeffler</id>
        </developer>
    </developers>


    <name>FXFileChooser</name>
    <url>http://fx.raumzeitfalle.net</url>


    <profiles>
        <profile>
            <id>sonar</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <sonar.host.url>https://sonarcloud.io</sonar.host.url>
                <sonar.projectKey>${env.SONARCLOUD_PROJECT_KEY}</sonar.projectKey>
                <sonar.login>${env.SONARCLOUD_LOGIN}</sonar.login>
                <sonar.organization>${env.SONARCLOUD_ORG}</sonar.organization>
                <sonar.exclusions>net/raumzeitfalle/fx/*</sonar.exclusions>
            </properties>
        </profile>
    </profiles>
</project>
