<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>

	<prerequisites>
		<maven>3.3</maven>
	</prerequisites>

	<parent>
		<groupId>gov.hhs.cms.bluebutton</groupId>
		<artifactId>bluebutton-parent</artifactId>
		<version>1.1.0</version>
	</parent>

	<groupId>gov.hhs.cms.bluebutton.fhir</groupId>
	<artifactId>bluebutton-server-parent</artifactId>
	<version>0.1.0-2</version>
	<packaging>pom</packaging>

	<name>bluebutton-server-parent</name>
	<description>
		The CMS Blue Button API project provides Medicare beneficiaries with access
        to their health care data, and supports an ecosystem of third-party 
        applications that can leverage that data. This is the parent POM for 
        the project.
	</description>
	<url>https://github.com/HHSIDEAlab/bluebutton-server</url>

	<issueManagement>
		<!-- There doesn't seem to be any tooling support for this yet, but it 
			doesn't hurt to include it. -->
		<system>GitHub Issues</system>
		<url>https://github.com/HHSIDEAlab/bluebutton-server/issues</url>
	</issueManagement>

	<ciManagement>
		<!-- Per http://stackoverflow.com/questions/14754372/whats-the-purpose-of-the-maven-3-cimanagement-configuration#comment20752353_14762245, 
			Sonar (at least) can use this information. -->
		<system>jenkins</system>
		<url>http://builds.hhsdevcloud.us/job/HHSIDEAlab/job/bluebutton-server/</url>
	</ciManagement>

	<scm>
		<!-- URL format taken from http://www.sonatype.com/people/2009/09/maven-tips-and-tricks-using-github/ -->
		<connection>scm:git:git@github.com:HHSIDEAlab/bluebutton-server.git</connection>
		<developerConnection>scm:git:git@github.com:HHSIDEAlab/bluebutton-server.git</developerConnection>
		<url>https://github.com/HHSIDEAlab/bluebutton-server</url>
		<tag>HEAD</tag>
	</scm>

	<modules>
		<module>bluebutton-server-app</module>
	</modules>

	<properties>
		<!-- Configure the Blue Button FHIR Server, as it will be run via the exec 
			plugin. These settings are pulled out as POM properties so that they can 
			be adjusted via profiles. This is required because the CI server doesn't 
			have enough RAM to run with an in-mem DB, and so requires a different configuration. -->
		<its.bbfhir.server.jvmargs>-Xmx4g</its.bbfhir.server.jvmargs>
		<its.bbfhir.db.url>jdbc:hsqldb:mem:test</its.bbfhir.db.url>
		<its.bbfhir.db.username></its.bbfhir.db.username>
		<its.bbfhir.db.password></its.bbfhir.db.password>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<!-- Used as a logging backed/target for SLF4J. -->
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>1.1.3</version>
			</dependency>

			<dependency>
				<!-- The test framework used for unit and integration tests. -->
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-scm-plugin</artifactId>
					<configuration>
						<!-- This default config is used in the Jenkinsfile CI build. -->
						<tag>${project.artifactId}-${project.version}</tag>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<!-- When activated via '-Prun-its-with-db-on-disk' this profile sets 
				the ITs to run with an on-disk DB, instead of an in-memory one. This needs 
				to be activated when running on systems without a lot of memory (such as 
				the CI server). -->
			<!-- Note: As of 2016-07-23, the CI server for this project only has 4 
				GB of memory, and no swap space. -->
			<id>run-its-with-db-on-disk</id>
			<properties>
				<its.bbfhir.server.jvmargs>-Xmx1g</its.bbfhir.server.jvmargs>
				<its.bbfhir.db.url>jdbc:hsqldb:file:target/hsql-db-for-its</its.bbfhir.db.url>
				<its.bbfhir.db.username></its.bbfhir.db.username>
				<its.bbfhir.db.password></its.bbfhir.db.password>
			</properties>
		</profile>
	</profiles>

</project>
