automatically add svn revision number on bundle export [message #495633] |
Thu, 05 November 2009 09:38  |
Eclipse User |
|
|
|
Hi all,
I couldn't find anything on google, which is why I ask here:
I would like to have eclipse autmatically add the svn revision number
to the bundle version when I export a Eclipse RCP Bundle/Plugin. I think
this could be done using the qualifier replacement but I don't know how.
The Bundle jar file should look like this after exporting
com.company.mybundle_1.0.0.rev1234
and not
com.company.mybundle_1.0.0.20091105-1535
Currently we manually add the svn revision number to the bundle using
the qualifier replacement, but developers often forget to do that. If
that bundle is shipped and has a bug, we have no chance to figure out
what bundle revision was shipped (the current date that is added by the
qualifier replacement as standard doesn't help much).
Does anyone know if that is possible and how it is done?
Regards,
Tom
|
|
|
|
Re: automatically add svn revision number on bundle export [message #495790 is a reply to message #495731] |
Fri, 06 November 2009 01:29   |
Eclipse User |
|
|
|
Andrew Niefer <aniefer@ca.ibm.com> writes:
> Thomas Haskes wrote:
>>
>> I would like to have eclipse autmatically add the svn revision number
>> to the bundle version when I export a Eclipse RCP Bundle/Plugin. I think
>> this could be done using the qualifier replacement but I don't know how.
>
> Other than the field in the export wizard, all you can do is in the bundle's
> build.properties file, set the property
> qualifier=rev1234
>
> Headless builds allow more flexibility here.
>
> I don't know of any good ways to keep this property in-sync with the revision
> (and perhaps also keep it out of source control).
> Thomas Haskes wrote:
>> Hi all,
>>
>> I couldn't find anything on google, which is why I ask here:
>>
>> I would like to have eclipse autmatically add the svn revision number
>> to the bundle version when I export a Eclipse RCP Bundle/Plugin. I think
>> this could be done using the qualifier replacement but I don't know how.
>>
>> The Bundle jar file should look like this after exporting
>>
>> com.company.mybundle_1.0.0.rev1234
>>
>> and not
>>
>> com.company.mybundle_1.0.0.20091105-1535
>>
>> Currently we manually add the svn revision number to the bundle using
>> the qualifier replacement, but developers often forget to do that. If
>> that bundle is shipped and has a bug, we have no chance to figure out
>> what bundle revision was shipped (the current date that is added by the
>> qualifier replacement as standard doesn't help much).
>>
>> Does anyone know if that is possible and how it is done?
Similar to CVS, just google for svn:keywords.
HTH
Volker
--
* Volker Wegert * http://www.volker-wegert.de/contact *
"You need the computing power of a Pentium, 16 MB RAM and 1 GB Harddisk to run
Win95. It took the computing power of 3 Commodore 64 to fly to the
Moon. Something is wrong here, and it wasn't the Apollo."
|
|
|
Re: automatically add svn revision number on bundle export [message #512663 is a reply to message #495633] |
Fri, 05 February 2010 17:14  |
Eclipse User |
|
|
|
I have a suggestion as well as a question of my own. I think you may be able to write an exportWizard plugin to do what you are trying to do. I haven't tried this myself, but it looks like a useful lead for you.
I have been working on the related problem of implanting a global svn revision number into source code. I wrote a CompilationParticipant to assist in this task, and during the aboutToBuild() method I retrieve the global svn revision number by exec'ing svnversion on the project directory and then implanting it into a text file in the source tree which is ignored by subversion. The text file can then be read into source code using Class.getResource().
The only hitch I have is that invoking svnversion on the project directory gives me a revision number with a "P" on the end, which indicates a sparse checkout. I'd like to get the revision number as it appears in the "SVN Info" tab of the project properties window. I am sure there must be a way to get this number programatically from within the plugin, but I haven't found it yet. I will post it if I find it.
Hope this information is useful.
|
|
|
Powered by
FUDForum. Page generated in 0.03947 seconds