<!--
  ~  Copyright (C) 2017 Dirk Lemmermann Software & Consulting (dlsc.com)
  ~
  ~  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>
    <artifactId>view</artifactId>
    <name>CalendarFXView</name>

    <parent>
        <groupId>com.calendarfx</groupId>
        <artifactId>calendar</artifactId>
        <version>11.6.4</version>
    </parent>

    <repositories>
        <!-- repository>
            <id>oss-sonatype</id>
            <name>oss-sonatype</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository -->

        <repository>
            <id>bintray</id>
            <name>bintray</name>
            <url>https://dl.bintray.com/jerady/maven</url>
        </repository>

    </repositories>

    <dependencies>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>12.0.1</version>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>12.0.1</version>
        </dependency>

        <dependency>
            <groupId>com.calendarfx</groupId>
            <artifactId>recurrence</artifactId>
            <version>11.6.4</version>
        </dependency>

        <dependency>
            <groupId>org.controlsfx</groupId>
            <artifactId>controlsfx</artifactId>
            <version>11.0.0</version>
        </dependency>

        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-commons</artifactId>
            <version>9.1.2</version>
        </dependency>

        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-fontawesome</artifactId>
            <version>4.7.0-9.1.2</version>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>1.5.3</version>

                <executions>
                    <execution>
                        <id>output-html</id>
                        <phase>install</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                    </execution>
                </executions>

                <configuration>
                    <sourceHighlighter>coderay</sourceHighlighter>
                    <backend>html</backend>
                    <imagesDir>manual-images</imagesDir>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</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>3.1.1</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <force>true</force>
                    <windowtitle>CalendarFX API</windowtitle>
                    <additionalJOptions>
                        <additionalJOption>-J-Djavafx.javadoc=true</additionalJOption>
                        <additionalJOption>-html5</additionalJOption>
                    </additionalJOptions>
                    <docfilessubdirs>true</docfilessubdirs>
                    <tags>
                        <tag>
                            <name>defaultValue</name>
                            <placement>a</placement>
                            <head>Default Value:</head>
                        </tag>
                        <tag>
                            <name>apiNote</name>
                            <placement>a</placement>
                            <head>API Note:</head>
                        </tag>
                        <tag>
                            <name>implSpec</name>
                            <placement>a</placement>
                            <head>Implementation Requirements:</head>
                        </tag>
                        <tag>
                            <name>implNote</name>
                            <placement>a</placement>
                            <head>Implementation Note:</head>
                        </tag>
                    </tags>
                    <sourceFileExcludes>
                        <sourceFileExclude>**\/\module-info.java</sourceFileExclude>
                    </sourceFileExcludes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>7.0</version>
                    </dependency>
                </dependencies>
                <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>

        </plugins>
    </build>
</project>
