首先从flume官网去下载源码
http://flume.apache.org/download.html
下载完之后,解压,首先去除源码中hdfs和hadoop的test依赖
apache-flume-1.5.2-src\flume-ng-sinks\flume-hdfs-sink\pom.xml
<!--dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase</artifactId> <classifier>tests</classifier> <scope>test</scope> </dependency>-->apache-flume-1.5.2-src\flume-ng-sinks\flume-ng-hbase-sink\pom.xml
<!--<dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-test</artifactId> <scope>test</scope> </dependency>-->
<repository> <id>p2.jfrog.org</id> <url>http://p2.jfrog.org/libs-releases</url> </repository>
至此,修改的部分已经完成了,下面就是编译了
mvn clean install -Dmaven.test.skip
最后到flume-ng-dist的target目录下看你的编译成果吧
祝您编译成功!!
原文地址:http://blog.csdn.net/simonchi/article/details/42919393