Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] Handy PDE trick for features - plugin versions


Hi,

PDE has a really handy feature for supplying plugin version numbers inside features that I don't think many people are aware of. It can save a lot of time and hassle, so I'm sending it out to the newsgroup to make sure people are aware of it. I'd suggest using this for all your feature.xml files - Eclipse already does.

Normally, you would specify your plugin version # in two places. Inside the actual plugin, and then inside the feature.xml as well:

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.eclipse.wst.server"
      label="Server Tools Feature"
      version="6.0.0"
      provider-name="IBM">

   <plugin
         id="org.eclipse.wst.server.core"
         download-size="0"
         install-size="0"
         version="3.0.0"/>
...

The next time you change the version number of the plugin, provide an ifix, etc., you have to remember to change it in the feature as well. This applies to changes during development, ifixes, etc. If you forget to change one, the build breaks.

Instead of duplicating this reference, you can just use "0.0.0" as the plugin version number in your feature.xml. PDE will automatically update the feature.xml with the correct current plugin version number during the build, and the build output will be identical to before. For instance, here's the same feature.xml making use of this feature:

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.eclipse.wst.server"
      label="Server Tools Feature"
      version="6.0.0"
      provider-name="IBM">

   <plugin
         id="org.eclipse.wst.server.core"
         download-size="0"
         install-size="0"
         version="0.0.0"/>
...

Thanks,
Tim deBoer
WebSphere Tools - IBM Canada Ltd.
(905) 413-3503  (tieline 969)
deboer@xxxxxxxxxx

Back to the top