<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>

  <parent>
    <artifactId>flume</artifactId>
    <groupId>com.cloudera</groupId>
    <version>0.9.4-cdh3u3</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <name>Flume Core</name>
  <artifactId>flume-core</artifactId>

  <properties>
    <build.revision>NOT AVAILABLE</build.revision>
  </properties>
  <build>
    <plugins>

      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr3-maven-plugin</artifactId>
        <version>3.2</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>antlr</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>stringtemplate</artifactId>
            <version>3.2</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>generate-version-file</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <copy
                  todir="${project.build.directory}/generated-sources/version/com/cloudera/flume"
                  overwrite="true">
                  <fileset dir="${basedir}/src/main/version" />
                  <filterset begintoken="%" endtoken="%">
                    <filter token="VERSION" value="${project.version}" />
                    <filter token="REV" value="${build.revision}" />
                    <filter token="USER" value="${user.name}" />
                    <filter token="DATE" value="${maven.build.timestamp}" />
                    <filter token="URL" value="${project.scm.url}" />
                  </filterset>
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>add-version-file</id>
            <phase>process-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/version</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-maven-plugin</artifactId>
        <version>1.5.4</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>idl-protocol</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.thoughtworks.paranamer</groupId>
        <artifactId>paranamer-maven-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <id>run</id>
            <configuration>
              <sourceDirectory>${project.build.directory}/generated-sources/avro</sourceDirectory>
              <outputDirectory>${project.build.directory}/classes</outputDirectory>
            </configuration>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.thrift.tools</groupId>
        <artifactId>maven-thrift-plugin</artifactId>
        <version>0.1.10</version>
        <configuration>
          <thriftExecutable>${thrift.executable}</thriftExecutable>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>


      </plugin>

     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-jar-plugin</artifactId>
       <version>2.2</version>
       <executions>
         <execution>
           <goals>
             <goal>test-jar</goal>
           </goals>
         </execution>
       </executions>
     </plugin>

    </plugins>
  </build>

  <dependencies>

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

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>findbugs</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>net.sourceforge.cobertura</groupId>
      <artifactId>cobertura</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Dependencies: compile -->

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>

    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr</artifactId>
    </dependency>

    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr-runtime</artifactId>
    </dependency>

    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>stringtemplate</artifactId>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>

    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-server</artifactId>
    </dependency>

    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-json</artifactId>
    </dependency>

    <!-- FIXME: Using a Cloudera-packaged version of thrift 0.4.0 because 
      it can't be found in a public repo. -esammer -->
    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libthrift</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro-compiler</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro-ipc</artifactId>
    </dependency>

    <!-- FIXME: This should be removed when we migrate the IRC source / sink 
      to an external plugin rather than being part of the main tree. -esammer -->
    <dependency>
      <groupId>org.schwering.irc</groupId>
      <artifactId>irclib</artifactId>
    </dependency>

    <!-- FIXME: Is this used? Can't find references to it except in tests. 
      -esammer -->
    <dependency>
      <groupId>dk.brics.automaton</groupId>
      <artifactId>automaton</artifactId>
    </dependency>

    <!-- Dependencies: compile - CDH components -->

    <dependency>
      <groupId>org.apache.zookeeper</groupId>
      <artifactId>zookeeper</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.arabidopsis.ahocorasick</groupId>
      <artifactId>ahocorasick</artifactId>
    </dependency>

  </dependencies>

</project>
