<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>dsf-fhir-validation</artifactId>

	<parent>
		<groupId>dev.dsf</groupId>
		<artifactId>dsf-fhir-pom</artifactId>
		<version>1.3.2</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>ca.uhn.hapi.fhir</groupId>
			<artifactId>hapi-fhir-structures-r4</artifactId>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi.fhir</groupId>
			<artifactId>hapi-fhir-structures-r5</artifactId>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi.fhir</groupId>
			<artifactId>hapi-fhir-validation</artifactId>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi.fhir</groupId>
			<artifactId>hapi-fhir-validation-resources-r4</artifactId>
		</dependency>
		<dependency>
			<groupId>ca.uhn.hapi.fhir</groupId>
			<artifactId>hapi-fhir-validation-resources-r5</artifactId>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>

		<!-- For ValidationSupportRule ... -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<!-- Workaround for exec maven plugin version 3.1.0 issue -->
			<!-- https://github.com/mojohaus/exec-maven-plugin/issues/247 -->
			<!-- <scope>test</scope> -->
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j2-impl</artifactId>
			<!-- Workaround for exec maven plugin version 3.1.0 issue -->
			<!-- https://github.com/mojohaus/exec-maven-plugin/issues/247 -->
			<!-- <scope>test</scope> -->
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
		<!-- Workaround for exec maven plugin version 3.1.0 issue -->
		<!-- https://github.com/mojohaus/exec-maven-plugin/issues/247 -->
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-tools-bundle-generator</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>java</goal>
						</goals>
						<phase>generate-resources</phase>
					</execution>
				</executions>
				<configuration>
					<mainClass>dev.dsf.tools.generator.BundleGenerator</mainClass>
					<arguments>
						<argument>${project.basedir}/src/main/resources/fhir</argument>
					</arguments>
					<workingDirectory>${project.basedir}</workingDirectory>
					<cleanupDaemonThreads>false</cleanupDaemonThreads>
					<!-- Workaround for exec maven plugin version 3.1.0 issue -->
					<!-- https://github.com/mojohaus/exec-maven-plugin/issues/247 -->
					<!-- <includePluginDependencies>true</includePluginDependencies> <includeProjectDependencies>false</includeProjectDependencies> -->
					<!-- <executableDependency> <groupId>dev.dsf</groupId> <artifactId>dsf-tools-bundle-generator</artifactId> </executableDependency> -->
				</configuration>
				<!-- Workaround for exec maven plugin version 3.1.0 issue -->
				<!-- https://github.com/mojohaus/exec-maven-plugin/issues/247 -->
				<!-- <dependencies> <dependency> <groupId>dev.dsf</groupId> <artifactId>dsf-tools-bundle-generator</artifactId> <version>1.3.2</version> </dependency>
					</dependencies> -->
			</plugin>
		</plugins>
		<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.codehaus.mojo</groupId>
										<artifactId>exec-maven-plugin</artifactId>
										<versionRange>[1.6.0,)</versionRange>
										<goals>
											<goal>java</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>