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

    <groupId>com.github.kleinerhacker</groupId>
    <artifactId>jfex</artifactId>
    <version>3.0.0</version>
    <url>https://github.com/KleinerHacker/jfex</url>
    <name>JFex</name>
    <packaging>pom</packaging>
    <description>Extension Library for Open JavaFX with useful components, tools, properties etc.</description>
    <developers>
        <developer>
            <name>KleinerHacker</name>
            <email>kl3in3rhack3r@freenet.de</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache Licence, Version 2.0</name>
            <url>http://www.apache.org/licences/LICENCE-2.0.txt</url>
        </license>
    </licenses>

    <modules>
        <module>commons</module>
        <module>mvvm</module>
        <module>controls</module>
    </modules>

    <scm>
        <connection>scm:git:git@github.com:KleinerHacker/jfex.git</connection>
        <developerConnection>scm:git:git@github.com:KleinerHacker/jfex.git</developerConnection>
        <url>git@github.com:KleinerHacker/jfex.git</url>
    </scm>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>11</source>
                        <target>11</target>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>generate-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <attach>true</attach>
                            <additionalOptions>-Xdoclint:none</additionalOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Build-Source-Version>1.8</Build-Source-Version>
                            <Build-Target-Version>1.8</Build-Target-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <!-- ensure build order -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <executions>
                    <execution>
                        <id>deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>signer</id>
            <activation>
                <property>
                    <name>signer</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>doxygen</id>
            <activation>
                <property>
                    <name>doxygen</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>copy-doxygen</id>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <phase>prepare-package</phase>
                                <configuration>
                                    <outputDirectory>${basedir}/target</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>${basedir}</directory>
                                            <includes>
                                                <include>doxy.dat</include>
                                            </includes>
                                            <filtering>true</filtering>
                                            <targetPath>${basedir}/target</targetPath>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.6.0</version>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>pre-doxygen</id>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <phase>prepare-package</phase>
                                <configuration>
                                    <executable>cmd</executable>
                                    <workingDirectory>${basedir}</workingDirectory>
                                    <arguments>
                                        <argument>/C</argument>
                                        <argument>mkdir</argument>
                                        <argument>target\doxygen</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>doxygen</id>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <phase>package</phase>
                                <configuration>
                                    <executable>doxygen</executable>
                                    <workingDirectory>${basedir}</workingDirectory>
                                    <arguments>
                                        <argument>${basedir}/target/doxy.dat</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>3.0.0</version>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>attach-artifacts</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attach-artifact</goal>
                                </goals>
                                <configuration>
                                    <artifacts>
                                        <artifact>
                                            <file>${basedir}/target/doxygen/jremote.chm</file>
                                            <type>chm</type>
                                        </artifact>
                                    </artifacts>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <!--logging-->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.12</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-jdk14</artifactId>
                <version>1.7.2</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.6.4</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>apache-log4j-extras</artifactId>
                <version>1.1</version>
            </dependency>

            <!-- UI -->
            <dependency>
                <groupId>org.controlsfx</groupId>
                <artifactId>controlsfx</artifactId>
                <version>11.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-base</artifactId>
                <version>11.0.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-fxml</artifactId>
                <version>11.0.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-controls</artifactId>
                <version>11.0.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-graphics</artifactId>
                <version>11.0.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-swing</artifactId>
                <version>11.0.2</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.github.kleinerhacker</groupId>
                <artifactId>jftex</artifactId>
                <version>3.0.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- apache commons -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.12</version>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>oss-sonatype-staging</id>
            <name>OSS Sonatype Staging</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>oss-sonatype-snapshot</id>
            <name>OSS Sonatype Snapshot</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>
