<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>ua_parser</groupId>
  <artifactId>ua-parser-pig</artifactId>
  <version>0.1-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>PIG UDFs for ua_parser</name>
  <url>https://github.com/tobie/ua-parser</url>

  <properties>
    <jdkLevel>1.6</jdkLevel>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.outputEncoding>UTF-8</project.build.outputEncoding>

    <!-- These are specific for CDH 4.2.0 and this must be part of a profile/classifier setup. -->
    <hadoop.releases.repo>https://repository.cloudera.com/artifactory/cloudera-repos/</hadoop.releases.repo>
    <hadoop.version>2.0.0-cdh4.2.0</hadoop.version>
    <pig.version>0.10.0-cdh4.2.0</pig.version>
  </properties>

  <repositories>
    <repository>
      <id>Default</id>
      <name>Default maven2 repository</name>
      <url>http://repo1.maven.org/maven2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>

    <repository>
      <id>Hadoop releases</id>
      <url>${hadoop.releases.repo}</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>

  </repositories>

  <dependencies>
    <dependency>
      <groupId>ua_parser</groupId>
      <artifactId>ua-parser</artifactId>
      <version>1.3.0-SNAPSHOT</version>

    </dependency>

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

    <dependency>
      <groupId>org.apache.pig</groupId>
      <artifactId>pig</artifactId>
      <version>${pig.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>${hadoop.version}</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>make-super-jar</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/job.xml</descriptor>
              </descriptors>
              <archive>
                <addMavenDescriptor>true</addMavenDescriptor>
                <manifestEntries>
                  <Class-Path>/</Class-Path>
                </manifestEntries>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <developers>
    <developer>
      <name>Niels Basjes</name>
      <email>niels@basjes.nl</email>
      <url>niels.basjes.nl</url>
      <timezone>Europe/Amsterdam</timezone>
    </developer>
  </developers>

</project>
