[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-25 Thread Greg Brown (JIRA)

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

Greg Brown commented on PIVOT-746:
--

I was not aware of Package#getSpecificationVersion(), etc. - good find. I 
assume that this pulls the version info from the JAR manifest?



 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, version.patch, version2.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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-25 Thread Roger Whitcomb (JIRA)

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

Roger Whitcomb commented on PIVOT-746:
--

The only think I was wondering (which is why I was super-cautious) is that 
getPackage() can return null (such as when Pivot is run from .class files 
instead of a .jar?) so I didn't want Sandro's case to be broken again if that 
happened.

 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, version.patch, version2.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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-25 Thread Andrei Pozolotin (JIRA)

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

Andrei Pozolotin commented on PIVOT-746:


getPackage() returns null when you run exploded jar applet (legacy classloder);
this currently breaks wtk, wtk-terra

 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, version.patch, version2.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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-25 Thread Greg Brown (JIRA)

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

Greg Brown commented on PIVOT-746:
--

That's unfortunate. It's probably not a case we really need to worry about, but 
the fix is simple enough so we might as well do it.



 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, version.patch, version2.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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-25 Thread Sandro Martini (JIRA)

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

Sandro Martini commented on PIVOT-746:
--

Hi all,
I've just tries to run/debug some Test classes as Applications, and as Applets 
from my eclipse and all works good :-) :
ApplicationContext.class.getPackage() never returns null , but String version = 
ApplicationContext.class.getPackage().getImplementationVersion(); willy be 
null, so a safe pivotVersion will be initialized.

If it's Ok for all, to me seems that this issue could be marked as resolved.


 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, version.patch, version2.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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-24 Thread Andrei Pozolotin (JIRA)

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

Andrei Pozolotin commented on PIVOT-746:


another wild idea: there is not need for build.properties at all;

use instead:
http://download.oracle.com/javase/6/docs/api/java/lang/Package.html

getClass().getPackage().getSpecificationVersion();
getClass().getPackage().getSpecificationTitle();
getClass().getPackage().getImplementationVersion();
getClass().getPackage().getImplementationTitle();

:-)

 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-24 Thread Roger Whitcomb (JIRA)

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

Roger Whitcomb commented on PIVOT-746:
--

Okay, so here's a patch that reverts the addition of build.properties to the 
.jar files and instead uses Andrei's method to get the Implementation-Version 
(which is already set by the value from build.properties).  It should be 
fail-safe in the case of running from .class files and not from .jars.

 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, version.patch, version2.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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-23 Thread Greg Brown (JIRA)

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

Greg Brown commented on PIVOT-746:
--

I'm not sure that silently failing is the right solution. It sounds like 
build.properties is not on the classpath. We probably need to update the 
Eclipse projects to include this file.


 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-23 Thread Sandro Martini (JIRA)

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

Sandro Martini commented on PIVOT-746:
--

Ok, but silently not so much, because something is written in the Console but 
I agree that could not be the best.
And Greg, are we sure that not finding such file is right to be a fatal error 
(in Startup of applications) ?

 We probably need to update the Eclipse projects to include this file. 
Ok, let's see if it's a good solution, we can try it now ...


 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-23 Thread Roger Whitcomb (JIRA)

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

Roger Whitcomb commented on PIVOT-746:
--

I'd be happy to do it, except that I know next to nothing about Eclipse...  But 
if someone can point me to what has to change I can do it.

Sandro, all I did was add our build.properties file to all the built .jar 
files.  So, if there is a setting in the Eclipse projects that specifies what 
the .jar files contain, that just needs to be updated (or something like that).

 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-23 Thread Sandro Martini (JIRA)

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

Sandro Martini commented on PIVOT-746:
--

Hi Roger, don't worry :-) ... to add the build.properties to any Pivot jar we 
can do it inside our Ant build process.
The only problem now is that from the development environment with all Pivot 
sources (from trunk) we have to see if it's possible to add a reference to that 
file for any Pivot subproject (like tests, examples, etc). I don't know if it's 
possible inside eclipse, but I'll try to see as soon as possible.

In the meantime using the patch2 in eclipse here will solve the problem, as a 
workaround.


Just a note: 
I've just seen that inside Pivot jars (for example all jars of Pivot-2.0), in 
the manifest there is this element:
Implementation-Version: 2.0
where the release number if taken from build.properties by ant ...
so why not try to use directly this info (and not bundle a copy of 
build.properties) ? 
And when not available (like when there aren't Pivot jars but full sources 
instead) verify if load from build.properties (if possible, after some checks 
in eclipse) or if log it as a warning/error ...

Comments ?


Bye,
Sandro



 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-23 Thread Roger Whitcomb (JIRA)

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

Roger Whitcomb commented on PIVOT-746:
--

Can't we just set the classpath for Eclipse to include our build.properties 
and leave the code the way it was?  If we just ensure that build.properties 
is always available then there is nothing more to do.  I just don't know how to 
set the Eclipse classpath.  Is that done in some of the .settings files?  Or 
somehow via the .classpath file?

 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-23 Thread Greg Brown (JIRA)

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

Greg Brown commented on PIVOT-746:
--

 to add the build.properties to any Pivot jar we can do it inside our Ant 
 build process. 

FYI, Roger's patch already added this to build.xml.

 I've just seen that inside Pivot jars (for example all jars of Pivot-2.0), in 
 the manifest there is this element: 
 Implementation-Version: 2.0 

I actually wrote code to do this a long time ago, but it was pretty messy. The 
manifest isn't on the classpath, so it's not easy to get to programmatically.


 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-23 Thread Sandro Martini (JIRA)

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

Sandro Martini commented on PIVOT-746:
--

Ok, I'll try to add the build.properties to our eclipse projects, with the 
assumption that it is 1 level upper (in root of the workspace folder) ... and 
keep you updated before committing.


 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
Assignee: Greg Brown
Priority: Trivial
 Fix For: 2.0.1

 Attachments: pivot746_patch2.patch, 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-20 Thread Andrei Pozolotin (JIRA)

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

Andrei Pozolotin commented on PIVOT-746:


few suggestions:

1) this currently happens in pivot-wtk; should be in pivot-core;

2) classloader should be PIVOT-742;

thank you.

 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-20 Thread Andrei Pozolotin (JIRA)

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

Andrei Pozolotin commented on PIVOT-746:


also: build.properties is reserved name in eclipse pde; I suggest 
pivot-build.properties instead


 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-20 Thread Roger Whitcomb (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-20 Thread Greg Brown (JIRA)

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

Greg Brown commented on PIVOT-746:
--

Embedding the file in all JARs seems like the right thing to do, and the 
location of the method (in ApplicationContext) makes sense to me.

FYI, I have used Eclipse for Pivot development since day one and the existence 
of the build.properties file has never been a problem.


 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



[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-20 Thread Greg Brown (JIRA)

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

Greg Brown commented on PIVOT-746:
--

 re: location of the method (in ApplicationContext)  
 I am sorry I was not clear: you already has version in core: 
public class Version implements ComparableVersion, Serializable { 
 why not provide singe static final field in core, which does parsing of build 
 version 

Where would this field live? Certainly not in the Version class itself, since 
Version is a generic class representing a four-value revision number (in other 
words, it isn't specific to Pivot). I don't see any problem leaving it in 
ApplicationContext.

 so nobody knows build.properties exists

In the current implementation, only ApplicationContext needs to know about it. 
How would moving it to another class be any different?

 try using pde: 
 http://www.vogella.de/articles/EclipsePDEBuild/article.html#productbuild

I have. How do you think the Pivot plugin was built?  ;-)


 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


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from build.properties

2011-05-20 Thread Greg Brown (JIRA)

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

Greg Brown commented on PIVOT-746:
--

That's not something I have time to tackle at the moment, but if you are 
willing to set it up I'd be happy to help if I can.



 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