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

	<groupId>de.galan</groupId>
	<artifactId>parent</artifactId>
	<version>0.9.1</version>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>Maven parent pom for all ${project.groupId} components</description>
	<url>https://github.com/galan/maven-parent</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<jdk.compiler.version>1.8</jdk.compiler.version>

		<library.junit.version>4.12</library.junit.version>
		<library.assertj.version>3.1.0</library.assertj.version>

		<library.log4j2.version>2.3</library.log4j2.version>
		<library.slf4j.version>1.7.12</library.slf4j.version>

		<library.commons-lang3.version>3.4</library.commons-lang3.version>
		<library.commons-io.version>2.4</library.commons-io.version>
		<library.commons-codec.version>1.10</library.commons-codec.version>
		<library.commons-collections4.version>4.0</library.commons-collections4.version>
		<library.guava.version>18.0</library.guava.version>
		<library.guice.version>4.0</library.guice.version>

		<plugin.checkstyle.version>2.15</plugin.checkstyle.version>
		<plugin.maven-compiler.version>3.3</plugin.maven-compiler.version>
		<plugin.maven-war.version>2.6</plugin.maven-war.version>
		<plugin.maven-resources.version>2.7</plugin.maven-resources.version>
		<plugin.maven-source.version>2.4</plugin.maven-source.version>
		<plugin.maven-javadoc.version>2.10.3</plugin.maven-javadoc.version>
		<plugin.maven-jar.version>2.6</plugin.maven-jar.version>
		<plugin.maven-surefire.version>2.18.1</plugin.maven-surefire.version>
		<plugin.maven-failsafe.version>2.18.1</plugin.maven-failsafe.version>
		<plugin.maven-deploy.version>2.8.2</plugin.maven-deploy.version>
		<plugin.maven-gpg.version>1.6</plugin.maven-gpg.version>
		<plugin.maven-release.version>2.5.2</plugin.maven-release.version>
		<plugin.nexus-staging.version>1.6.5</plugin.nexus-staging.version>
	</properties>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<prerequisites>
		<maven>3.1.1</maven>
	</prerequisites>

	<scm>
		<connection>scm:git:ssh://github.com/galan/maven-parent.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/galan/maven-parent.git</developerConnection>
		<url>https://github.com/galan/maven-parent</url>
		<tag>v0.9.1</tag>
	</scm>

	<issueManagement>
		<system>github</system>
		<url>${project.scm.url}/issues</url>
	</issueManagement>

	<developers>
		<developer>
			<id>galan</id>
			<url>http://www.galan.de</url>
			<name>Daniel Galán y Martins</name>
			<email>maven -at(@)- galan -dot(.)- de</email>
			<roles>
				<role>Owner</role>
				<role>Developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>

	<dependencies>
		<!-- Logging -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
		</dependency>
	
		<!-- Unit testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<!-- Unit testing -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${library.junit.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${library.assertj.version}</version>
				<scope>test</scope>
			</dependency>

			<!-- Logging -->
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-api</artifactId>
				<version>${library.log4j2.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-core</artifactId>
				<version>${library.log4j2.version}</version>
			</dependency>

			<!-- logging bindings:slf4j -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${library.slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-slf4j-impl</artifactId>
				<version>${library.log4j2.version}</version>
			</dependency>
			<!-- logging bindings:jul -->
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-jul</artifactId>
				<version>${library.log4j2.version}</version>
			</dependency>
			<!-- logging bindings:jcl -->
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-jcl</artifactId>
				<version>${library.log4j2.version}</version>
			</dependency>
			<!-- logging bindings:log4j-1.x -->
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-1.2-api</artifactId>
				<version>${library.log4j2.version}</version>
			</dependency>

			<!-- Various utility libraries -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>${library.commons-lang3.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${library.commons-io.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>${library.commons-codec.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-collections4</artifactId>
				<version>${library.commons-collections4.version}</version>
			</dependency>

			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${library.guava.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.inject</groupId>
				<artifactId>guice</artifactId>
				<version>${library.guice.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${plugin.maven-compiler.version}</version>
				<configuration>
					<source>${jdk.compiler.version}</source>
					<target>${jdk.compiler.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>${plugin.maven-resources.version}</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${plugin.maven-jar.version}</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${plugin.maven-surefire.version}</version>
				<configuration>
					<excludes>
						<exclude>de/galan/**/*IT</exclude>
						<exclude>de/galan/**/excluded/**/*</exclude>
					</excludes>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${plugin.checkstyle.version}</version>
				<configuration>
					<configLocation>.settings/checkstyle.xml</configLocation>
					<failsOnError>true</failsOnError>
				</configuration>
			</plugin>

			<plugin>
				<!-- required to bundle source files in deployment -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${plugin.maven-source.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<!-- required to bundle javadoc files in deployment -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${plugin.maven-javadoc.version}</version>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${plugin.maven-deploy.version}</version>
				<configuration>
					<!-- Adds a <release> tag to the maven-metadata, so we can know which is the latest deployed version -->
					<updateReleaseInfo>true</updateReleaseInfo>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${plugin.maven-gpg.version}</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${plugin.maven-release.version}</version>
				<configuration>
					<tagNameFormat>v@{project.version}</tagNameFormat>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${plugin.nexus-staging.version}</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>sonatype-nexus-staging</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>${plugin.maven-war.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${plugin.checkstyle.version}</version>
				<configuration>
					<configLocation>.settings/checkstyle.xml</configLocation>
					<failsOnError>true</failsOnError>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<!--
	<repositories>
		<repository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>
	-->

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>integration</id>
			<!-- Using this profile will disable surefire unit tests and enable the failsafe integration tests -->
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>${plugin.maven-surefire.version}</version>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>${plugin.maven-failsafe.version}</version>
						<executions>
							<execution>
								<id>integration-test</id>
								<goals>
									<goal>integration-test</goal>
								</goals>
							</execution>
							<execution>
								<id>integration-test-verify</id>
								<goals>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
