Maven - 无法执行目标

时间:2014-03-18 03:14:50

标签: java maven slf4j flume

我尝试从此来源https://github.com/mpercy/flume-load-gen构建maven包。
但是,当我使用mvn clean package构建它时,我得到这样的错误:

[ERROR] /home/vincentius/Documents/flume-load-gen-master/src/main/java/org/apache/flume/tcphammer/Hammer.java:[67,12] error: no suitable method found for info(String,String,int)
[ERROR] 
[ERROR] method Logger.info(Marker,String,Throwable) is not applicable
[ERROR] (actual argument String cannot be converted to Marker by method invocation conversion)
[ERROR] method Logger.info(Marker,String,Object[]) is not applicable
[ERROR] (actual argument String cannot be converted to Marker by method invocation conversion)
[ERROR] method Logger.info(Marker,String,Object,Object) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Logger.info(Marker,String,Object) is not applicable
[ERROR] (actual argument String cannot be converted to Marker by method invocation conversion)
[ERROR] method Logger.info(Marker,String) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Logger.info(String,Throwable) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Logger.info(String,Object[]) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Logger.info(String,Object,Object) is not applicable
[ERROR] (actual argument int cannot be converted to Object by method invocation conversion)
[ERROR] method Logger.info(String,Object) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Logger.info(String) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] /home/vincentius/Documents/flume-load-gen-master/src/main/java/org/apache/flume/tcphammer/Hammer.java:[137,25] error: incompatible types
[ERROR] 
[ERROR] could not parse error message:   required: Object
[ERROR] found:    long
[ERROR] /home/vincentius/Documents/flume-load-gen-master/src/main/java/org/apache/flume/tcphammer/Hammer.java:138: error: incompatible types
[ERROR] curLogIntervalNanosSlept / 1000000,
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   required: Object
[ERROR] found:    long
[ERROR] /home/vincentius/Documents/flume-load-gen-master/src/main/java/org/apache/flume/tcphammer/Hammer.java:139: error: cannot find symbol
[ERROR] String.format("%.2f", (100 * (double) curLogIntervalNanosSlept / (double) logDelta)),
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   method format(String,double)
[ERROR] location: class String
[ERROR] /home/vincentius/Documents/flume-load-gen-master/src/main/java/org/apache/flume/tcphammer/Hammer.java:140: error: incompatible types
[ERROR] curLogIntervalEventsSent,
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   required: Object
[ERROR] found:    long
[ERROR] /home/vincentius/Documents/flume-load-gen-master/src/main/java/org/apache/flume/tcphammer/Hammer.java:141: error: cannot find symbol
[ERROR] String.format("%.2f", (double) curLogIntervalEventsSent / ((double) logDelta / 1000000000D)),
[ERROR] ^
[ERROR] 
[ERROR] could not parse error message:   symbol:   method format(String,double)
[ERROR] location: class String
[ERROR] /home/vincentius/Documents/flume-load-gen-master/src/main/java/org/apache/flume/tcphammer/Hammer.java:142: error: incompatible types
[ERROR] eventCount,
[ERROR] ^
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

我认为maven在这种情况下使用了错误的slf4j记录器。 但是,我真的不知道如何解决这个问题。 有人可以帮忙吗?谢谢!

1 个答案:

答案 0 :(得分:2)

考虑在https://github.com/mpercy/flume-load-gen/issues开设一个问题,因为它是免费软件。