MVN package 编译出错

 典型的 maven错误:

Failed to execute goal on project ***


怎么解决这个问题呢?  很多时候,思路往往聚焦在该错误上, 而实际所要考虑则是前面的一系列warning。 如此处所示,缺少了 version信息,那就在pom.xml里根据.m2/repository里的实际情况补上。



leslin@ubtServer:/data/flume-truck/flume$ mvn package -DskipTests
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.flume:flume-ng-core:jar:1.2.0-incubating-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:exec-maven-plugin is missing. @ line 40, column 15
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 61, column 15
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.flume:flume-parent:pom:1.2.0-incubating-SNAPSHOT
[WARNING] 'reporting.plugins.plugin.version' for org.tomdz.maven:sphinx-maven-plugin is missing. @ line 832, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Flume
[INFO] Flume NG SDK
[INFO] Flume NG Configuration
[INFO] Flume NG Core
[INFO] Flume NG Sinks
[INFO] Flume NG HDFS Sink
[INFO] Flume NG IRC Sink
[INFO] Flume NG HBase Sink
[INFO] Flume NG Channels
[INFO] Flume NG JDBC channel
[INFO] Flume NG Node
[INFO] Flume NG file-based channel
[INFO] Flume NG file backed Memory channel
[INFO] Flume legacy Sources
[INFO] Flume legacy Avro source
[INFO] Flume legacy Thrift Source
[INFO] Flume NG Clients
[INFO] Flume NG Log4j Appender
[INFO] Flume NG distribution
[INFO] Flume NG Integration Tests
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Flume 1.2.0-incubating-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ flume-parent ---
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] 
[INFO] --- apache-rat-plugin:0.7:check (test.rat) @ flume-parent ---
[INFO] Exclude: .idea/
[INFO] Exclude: **/*.iml
[INFO] Exclude: .git/
[INFO] Exclude: .gitignore
[INFO] Exclude: .repository/
[INFO] Exclude: **/*.diff
[INFO] Exclude: **/*.patch
[INFO] Exclude: **/*.avsc
[INFO] Exclude: **/docs/**
[INFO] 
[INFO] >>> maven-javadoc-plugin:2.8.1:aggregate (javadoc-jar) @ flume-parent >>>
[INFO]                                                                         
[INFO] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] Forking Flume NG SDK 1.2.0-incubating-SNAPSHOT
[INFO] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] 
[INFO] --- avro-maven-plugin:1.6.1:idl-protocol (default) @ flume-ng-sdk ---
[INFO]                                                                         
[INFO] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] Forking Flume NG Core 1.2.0-incubating-SNAPSHOT
[INFO] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Flume ...................................... FAILURE [6.474s]
[INFO] Flume NG SDK ...................................... SKIPPED
[INFO] Flume NG Configuration ............................ SKIPPED
[INFO] Flume NG Core ..................................... SKIPPED
[INFO] Flume NG Sinks .................................... SKIPPED
[INFO] Flume NG HDFS Sink ................................ SKIPPED
[INFO] Flume NG IRC Sink ................................. SKIPPED
[INFO] Flume NG HBase Sink ............................... SKIPPED
[INFO] Flume NG Channels ................................. SKIPPED
[INFO] Flume NG JDBC channel ............................. SKIPPED
[INFO] Flume NG Node ..................................... SKIPPED
[INFO] Flume NG file-based channel ....................... SKIPPED
[INFO] Flume NG file backed Memory channel ............... SKIPPED
[INFO] Flume legacy Sources .............................. SKIPPED
[INFO] Flume legacy Avro source .......................... SKIPPED
[INFO] Flume legacy Thrift Source ........................ SKIPPED
[INFO] Flume NG Clients .................................. SKIPPED
[INFO] Flume NG Log4j Appender ........................... SKIPPED
[INFO] Flume NG distribution ............................. SKIPPED
[INFO] Flume NG Integration Tests ........................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.451s
[INFO] Finished at: Sun Jun 24 13:32:55 CST 2012
[INFO] Final Memory: 18M/174M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project flume-ng-core: Could not resolve dependencies for project org.apache.flume:flume-ng-core:jar:1.2.0-incubating-SNAPSHOT: The following artifacts could not be resolved: org.apache.flume:flume-ng-sdk:jar:1.2.0-incubating-SNAPSHOT, org.apache.flume:flume-ng-configuration:jar:1.2.0-incubating-SNAPSHOT: Failure to find org.apache.flume:flume-ng-sdk:jar:1.2.0-incubating-SNAPSHOT in http://repository.apache.org/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced -> [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/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :flume-ng-core


同类似问题:

http://stackoverflow.com/questions/4650460/maven-could-not-resolve-dependencies-problem

此问题也是从warning中获取信息的。 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值