<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.bahmni.module</groupId>
		<artifactId>appointments</artifactId>
		<version>2.2.0</version>
	</parent>

	<artifactId>appointments-omod</artifactId>
	<packaging>jar</packaging>
	<name>appointments OMOD</name>
	<description>OpenMRS module project for Bahmni Appointment Scheduling</description>

	<properties>
		<MODULE_ID>appointments</MODULE_ID>
		<MODULE_NAME>${project.name}</MODULE_NAME>
		<MODULE_VERSION>${project.version}</MODULE_VERSION>
		<MODULE_PACKAGE>${project.groupId}.${MODULE_ID}</MODULE_PACKAGE>
	</properties>

	<dependencies>
		<dependency>
			<groupId>${project.parent.groupId}</groupId>
			<artifactId>${project.parent.artifactId}-api</artifactId>
			<version>${project.parent.version}</version>
		</dependency>
		<dependency>
			<groupId>org.bahmni.module</groupId>
			<artifactId>search-commons</artifactId>
			<version>2.0.0</version>
		</dependency>
		<dependency>
			<groupId>${project.parent.groupId}</groupId>
			<artifactId>${project.parent.artifactId}-atom-feed</artifactId>
			<version>${project.parent.version}</version>
		</dependency>
		<dependency>
			<groupId>org.openmrs.web</groupId>
			<artifactId>openmrs-web</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.bahmni.module</groupId>
			<artifactId>teleconsultation-api</artifactId>
			<version>${teleconsultation.version}</version>
			<type>jar</type>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>${servletApi.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.openmrs.test</groupId>
			<artifactId>openmrs-test</artifactId>
			<type>pom</type>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openmrs.web</groupId>
			<artifactId>openmrs-web</artifactId>
			<version>${openmrs.platform.version}</version>
			<scope>test</scope>
			<type>test-jar</type>
		</dependency>
		<dependency>
			<groupId>org.openmrs.api</groupId>
			<artifactId>openmrs-api</artifactId>
			<version>${openmrs.platform.version}</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openmrs.module</groupId>
			<artifactId>webservices.rest-omod-common</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<finalName>${project.parent.artifactId}-${project.parent.version}</finalName>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>

		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
		</testResources>

		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<configuration>
						<includeEmptyDirs>true</includeEmptyDirs>
					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.openmrs.maven.plugins</groupId>
				<artifactId>maven-openmrs-plugin</artifactId>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>init</id>
						<phase>initialize</phase>
						<goals>
							<goal>initialize-module</goal>
						</goals>
					</execution>
					<execution>
						<id>pack</id>
						<phase>package</phase>
						<goals>
							<goal>package-module</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>Expand moduleApplicationContext and messages</id>
						<goals>
							<goal>unpack-dependencies</goal>
						</goals>
						<phase>generate-resources</phase>
						<configuration>
							<includeGroupIds>${project.parent.groupId}</includeGroupIds>
							<includeArtifactIds>${project.parent.artifactId}-api</includeArtifactIds>
							<excludeTransitive>true</excludeTransitive>
							<includes>**\/*.xml,**\/*.properties,**\/*.sql</includes>
							<outputDirectory>${project.build.directory}/classes</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacocoVersion}</version>
				<configuration>
					<includes>
						<include>org/openmrs/module/appointments/web/**</include>
					</includes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>check</id>
						<goals>
							<goal>report</goal>
							<goal>check</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/jacoco-reports</outputDirectory>
							<rules>
								<rule>
									<element>BUNDLE</element>
									<limits>
										<limit>
											<counter>LINE</counter>
											<value>COVEREDRATIO</value>
											<minimum>0.35</minimum>
										</limit>
										<limit>
											<counter>BRANCH</counter>
											<value>COVEREDRATIO</value>
											<minimum>0.35</minimum>
										</limit>
									</limits>
								</rule>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
