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 -rf :flume-ng-core


同类似问题:

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

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

你可能感兴趣的:(环境配置)