[ 
https://issues.apache.org/jira/browse/FLUME-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397296#comment-13397296
 ] 

Leslin (Hong Xiang Lin) commented on FLUME-1240:
------------------------------------------------

I implemented a version class to get version info from manifest file of 
flume-ng-core-*.jar.  It's one of most popular way to get info. 

Now the version info from manifest file like below:
anifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: leslin
Build-Jdk: 1.6.0_26
Specification-Title: Flume NG Core
Specification-Version: 1.2.0-incubating-SNAPSHOT
Specification-Vendor: Apache Software Foundation
Implementation-Title: Flume NG Core
Implementation-Version: 1.2.0-incubating-SNAPSHOT
Implementation-Vendor-Id: org.apache.flume
Implementation-Vendor: Apache Software Foundation

I only get Implementation-Version and Built-by now. Let me know if we need more 
info. It's usage like below: 
leslin@ubtServer:/usr/lib/flume-ng/bin$ flume-ng version
Apache Flume version: 1.2.0-incubating-SNAPSHOT
Built-By: 1.2.0-incubating-SNAPSHOT

Furthermore, Maven JAR Plugin can add any required info like 
http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
 

any comments? 

                
> Add version info to Flume NG
> ----------------------------
>
>                 Key: FLUME-1240
>                 URL: https://issues.apache.org/jira/browse/FLUME-1240
>             Project: Flume
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: v1.2.0
>            Reporter: Will McQueen
>            Assignee: Leslin (Hong Xiang Lin)
>             Fix For: v1.2.0
>
>
> A user should have a way to know which version of Flume is being used. This 
> can be implemented by adding a 'version' command to the flume-ng shell 
> script. For example:
>      flume-ng version
> ...would result in the git commit # that the Flume NG build is based on. This 
> would help with tracking a user's problems with using Flume.
> I imagine that the build process would need to create some kind of buildinfo 
> file that can be referenced by the script... that's just one idea. I'm 
> interested in what others think.
> Hadoop has the same feature: "hadoop version".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to