<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
	license agreements. See the NOTICE file distributed with this work for additional 
	information regarding copyright ownership. The ASF licenses this file to 
	You under the Apache License, Version 2.0 (the "License"); you may not use 
	this file except in compliance with the License. You may obtain a copy of 
	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
	by applicable law or agreed to in writing, software distributed under the 
	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
	OF ANY KIND, either express or implied. See the License for the specific 
	language governing permissions and limitations under the License. -->
<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>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>
	<groupId>io.fares.junit.mongodb</groupId>
	<artifactId>mongodb-junit-test</artifactId>
	<version>1.0.0</version>
	<packaging>jar</packaging>
	<name>MongoDB JUnit Test</name>
	<description>This utility will bootstrap a mongo database during unit testing.</description>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Niels Bertram</name>
			<email>niels.bertram@fares.io</email>
			<url>https://plus.google.com/+NielsBertram</url>
			<organization>fares.io</organization>
			<organizationUrl>http://fares.io/</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/bertramn/mongodb-junit-test.git</connection>
		<developerConnection>scm:git:https://github.com/bertramn/mongodb-junit-test.git</developerConnection>
		<url>https://github.com/bertramn/mongodb-junit-test.git</url>
		<tag>mongodb-junit-test-1.0.0</tag>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<properties>
		<mongo.driver.version>[2.12,3.1)</mongo.driver.version>
		<flapdoodle.process.version>1.41.1</flapdoodle.process.version>
		<flapdoodle.mongo.version>1.48.0</flapdoodle.mongo.version>
		<jna.version>4.0.0</jna.version>
		<junit.version>4.11</junit.version>
		<mockito.version>1.10.19</mockito.version>
		<slf4j.version>1.7.2</slf4j.version>
	</properties>

	<dependencies>
		<!-- common stuff -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<!-- mongo deps -->
		<dependency>
			<groupId>org.mongodb</groupId>
			<artifactId>mongo-java-driver</artifactId>
		</dependency>
		<dependency>
			<groupId>de.flapdoodle.embed</groupId>
			<artifactId>de.flapdoodle.embed.mongo</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>compile</scope>
		</dependency>
		<!-- testing -->
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.5</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>sonatype-nexus-snapshots</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>
				<!-- compiler plugin with JAXB and JAXWS endorsed APIs -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
					<configuration>
						<source>${maven.compile.source}</source>
						<target>${maven.compile.target}</target>
						<!-- compiler debug -->
						<debug>true</debug>
						<debuglevel>lines,vars,source</debuglevel>
						<optimize>true</optimize>
					</configuration>
				</plugin>
				<!-- test execution -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.17</version>
					<configuration>
						<forkCount>1</forkCount>
						<reuseForks>false</reuseForks>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.6</version>
					<configuration>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>
				<plugin>
					<!-- need to package a few class files to be registered with the pax 
						exam container for unit testing -->
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.1</version>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<useReleaseProfile>false</useReleaseProfile>
						<releaseProfiles>release</releaseProfiles>
						<goals>deploy</goals>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<dependencyManagement>
		<dependencies>
			<!-- mongodb -->
			<dependency>
				<groupId>org.mongodb</groupId>
				<artifactId>bson</artifactId>
				<version>${mongo.driver.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mongodb</groupId>
				<artifactId>mongo-java-driver</artifactId>
				<version>${mongo.driver.version}</version>
			</dependency>
			<!-- embedded mongodb process testing utility -->
			<dependency>
				<groupId>de.flapdoodle.embed</groupId>
				<artifactId>de.flapdoodle.embed.mongo</artifactId>
				<version>${flapdoodle.mongo.version}</version>
			</dependency>
			<dependency>
				<groupId>de.flapdoodle.embed</groupId>
				<artifactId>de.flapdoodle.embed.process</artifactId>
				<version>${flapdoodle.process.version}</version>
			</dependency>
			<dependency>
				<groupId>net.java.dev.jna</groupId>
				<artifactId>jna</artifactId>
				<version>${jna.version}</version>
			</dependency>
			<dependency>
				<groupId>net.java.dev.jna</groupId>
				<artifactId>jna-platform</artifactId>
				<version>${jna.version}</version>
			</dependency>
			<!-- testing -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-all</artifactId>
				<version>${mockito.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jul-to-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-simple</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<profiles>
		<profile>
			<id>jdk-1.5</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<jdk>1.5</jdk>
			</activation>
			<properties>
				<!-- Default configuration for compiler source and target JVM -->
				<maven.compile.source>1.5</maven.compile.source>
				<maven.compile.target>1.5</maven.compile.target>
			</properties>
		</profile>
		<profile>
			<id>jdk-1.6</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<jdk>1.6</jdk>
			</activation>
			<properties>
				<!-- Default configuration for compiler source and target JVM -->
				<maven.compile.source>1.6</maven.compile.source>
				<maven.compile.target>1.6</maven.compile.target>
			</properties>
		</profile>
		<profile>
			<id>jdk-7</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<jdk>1.7</jdk>
			</activation>
			<properties>
				<!-- Default configuration for compiler source and target JVM -->
				<maven.compile.source>1.7</maven.compile.source>
				<maven.compile.target>1.7</maven.compile.target>
			</properties>
		</profile>
		<profile>
			<id>jdk-8</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<jdk>1.8</jdk>
			</activation>
			<properties>
				<!-- Default configuration for compiler source and target JVM -->
				<maven.compile.source>1.8</maven.compile.source>
				<maven.compile.target>1.8</maven.compile.target>
			</properties>
		</profile>
	</profiles>

</project>