<?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">
    <parent>
        <artifactId>parent-importer</artifactId>
        <groupId>io.skalogs.skaetl</groupId>
        <version>1.0.2.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>enduser-doc</artifactId>
    <name>enduser-doc</name>

    <properties>
        <!-- Force JRuby version to fix error "undefined method `encoding' for nil:NilClass"-->
        <jruby.version>9.1.12.0</jruby.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.jruby</groupId>
                        <artifactId>jruby-complete</artifactId>
                        <version>${jruby.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj-pdf</artifactId>
                        <version>1.5.0-alpha.16</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <title>Monitoring Platform End User Documentation</title>
                    <preserveDirectories>true</preserveDirectories>
                    <sourceHighlighter>coderay</sourceHighlighter>
                    <doctype>book</doctype>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-html</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <backend>html5</backend>
                            <attributes>
                                <toc>left</toc>
                                <linkcss />
                            </attributes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate-pdf-doc</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <sourceDocumentName>full.adoc</sourceDocumentName>
                            <backend>pdf</backend>
                            <attributes>
                                <toc />
                            </attributes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>dockerfile-maven-plugin</artifactId>
                <configuration>
                    <repository>skalogs/enduser-doc</repository>
                    <tag>${project.version}</tag>
                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
                    <skip>${dockerfile.skip}</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>