<?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">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>at.reilaender.asciidoctorj.bootconfig2adoc</groupId>
		<artifactId>bootconfig2adoc</artifactId>
		<version>0.1.2</version>
	</parent>
	<artifactId>bootconfig2adoc-it</artifactId>

	<name>BootConfig2adoc :: integration test</name>
	<description>use SpringBootConfig in AsciidoctorJ run by real asciidoctor-maven-plugin in a real Spring-Boot-Project</description>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>at.reilaender.asciidoctorj.bootconfig2adoc</groupId>
				<artifactId>bootconfig2adoc-libdef</artifactId>
				<version>0.1.2</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-validation</artifactId>
		</dependency>

		<!-- ****** Test ***** -->

		<dependency>
			<groupId>at.reilaender.asciidoctorj.bootconfig2adoc</groupId>
			<artifactId>bootconfig2adoc-testutil</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- junit -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-runner</artifactId> 
			<scope>test</scope> </dependency> -->

		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.asciidoctor</groupId>
										<artifactId>asciidoctor-maven-plugin</artifactId>
										<versionRange>[1.5.7.1,)</versionRange>
										<goals>
											<goal>process-asciidoc</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<!-- https://github.com/asciidoctor/asciidoctor-maven-plugin/releases -->
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>adoc2html</id>
						<!-- phase must been after compile -->
						<phase>process-classes</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<backend>html5</backend>
							<doctype>article</doctype>
							<outputDirectory>${project.build.directory}/site/asciidoc/html</outputDirectory>

							<sourceHighlighter>highlightjs</sourceHighlighter>
							<attributes>
								<highlightjs-theme>googlecode</highlightjs-theme>
							</attributes>
						</configuration>
					</execution>

					<execution>
						<id>adoc2pdf</id>
						<!-- phase must been after compile -->
						<phase>process-classes</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<backend>pdf</backend>
							<doctype>article</doctype>
							<outputDirectory>${project.build.directory}/site/asciidoc/pdf</outputDirectory>

							<sourceHighlighter>coderay</sourceHighlighter>
						</configuration>
					</execution>
				</executions>

				<dependencies>
					<dependency>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoctorj</artifactId>
						<version>${asciidoctorj.version}</version>
					</dependency>

					<dependency>
						<groupId>at.reilaender.asciidoctorj.bootconfig2adoc</groupId>
						<artifactId>bootconfig2adoc-adoc</artifactId>
						<version>${project.version}</version>
					</dependency>

					<dependency>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoctorj-pdf</artifactId>
						<version>${asciidoctorj-pdf.version}</version>
					</dependency>

					<dependency>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoctorj-diagram</artifactId>
						<version>${asciidoctorj-diagram.version}</version>
					</dependency>
				</dependencies>
				<!-- configuration common to all asciidoc outputs -->
				<configuration>
					<requires>
						<require>asciidoctor-diagram</require>
					</requires>
					<attributes>
						<icons>font</icons>

						<sourceDocumentName>demo.adoc</sourceDocumentName>
						<sourceDirectory>src/main/asciidoc</sourceDirectory>
						<sectanchors>true</sectanchors>

						<buildTargetDir-config>${project.build.directory}</buildTargetDir-config>
					</attributes>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<reportSets>
					<reportSet>
						<id>project-info-report-every-module-first-part</id>
						<reports>
							<report>index</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>

</project>
