<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>
	<artifactId>guagua-mapreduce</artifactId>
	<parent>
		<groupId>ml.shifu</groupId>
		<artifactId>guagua</artifactId>
		<version>0.4.0</version>
		<relativePath>../</relativePath>
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
	</properties>

	<dependencies>
		<dependency>
			<groupId>ml.shifu</groupId>
			<artifactId>guagua-core</artifactId>
			<version>${guagua.version}</version>
		</dependency>
	</dependencies>

	<profiles>
		<!-- For hadoop 0.20.2 cloudera version -->
		<profile>
			<id>cdh-20</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<repositories>
				<repository>
					<id>Cloudera CDH</id>
					<url>https://repository.cloudera.com/artifactory/cloudera-repos</url>
				</repository>
			</repositories>
			<dependencies>
				<dependency>
					<groupId>org.apache.hadoop</groupId>
					<artifactId>hadoop-core</artifactId>
					<version>0.20.2-cdh3u5</version>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>2.4</version>
						<executions>
							<execution>
								<id>hadoop1</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<classifier>hadoop1</classifier>
								</configuration>
							</execution>
						</executions>
						<configuration>
							<archive>
								<index>true</index>
								<manifestEntries>
									<vendor>PayPal</vendor>
									<title>guagua-mapreduce</title>
									<version>${project.version}</version>
									<timestamp>${maven.build.timestamp}</timestamp>
								</manifestEntries>
							</archive>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- For HDP version 1.2.0.1.3.2.0-111 cluster -->
		<profile>
			<id>hdp-1</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<repositories>
				<repository>
					<id>HortonWorks HDP</id>
					<url>http://repo.hortonworks.com/nexus/content/repositories/releases</url>
				</repository>
			</repositories>
			<dependencies>
				<dependency>
					<groupId>org.apache.hadoop</groupId>
					<artifactId>hadoop-core</artifactId>
					<version>1.2.0.1.3.3.2-1</version>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>2.4</version>
						<executions>
							<execution>
								<id>hadoop1</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<classifier>hadoop1</classifier>
								</configuration>
							</execution>
						</executions>
						<configuration>
							<archive>
								<index>true</index>
								<manifestEntries>
									<vendor>PayPal</vendor>
									<title>guagua-mapreduce</title>
									<version>${project.version}</version>
									<timestamp>${maven.build.timestamp}</timestamp>
								</manifestEntries>
							</archive>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- For hadoop 2.2.0 yarn -->
		<profile>
			<id>hdp-yarn</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<repositories>
				<repository>
					<id>HortonWorks HDP</id>
					<url>http://repo.hortonworks.com/nexus/content/repositories/releases</url>
				</repository>
			</repositories>
			<dependencies>
				<dependency>
					<groupId>org.apache.hadoop</groupId>
					<artifactId>hadoop-hdfs</artifactId>
					<version>2.2.0</version>
				</dependency>
				<dependency>
					<groupId>org.apache.hadoop</groupId>
					<artifactId>hadoop-common</artifactId>
					<version>2.2.0</version>
				</dependency>
				<dependency>
					<groupId>org.apache.hadoop</groupId>
					<artifactId>hadoop-mapreduce-client-core</artifactId>
					<version>2.2.0</version>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>2.4</version>
						<executions>
							<execution>
								<id>hadoop2</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<classifier>hadoop2</classifier>
								</configuration>
							</execution>
						</executions>
						<configuration>
							<archive>
								<index>true</index>
								<manifestEntries>
									<vendor>PayPal</vendor>
									<title>guagua-mapreduce</title>
									<version>${project.version}</version>
									<timestamp>${maven.build.timestamp}</timestamp>
								</manifestEntries>
							</archive>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
