<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>cc.kave</groupId>
	<artifactId>cc.kave.root</artifactId>
	<version>0.0.3</version>
	
	<packaging>pom</packaging>

	<!-- required meta data for Maven central -->
	<name>${project.groupId}:root</name>
	<description>This base module defines several useful defaults for submodules.</description>
	<url>http://kave.cc/</url>
	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Sebastian Proksch</name>
			<email>development@mail.proks.ch</email>
			<organization>KaVE Project</organization>
			<organizationUrl>http://kave.cc/</organizationUrl>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git://github.com/kave-cc/java-cc-kave.git</connection>
		<developerConnection>scm:git:ssh://github.com/kave-cc/java-cc-kave.git</developerConnection>
		<url>http://github.com/kave-cc/java-cc-kave/tree/master</url>
	</scm>

	<!-- sub modules-->
	<modules>
		<module>cc.kave.commons</module>
		<module>cc.kave.testcommons</module>
		<!--
		<module>cc.kave.caret</module>
		-->
		<module>cc.kave.rsse.calls</module>
	</modules>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.6.1</version>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals><goal>jar</goal></goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.4</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals><goal>jar</goal></goals>
					</execution>
				</executions>
			</plugin>

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

	<!--
		We use two profiles for the build that differ in the deployment:
		* "testing" (default): for local deployment
		* "production": for deployment in the ossrh repository
	-->
	<profiles>
		<!-- deployment into a local folder, existence of a specific property in settings.xml will be checked -->
		<profile>
			<id>testing</id>
			<activation><activeByDefault>true</activeByDefault></activation>

			<distributionManagement>
				<snapshotRepository>
					<id>repo_testing_snapshots</id>
					<url>file://${repository.local.cc.kave}/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>repo_testing_releases</id>
					<url>file://${repository.local.cc.kave}/releases</url>
				</repository>
			</distributionManagement>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<version>1.4.1</version>
						<executions>
							<execution>
								<id>enforce-property</id>
								<goals><goal>enforce</goal></goals>
								<configuration>
									<rules>
										<requireProperty>
											<property>repository.local.cc.kave</property>
											<message>Add the property "repository.local.cc.kave" to your "~/.m2/settings.xml" and specify a folder for local deployment.</message>
										</requireProperty>
									</rules>
									<fail>true</fail>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- deployment into the ossrh repository using the official nexus pluign -->
		<profile>
			<id>production</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>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<!--
		common dependencies that are universally used across our code base
	-->
	<dependencies>
		<!-- implementation -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.3.1</version>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>18.0</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>3.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.0</version>
		</dependency>
		<dependency>
			<groupId>com.google.inject</groupId>
			<artifactId>guice</artifactId>
			<version>3.0</version>
		</dependency>

		<!-- testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.9.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>pl.pragmatists</groupId>
			<artifactId>JUnitParams</artifactId>
			<version>1.0.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>
