<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>com.justdavis.karl.jessentials</groupId>
		<artifactId>jessentials-parent</artifactId>
		<version>6.0.0</version>
		<!-- Disabling filesystem resolution, per http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_parent. -->
		<relativePath />
	</parent>

	<artifactId>jessentials-misc</artifactId>
	<version>4.0.1</version>
	<packaging>jar</packaging>

	<name>jEssentials Miscellanany</name>
	<description>
		Miscellaneous utility types.
	</description>

	<scm>
		<!-- URL format taken from http://www.sonatype.com/people/2009/09/maven-tips-and-tricks-using-github/ -->
		<!-- Needs to be repeated here, due to the flat module layout being used. -->
		<connection>scm:git:git@github.com:karlmdavis/jessentials.git</connection>
		<developerConnection>scm:git:git@github.com:karlmdavis/jessentials.git</developerConnection>
		<url>https://github.com/karlmdavis/jessentials</url>
		<tag>jessentials-misc-4.0.1</tag>
	</scm>

	<repositories>
		<!-- Because we're using a flat, non-standard module layout the repositories 
			have to be included here as well. -->
		<repository>
			<id>ossrh-snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<!-- SLF4J is really the only way to make the Java logging dependency 
				mess somewhat sane. Its APIs should be used by everything for logging, rather 
				than the java.util logging, log4j, or whatever else. -->
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<!-- Used to re-route java.util.logging calls to SLF4J. Included here 
				because SLF4J is, and these two should almost always be used together. -->
			<!-- See http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html 
				for details on how to activate this re-routing within an application. See 
				JulLoggingToSlf4jBinder for details on how to activate it within JUnit tests. -->
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
		</dependency>

		<dependency>
			<!-- Provides annotations that specify dependency injection points. -->
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
		</dependency>
		<dependency>
			<!-- A dependency injection provider. The only thing used from here are 
				the Spring annotations, to enable classpath scanning for other projects that 
				use Spring. It's set as an optional dependency. -->
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${dependency.springframework.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<!-- An in-memory embedded SQL DB. Often used just for unit/integration 
				tests, due to its speed and easy setup. -->
			<!-- This dependency is marked optional. It's only needed if the com.justdavis.karl.misc.datasources.hsql 
				API is being used. -->
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>2.4.0</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<!-- JDBC drivers for the PostgreSQL open source RDBMS. This version supports 
				Java 8 and above and PostgreSQL 8.2 and above. -->
			<!-- This dependency is marked optional. It's only needed if the com.justdavis.karl.misc.datasources.postgresql 
				API is being used. -->
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>42.1.4</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<!-- Provides a database schema population/upgrade mechanism. See the 
				com.justdavis.karl.misc.datasources.schema package. -->
			<groupId>org.liquibase</groupId>
			<artifactId>liquibase-core</artifactId>
			<version>3.5.3</version>
		</dependency>
		<dependency>
			<!-- Liquibase uses it's own pluggable logging framework. This dependency 
				re-routes the logging events in it to SLF4J. -->
			<groupId>com.mattbertolini</groupId>
			<artifactId>liquibase-slf4j</artifactId>
			<version>2.0.0</version>
		</dependency>

		<dependency>
			<!-- Marked as 'compile' scope due to its use in JulLoggingToSlf4jBinder. 
				Marked as optional, as only code using that particular class will depend 
				on JUnit. -->
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>compile</scope>
			<optional>true</optional>
		</dependency>
		<dependency>
			<!-- Logback is used as the logging target/backend for SLF4J in tests: 
				all logging events will be sent to it. -->
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<!-- Jetty is an embedded web server that can be used to test applications. -->
			<!-- This dependency is marked optional. It is only needed if the com.justdavis.karl.misc.jetty.EmbeddedServer 
				class is being used. -->
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-webapp</artifactId>
			<version>9.2.11.v20150529</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<!-- This is required for how we're using Jetty. -->
			<!-- This dependency is marked optional. It is only needed if the com.justdavis.karl.misc.jetty.EmbeddedServer 
				class is being used. -->
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-annotations</artifactId>
			<version>9.2.11.v20150529</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<!-- Used to generate the SSL cert that is used by Jetty. -->
			<!-- This dependency is marked optional. It is only needed if the com.justdavis.karl.misc.jetty.EmbeddedServer 
				class is being used. -->
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcpkix-jdk15on</artifactId>
			<version>1.49</version>
			<optional>true</optional>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<!-- Will set the 'argline' Maven property to point to the JaCoCo runtime 
							agent (configured to track information on unit test coverage), such that 
							it can be passed as a VM argument to the application under test. Surefire 
							will pick up this property automatically, by default. Sonar can then pick 
							up the output produced by JaCoCo. -->
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<!-- Will set the 'argline' Maven property to point to the JaCoCo runtime 
							agent (configured to track information on integration test coverage), such 
							that it can be passed as a VM argument to the application under test. Failsafe 
							will pick up this property automatically, by default. Sonar can then pick 
							up the output produced by JaCoCo. -->
						<id>default-prepare-agent-integration</id>
						<goals>
							<goal>prepare-agent-integration</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!-- Ensure that this project's integration tests are run as part of 
					the build. -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
