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

Roger Whitcomb commented on PIVOT-746:
--------------------------------------

I was piggybacking on two things:
1) ApplicationContext already has a getJVMVersion() method, so this is very 
similar -- since ApplicationContext is in the "wtk" area, this is where it had 
to happen.  However, I changed the generic <package macro, so actually the 
version file "build.properties" is embedded in all the .jar files.
2) The "build.properties" file was already being used as the sole source for 
the Pivot version number, so I added nothing new.  If the name needs to be 
changed for Eclipse, that is definitely outside the realm of this small change.

AFAIK the classloader I'm using should be correct because it must load the 
build.properties from the same .jar file where the ApplicationContext.class 
file is located.  Is there a problem with that in other environments??

Thanks.

> Add API to return Version of Pivot retrieved from "build.properties"
> --------------------------------------------------------------------
>
>                 Key: PIVOT-746
>                 URL: https://issues.apache.org/jira/browse/PIVOT-746
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0.1
>         Environment: Windows XP SP3, JDK 1.6.0_16
>            Reporter: Roger Whitcomb
>            Priority: Trivial
>             Fix For: 2.0.1
>
>         Attachments: version.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Would be helpful to be able to determine programmatically what the version of 
> Pivot is.  The simplest method is to include "build.properties" which is the 
> original source of this information in the packaged .jar files and then to 
> provide an API to read and parse this value into a Version structure.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to