<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.giraph</groupId>
    <artifactId>giraph-parent</artifactId>
    <version>1.2.0</version>
  </parent>
  <artifactId>giraph-examples</artifactId>
  <packaging>jar</packaging>

  <name>Apache Giraph Examples</name>
  <url>http://giraph.apache.org/giraph-examples/</url>
  <description>Giraph examples (for learning and testing)</description>

  <properties>
    <export-target.dir>export/target</export-target.dir>
    <top.dir>${project.basedir}/..</top.dir>
  </properties>

  <build>
    <finalName>giraph-examples-${project.version}-${forHadoop}</finalName>    
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>      
      </plugin>      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <siteDirectory>${project.basedir}/src/site</siteDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <systemProperties>
            <property>
              <name>prop.jarLocation</name>
              <value>${project.basedir}/target/giraph-examples-${project.version}-${forHadoop}-jar-with-dependencies.jar</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>hadoop_0.20.203</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>munge-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_1</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>munge-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_non_secure</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>munge-maven-plugin</artifactId>
            <configuration>
              <excludes>
                **/comm/netty/SaslNettyClient.java,
                **/comm/netty/SaslNettyServer.java,
                **/comm/netty/handler/AuthorizeServerHandler.java,
                **/comm/netty/handler/SaslClientHandler.java,
                **/comm/netty/handler/SaslServerHandler.java,
                **/comm/requests/SaslCompleteRequest.java,
                **/comm/requests/SaslTokenMessageRequest.java,
                **/comm/SaslConnectionTest.java
              </excludes> 
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_facebook</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>munge-maven-plugin</artifactId>
            <configuration>
              <excludes>
                **/comm/netty/SaslNettyClient.java,
                **/comm/netty/SaslNettyServer.java,
                **/comm/netty/handler/AuthorizeServerHandler.java,
                **/comm/netty/handler/SaslClientHandler.java,
                **/comm/netty/handler/SaslServerHandler.java,
                **/comm/requests/SaslCompleteRequest.java,
                **/comm/requests/SaslTokenMessageRequest.java,
                **/comm/SaslConnectionTest.java
              </excludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_0.23</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>munge-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Currently supports hadoop-2.0.2-alpha
      (see hadoop_yarn profile in giraph-parent POM to change) -->
    <profile>
      <id>hadoop_yarn</id>
      <build>
        <plugins>
          <plugin>
              <groupId>org.sonatype.plugins</groupId>
              <artifactId>munge-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- The profiles below do not (yet) include any munge flags -->
    <profile>
      <id>hadoop_2</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_2.0.0</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_2.0.1</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_2.0.2</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_2.0.3</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hadoop_trunk</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/yarn/**</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/yarn/**</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <!-- compile dependencies. sorted lexicographically. -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>
    <dependency>
    	<groupId>it.unimi.dsi</groupId>
    	<artifactId>fastutil</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.zookeeper</groupId>
      <artifactId>zookeeper</artifactId>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.giraph</groupId>
      <artifactId>giraph-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.giraph</groupId>
      <artifactId>giraph-core</artifactId>
      <version>1.2.0</version>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.giraph</groupId>
      <artifactId>giraph-block-app</artifactId>
    </dependency>

    <!-- runtime dependency -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>runtime</scope>
    </dependency>

    <!-- test dependencies. sorted lexicographically. -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
 </dependencies>
</project>
