<!--
  ~  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.12.7</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <dependencies>

        <dependency>
            <groupId>org.kordamp.ikonli</groupId>
            <artifactId>ikonli-javafx</artifactId>
        </dependency>

        <dependency>
            <groupId>org.kordamp.ikonli</groupId>
            <artifactId>ikonli-fontawesome-pack</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mnode.ical4j</groupId>
            <artifactId>ical4j</artifactId>
        </dependency>

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

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

    </dependencies>

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

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

                <configuration>
                    <backend>html</backend>
                    <outputFile>index.html</outputFile>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.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-javadoc-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <force>true</force>
                    <windowtitle>CalendarFX API</windowtitle>
                    <detectLinks>false</detectLinks>
                    <links>
                        <link>https://openjfx.io/javadoc/14/</link>
                    </links>

                    <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.3.1</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>
