<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<artifactId>spring-data-mongodb-distribution</artifactId>

	<packaging>pom</packaging>

	<name>Spring Data MongoDB - Distribution</name>
	<description>Distribution build for Spring Data MongoDB</description>

	<parent>
		<groupId>org.springframework.data</groupId>
		<artifactId>spring-data-mongodb-parent</artifactId>
		<version>4.2.0-SNAPSHOT</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<properties>
		<project.root>${basedir}/..</project.root>
		<dist.key>SDMONGO</dist.key>

		<!-- Observability -->
		<micrometer-docs-generator.inputPath>${maven.multiModuleProjectDirectory}/spring-data-mongodb/</micrometer-docs-generator.inputPath>
		<micrometer-docs-generator.inclusionPattern>.*</micrometer-docs-generator.inclusionPattern>
		<micrometer-docs-generator.outputPath>${maven.multiModuleProjectDirectory}/target/</micrometer-docs-generator.outputPath>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-docs</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<configuration>
							<mainClass>io.micrometer.docs.DocsGeneratorCommand</mainClass>
							<includePluginDependencies>true</includePluginDependencies>
							<arguments>
								<argument>${micrometer-docs-generator.inputPath}</argument>
								<argument>${micrometer-docs-generator.inclusionPattern}</argument>
								<argument>${micrometer-docs-generator.outputPath}</argument>
							</arguments>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>io.micrometer</groupId>
						<artifactId>micrometer-docs-generator</artifactId>
						<version>1.0.1</version>
						<type>jar</type>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<configuration>
					<attributes>
						<mongo-reactivestreams>${mongo.reactivestreams}
						</mongo-reactivestreams>
						<reactor>${reactor}</reactor>
					</attributes>
				</configuration>
			</plugin>
		</plugins>

	</build>

</project>
