<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->
<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>

	<parent>
		<groupId>org.jboss</groupId>
		<artifactId>jboss-parent</artifactId>
		<version>47</version>
		<!--
        Maintain separation between the artifact id and the version to help prevent
        merge conflicts between commits changing the GA and those changing the V.
        -->
		<relativePath/>
	</parent>

	<groupId>org.wildfly</groupId>
	<artifactId>docs-app-development-guide</artifactId>
	<version>36.0.0.Beta1</version>

	<name>WildFly Application Development Guide</name>
	<description>WildFly application development guide using Asciidoctor Maven plugin.</description>

	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>http://repository.jboss.org/licenses/apache-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- the Maven project should use the minimum Java SE version supported -->
		<maven.compiler.release>17</maven.compiler.release>
		<asciidoctor.maven.plugin.version>3.0.0</asciidoctor.maven.plugin.version>
		<asciidoctorj.version>2.5.13</asciidoctorj.version>
		<jruby.version>9.4.6.0</jruby.version>
		<plugin.version>5.1.1.Final</plugin.version>
	</properties>

	<build>
		<defaultGoal>process-resources</defaultGoal>
		<plugins>
			<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</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>src/docs/asciidoc</sourceDirectory>
					<!-- If you set baseDir to ${project.basedir}, top-level
					includes are resolved relative to the project root -->
					<!--
                    <baseDir>${project.basedir}</baseDir>
                    -->
					<!-- Attributes common to all output formats, and versions to be injected -->
					<attributes>
						<endpoint-url>https://example.org</endpoint-url>
						<sourcedir>${project.build.sourceDirectory}</sourcedir>
						<project-version>${project.version}</project-version>
						<plugin-version>${plugin.version}</plugin-version>
					</attributes>
				</configuration>
				<executions>
					<execution>
						<id>asciidoc-to-html</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.outputDirectory}</outputDirectory>						
							<backend>html5</backend>
							<attributes>
								<source-highlighter>rouge</source-highlighter>
								<imagesdir>./images</imagesdir>
								<toc>left</toc>
								<icons>font</icons>
								<sectanchors>true</sectanchors>
								<!-- set the idprefix to blank -->
								<idprefix />
								<idseparator>-</idseparator>
								<docinfo1>true</docinfo1>
							</attributes>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>