<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>

	<name>Fastnate Root</name>
	<description>The Fastnate root project</description>
	<url>http://api.fastnate.org/latest</url>

	<groupId>org.fastnate</groupId>
	<artifactId>fastnate-base</artifactId>
	<version>1.5.0</version>
	<packaging>pom</packaging>

	<organization>
		<name>fastnate.org</name>
		<url>http://fastnate.org</url>
	</organization>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Tobias Liefke</name>
			<email>liefke@fastnate.org</email>
			<url>https://github.com/liefke</url>
		</developer>
	</developers>

	<distributionManagement>
		<repository>
			<id>fastnate-download</id>
			<url>ftp://download.fastnate.org/repository</url>
		</repository>
		<site>
			<id>fastnate-api</id>
			<url>ftp://api.fastnate.org/latest</url>
		</site>
	</distributionManagement>

	<scm>
		<url>https://github.com/liefke/org.fastnate</url>
		<connection>scm:git:git://github.com/liefke/org.fastnate.git</connection>
		<developerConnection>scm:git:git@github.com:liefke/org.fastnate.git</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<issueManagement>
		<url>https://github.com/liefke/org.fastnate/issues</url>
		<system>GitHub</system>
	</issueManagement>

	<prerequisites>
		<maven>3.0.4</maven>
	</prerequisites>

	<modules>
		<module>fastnate-generator</module>
		<module>fastnate-data</module>
		<module>fastnate-csv</module>
		<module>fastnate-maven-plugin</module>
		<module>fastnate-maven-test</module>
		<module>fastnate-examples</module>
	</modules>

	<properties>
		<!-- Projectroot -->
		<fastnate.root>${basedir}</fastnate.root>

		<!-- Build specific properties -->
		<build.number>Local</build.number>
		<build.svnRevNumber>Unknown</build.svnRevNumber>
		<maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
		<build.timestamp>${maven.build.timestamp}</build.timestamp>
		<project.scm.id>git-server</project.scm.id>

		<!-- Default encoding -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- Versions -->
		<slf4j.version>1.7.7</slf4j.version>
		<hibernate.version>5.0.7.Final</hibernate.version>
		<hibernate.validator.version>5.2.3.Final</hibernate.validator.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>1.16.8</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.4</version>
			</dependency>
			<dependency>
				<groupId>commons-lang</groupId>
				<artifactId>commons-lang</artifactId>
				<version>2.6</version>
			</dependency>
			<dependency>
				<groupId>com.google.code.findbugs</groupId>
				<artifactId>jsr305</artifactId>
				<version>2.0.3</version>
			</dependency>
			<dependency>
				<groupId>javax.validation</groupId>
				<artifactId>validation-api</artifactId>
				<version>1.1.0.Final</version>
			</dependency>
			<dependency>
				<groupId>net.sf.supercsv</groupId>
				<artifactId>super-csv</artifactId>
				<version>2.4.0</version>
			</dependency>
			<!-- Reflections -->
			<dependency>
				<groupId>org.reflections</groupId>
				<artifactId>reflections</artifactId>
				<version>0.9.10</version>
				<exclusions>
					<exclusion>
						<groupId>dom4j</groupId>
						<artifactId>dom4j</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<!-- Injections for DataProvider -->
			<dependency>
			    <groupId>javax.inject</groupId>
			    <artifactId>javax.inject</artifactId>
			    <version>1</version>
			</dependency>

			<!-- This is just the JPA standalone API (without Hibernate) -->
			<dependency>
				<groupId>org.hibernate.javax.persistence</groupId>
				<artifactId>hibernate-jpa-2.1-api</artifactId>
				<version>1.0.0.Final</version>
			</dependency>

			<!-- Hibernate dependencies -->
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-core</artifactId>
				<version>${hibernate.version}</version>
			</dependency>

			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-entitymanager</artifactId>
				<version>${hibernate.version}</version>
			</dependency>

			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-validator</artifactId>
				<version>${hibernate.validator.version}</version>
			</dependency>

			<!-- Test dependencies -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
			</dependency>

			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-jdk14</artifactId>
				<version>${slf4j.version}</version>
			</dependency>

			<dependency>
				<groupId>javax.el</groupId>
				<artifactId>javax.el-api</artifactId>
				<version>2.2.5</version>
			</dependency>

			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>1.4.192</version>
			</dependency>

			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>3.4.1</version>
			</dependency>

			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-jpa</artifactId>
				<version>1.11.4.RELEASE</version>
			</dependency>
			
			<dependency>
				<groupId>org.liquibase</groupId>
				<artifactId>liquibase-core</artifactId>
				<version>3.8.9</version>
			</dependency>
			
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<!-- This plugin's configuration is used to store Eclipse m2e settings 
					 only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.projectlombok</groupId>
										<artifactId>lombok-maven-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>delombok</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<extensions>
			<!-- Enabling the use of FTP for deployment -->
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ftp</artifactId>
				<version>2.9</version>
			</extension>
		</extensions>
		<plugins>
			<!-- Define the default compiler settings. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.5.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>

			<!-- We are open source - attach the sources. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Define the default manifest entries -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifest-entries>
							<Implementation-Build>${build.number}</Implementation-Build>
							<Implementation-Revision>${build.svnRevNumber}</Implementation-Revision>
						</manifest-entries>
					</archive>
				</configuration>
			</plugin>

			<!-- Delombok for JavaDoc plugin -->
			<plugin>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok-maven-plugin</artifactId>
				<version>1.16.10.0</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>delombok</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<addOutputDirectory>false</addOutputDirectory>
					<sourceDirectory>src/main/java</sourceDirectory>
				</configuration>
			</plugin>

			<!-- Add Javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<executions>
					<execution>
						<id>make-javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<defaultVersion>${project.version}</defaultVersion>
					<sourcepath>target/generated-sources/delombok</sourcepath>
				</configuration>
			</plugin>

			<!-- Generate documentation for maven plugin(s). -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.4</version>
			</plugin>

			<!-- Enable release of Fastnate -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<!-- Generate Javadoc for site -->
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<defaultVersion>${project.version}</defaultVersion>
					<sourcepath>target/generated-sources/delombok</sourcepath>
					<show>private</show>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>3.1.1</version>
				<configuration>
					<configLocation>src/checkstyle/checkstyle.xml</configLocation>
					<propertyExpansion>config_loc=${fastnate.root}/src/checkstyle</propertyExpansion>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<!-- Sign everything -->
			<id>sign</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Release to OSSRH -->
		<profile>
			<id>ossrh-release</id>
			<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>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>

</project>