Hi, Hari I updated flume version info patch with your suggestion. The logic is (1) mvn exec-maven-plugin execute a saveVersion.sh script to generate an annotation java file titled package-info.java, which contains version info; (2) build-helper-maven-plugin will add package-info.java to source. Both (1) and (2) in pom.xml under ./flume/flume-ng-core. (3) flume-ng script will call VersionInfo class when user call flume-ng version . (4) VersionInfo.java and VersionAnnotation.java work together to get and printversion info. I uploaded source code to https://reviews.apache.org/r/5463/diff/2/
All are working fine in Eclipse Env. And version info can output all required versin info. But it fail when use command mvn package. mvn log is as below. I tried several ways from Google, but still can't resolve it. This dependence problem is caused adding exec-maven-plugin and build-helper-maven-plugin into pom.xml under ./flume/flume-ng-core. is it not the right place to add? Anyone has met dependencies error like below? Thanks so much! 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-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 [4.122s] [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: 4.871s [INFO] Finished at: Sun Jun 24 22:17:33 CST 2012 [INFO] Final Memory: 18M/173M [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 -- Best Regards Leslin
