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

    <name>GemsFXParent</name>
    <groupId>com.dlsc.gemsfx</groupId>
    <artifactId>parent</artifactId>
    <version>1.25.2</version>
    <packaging>pom</packaging>

    <modules>
        <module>gemsfx</module>
        <module>gemsfx-demo</module>
    </modules>

    <description>Parent project of GemsFX
    </description>
    <url>https://github.com/dlemmermann/GemsFX</url>
    <licenses>
        <license>
            <name>Apache 2.0</name>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Dirk Lemmermann</name>
            <email>dlemmermann@gmail.com</email>
            <organization>DLSC Software &amp; Consulting GmbH</organization>
            <url>http://www.dlsc.com</url>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/dlsc-software-consulting-gmbh/GemsFX</url>
    </scm>

    <properties>
        <sonar.projectKey>dlsc-software-consulting-gmbh_GemsFX</sonar.projectKey>
        <sonar.organization>dlsc-software-consulting-gmbh</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.moduleKey>${project.artifactId}</sonar.moduleKey>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <asciidoctor.maven.plugin.version>1.6.0</asciidoctor.maven.plugin.version>
        <asciidoctorj.version>1.6.2</asciidoctorj.version>
        <jruby.version>9.2.6.0</jruby.version>
    </properties>

    <repositories>

        <repository>
            <id>bintray-dlsc-oss-repository</id>
            <name>bintray</name>
            <url>https://dl.bintray.com/dlsc-oss/repository</url>
        </repository>

    </repositories>

    <distributionManagement>
        <repository>
            <id>bintray-dlsc-oss-repository</id>
            <name>dlsc-oss-repository</name>
            <url>
                https://api.bintray.com/maven/dlsc-oss/repository/GemsFX/;publish=1
            </url>
        </repository>
    </distributionManagement>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.dlsc.gemsfx</groupId>
                <artifactId>gemsfx</artifactId>
                <version>1.25.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <force>true</force>
                    <windowtitle>GemsFX API</windowtitle>
                    <additionalJOption>-J-Djavafx.javadoc=true
                    </additionalJOption>
                    <docfilessubdirs>true</docfilessubdirs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-docs
                        </id> <!-- this is used for inheritance merges -->
                        <phase>package
                        </phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>${asciidoctor.maven.plugin.version}</version>
                <dependencies>
                    <!-- Comment this section to use the default jruby artifact provided by the plugin -->
                    <dependency>
                        <groupId>org.jruby</groupId>
                        <artifactId>jruby-complete</artifactId>
                        <version>${jruby.version}</version>
                    </dependency>
                    <!-- Comment this section to use the default AsciidoctorJ artifact provided by the plugin -->
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj</artifactId>
                        <version>${asciidoctorj.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <sourceDirectory>docs</sourceDirectory>
                    <attributes>
                        <project-version>${project.version}</project-version>
                    </attributes>
                </configuration>
                <executions>
                    <execution>
                        <id>asciidoc-to-html</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <backend>html5</backend>
                            <sourceHighlighter>coderay</sourceHighlighter>
                            <attributes>
                                <coderay-linenums-mode>table</coderay-linenums-mode>
                                <imagesdir></imagesdir>
                                <toc>left</toc>
                                <icons>font</icons>
                                <linkattrs>true</linkattrs>
                                <encoding>utf-8</encoding>
                            </attributes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
