<?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">
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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.
  -->

    <parent>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-parent</artifactId>
        <version>2.23.2.fuse-7_10_2-00006-redhat-00002</version>
        <relativePath>../parent</relativePath>
    </parent>

    <artifactId>docs</artifactId>
    <name>Camel :: Docs</name>
    <description>Camel Documentation</description>
    <packaging>pom</packaging>
    <modelVersion>4.0.0</modelVersion>

    <profiles>
        <profile>
            <id>html</id>
            <build>
                <defaultGoal>process-resources</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctor-maven-plugin</artifactId>
                        <version>1.5.6</version>
                        <executions>
                            <execution>
                                <id>output-html</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>process-asciidoc</goal>
                                </goals>
                                <configuration>
                                    <backend>html5</backend>
                                    <doctype>article</doctype>
                                    <attributes>
                                        <toc />
                                        <linkcss>true</linkcss>
                                        <stylesheet>apache.css</stylesheet>
                                        <imagesdir>images</imagesdir>
                                    </attributes>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <sourceDirectory>user-manual/en</sourceDirectory>
                            <outputDirectory>target/generated-html</outputDirectory>
                            <preserveDirectories>true</preserveDirectories>
                            <headerFooter>true</headerFooter>
                            <imagesDir>user-manual/en/images</imagesDir>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>pdf</id>
            <build>
                <defaultGoal>process-resources</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctor-maven-plugin</artifactId>
                        <version>1.5.6</version>
                        <dependencies>
                            <dependency>
                                <groupId>org.asciidoctor</groupId>
                                <artifactId>asciidoctorj-pdf</artifactId>
                                <version>1.5.0-alpha.16</version>
                            </dependency>
                        </dependencies>
                        <configuration>
                            <sourceDirectory>user-manual/en</sourceDirectory>
                            <outputDirectory>target/generated-pdf</outputDirectory>
                            <preserveDirectories>true</preserveDirectories>
                            <headerFooter>true</headerFooter>
                            <backend>pdf</backend>
                            <attributes>
                                <project-version>${project.version}</project-version>
                                <pdf-stylesdir>${project.basedir}/theme</pdf-stylesdir>
                                <pdf-style>apache</pdf-style>
                                <pdf-fontsdir>${project.basedir}/theme/fonts</pdf-fontsdir>
                                <imagesdir>images</imagesdir>
                                <icons>font</icons>
                                <pagenums>true</pagenums>
                                <toc />
                                <idprefix />
                                <idseparator>-</idseparator>
                                <sectnums>true</sectnums>
                            </attributes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>generate-pdf-doc</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>process-asciidoc</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>