<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.0</maven>
	</prerequisites>

	<groupId>com.justdavis.karl.jessentials</groupId>
	<artifactId>jessentials-parent</artifactId>
	<version>5.0.0</version>
	<packaging>pom</packaging>

	<name>jessentials-parent</name>
	<description>
		A parent POM for this library collection, which helps to standardize 
		the plugins, libraries, and build settings used in the various modules.
	</description>
	<url>https://github.com/karlmdavis/jessentials</url>
	<organization>
		<name>Karl M. Davis</name>
	</organization>
	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>http://spdx.org/licenses/Apache-2.0</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>karlmdavis</id>
			<name>Karl M. Davis</name>
			<email>karl@justdavis.com</email>
			<url>https://justdavis.com/karl</url>
		</developer>
	</developers>

	<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/karlmdavis/jessentials/issues</url>
	</issueManagement>

	<ciManagement>
		<!-- TODO 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>https://justdavis.com/jenkins/job/jessentials/</url>
	</ciManagement>

	<distributionManagement>
		<!-- Deploy these open source projects to the public OSSRH repositories, 
			per http://central.sonatype.org/pages/apache-maven.html. This helps ensure 
			that the releases land in the Maven Central repos. -->
		<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>

	<scm>
		<!-- URL format taken from http://www.sonatype.com/people/2009/09/maven-tips-and-tricks-using-github/ -->
		<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-parent-5.0.0</tag>
	</scm>

	<repositories>
		<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>
		<repository>
			<id>justdavis.com-nexus-opensource-thirdparty-releases</id>
			<url>https://justdavis.com/nexus/content/repositories/opensource-thirdparty-releases/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>justdavis.com-nexus-opensource-thirdparty-snapshots</id>
			<url>https://justdavis.com/nexus/content/repositories/opensource-thirdparty-snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<properties>
		<!-- As specified in http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding, 
			this property is used by many different plugins to. -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>

		<!-- The version of Java that we'll use for everything. Please note that 
			this may be a problem with Android, as only the latest release has even partial 
			support for Java 7. -->
		<javaSourceVersion>1.7</javaSourceVersion>

		<!-- Configure Sonar such that projects evaluated by it against it will 
			use JaCoCo to compute the code coverage of any unit and integration tests. -->
		<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
		<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
		<sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>
		<sonar.jacoco.itReportPath>target/jacoco-it.exec</sonar.jacoco.itReportPath>

		<!-- The version of the slf4j libraries to be used. -->
		<dependency.slf4j.version>1.7.5</dependency.slf4j.version>

		<!-- The version of the Spring Framework libraries to be used. -->
		<dependency.springframework.version>3.2.3.RELEASE</dependency.springframework.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<!-- Provides a standard dependency injection API. -->
				<groupId>javax.inject</groupId>
				<artifactId>javax.inject</artifactId>
				<version>1</version>
			</dependency>

			<dependency>
				<!-- SLF4J is used to make the Java logging dependency mess somewhat 
					sane. Its APIs should be used by all of the application suite for logging, 
					rather than the java.util logging, log4j, or whatever else. -->
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${dependency.slf4j.version}</version>
			</dependency>
			<dependency>
				<!-- This library can be used to re-route java.util.logging calls to 
					whatever back-end is configured for slf4j. -->
				<!-- See http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html 
					for details on how to activate this re-routing within an application. -->
				<groupId>org.slf4j</groupId>
				<artifactId>jul-to-slf4j</artifactId>
				<version>${dependency.slf4j.version}</version>
			</dependency>
			<dependency>
				<!-- This dependency can be included rather than log4j itself. It implements 
					enough of that library's APIs to route usage of it to whatever back-end is 
					configured for slf4j. -->
				<groupId>org.slf4j</groupId>
				<artifactId>log4j-over-slf4j</artifactId>
				<version>${dependency.slf4j.version}</version>
			</dependency>
			<dependency>
				<!-- This dependency can be included rather than commons-logging itself. 
					It implements enough of that library's APIs to route usage of it to whatever 
					back-end is configured for slf4j. -->
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${dependency.slf4j.version}</version>
			</dependency>

			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.11</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<resources>
			<resource>
				<!-- Enable Maven's resource filtering for test files in 'src/main/resources/'. 
					This will replace properties in text files with their values, e.g. "${project.groupId}" 
					will be replaced with "com.justdavis.karl.jessentials". -->
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<!-- Enable Maven's resource filtering for test files in 'src/test/resources/'. 
					This will replace properties in text files with their values, e.g. "${project.groupId}" 
					will be replaced with "com.justdavis.karl.jessentials". -->
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
		</testResources>
		<pluginManagement>
			<plugins>
				<!-- It adds a lot of noise to this file, but we specify the version 
					of all plugins used in the module builds here to help ensure that the builds 
					are always reproducible. This is actually enforced down below by the maven-enforcer-plugin 
					execution. -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.2</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-resources-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.0</version>
					<configuration>
						<!-- Set the Java source version used by the compiler. -->
						<source>${javaSourceVersion}</source>
						<target>${javaSourceVersion}</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.16</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.16</version>
				</plugin>
				<plugin>
					<!-- A test code coverage plugin that can operate as a Java agent (and 
						thus doesn't require class file instrumentation). -->
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.7.5.201505241946</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.4</version>
					<configuration>
						<!-- Add some extra information to the JAR manifests. Helpful for folks 
							looking at a JAR, trying to figure out what it is. -->
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
								<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jarsigner-plugin</artifactId>
					<version>1.2</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.8</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.7</version>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.2</version>
				</plugin>
				<plugin>
					<!-- Necessary to ensure that release:perform works correctly, per http://stackoverflow.com/questions/5558785/maven-release-plugin-git-and-the-poms-not-at-the-top. -->
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.2</version>
					<executions>
						<execution>
							<id>default</id>
							<goals>
								<goal>perform</goal>
							</goals>
							<configuration>
								<pomFileName>${project.artifactId}/pom.xml</pomFileName>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<!-- Use the enforcer plugin to help ensure that builds are always 
							reproducible. -->
						<id>enforce-plugin-versions</id>
						<inherited>true</inherited>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requirePluginVersions>
									<message>Undefined plugin versions can lead to un-reproducible
										builds.</message>
									<banTimestamps>false</banTimestamps>
								</requirePluginVersions>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<executions>
					<execution>
						<!-- Ensure that all artifacts get signed prior to being deployed. 
							This is required for all artifacts heading to the Maven Central repo, but 
							is a good idea in general. -->
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!-- Specifying this plugin here replaces the default deploy plugin in 
					the lifecycle: this plugin will be used to deploy artifacts. This is great 
					for interacting with OSSRH and deploying to Maven Central. However, it can 
					be disabled in descendant projects by setting 'extensions' to false. -->
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<extensions>true</extensions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<!-- This profile will only be active for builds inside of Eclipse (managed 
				by m2e). It's primarily used to manage the execution of plugins in that environment. -->
			<id>m2e-manage-executions</id>
			<activation>
				<property>
					<name>m2e.version</name>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<!--This plugin's configuration is used to store Eclipse m2e settings 
								only. It has no influence on the Maven build itself. -->
							<groupId>org.eclipse.m2e</groupId>
							<artifactId>lifecycle-mapping</artifactId>
							<version>1.0.0</version>
							<configuration>
								<lifecycleMappingMetadata>
									<pluginExecutions>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>org.apache.maven.plugins</groupId>
												<artifactId>maven-enforcer-plugin</artifactId>
												<versionRange>[1.0.0,)</versionRange>
												<goals>
													<goal>enforce</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<!-- Don't run this plugin inside m2e; necessary to disable a 
													POM warning in Eclipse. -->
												<ignore />
											</action>
										</pluginExecution>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>org.jacoco</groupId>
												<artifactId>
													jacoco-maven-plugin
												</artifactId>
												<versionRange>
													[0.6.5.201403032054,)
												</versionRange>
												<goals>
													<goal>prepare-agent</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<!-- Don't run this plugin inside m2e; necessary to disable a 
													POM warning in Eclipse. -->
												<ignore />
											</action>
										</pluginExecution>
									</pluginExecutions>
								</lifecycleMappingMetadata>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
	</profiles>

</project>
