Migrating 2.x plug-ins from plugin.xml to MANIFEST.MF... [message #84886] |
Fri, 23 March 2007 09:16  |
Eclipse User |
|
|
|
Hi,
The plug-ins that are currently in linuxtools's SVN repository still uses
the old 2.x mechanism of defining dependencies and such with the
plugin.xml file. I would like to upgrade them to OSGi's MANIFEST.MF
"format".
There are sections with 'runtime' XML elements that I do not know how to
migrate.
<runtime>
<library name="changelog.jar">
<export name="*"/>
</library>
</runtime>
How do I replace that XML element in the new MANIFEST.MF? Do I put
something like "Bundle-Classpath: changelog.jar"?
I also noticed some "optional" attributes in the "requires" element. How
do I replace these?
<requires>
<!-- ... -->
<import plugin="org.eclipse.cdt.ui" optional="true" />
<import plugin="org.eclipse.cdt.core" optional="true" />
</requires>
Thanks.
Regards,
Rem
|
|
|
Re: Migrating 2.x plug-ins from plugin.xml to MANIFEST.MF... [message #84930 is a reply to message #84886] |
Fri, 23 March 2007 16:20  |
Eclipse User |
|
|
|
If you right click on the plugin.xml (or the project) you should you find a
"convert" menu under PDE. It will do everything you need.
"Remy Suen" <remy.suen@gmail.com> wrote in message
news:pan.2007.03.23.13.16.33.545102@gmail.com...
> Hi,
>
> The plug-ins that are currently in linuxtools's SVN repository still uses
> the old 2.x mechanism of defining dependencies and such with the
> plugin.xml file. I would like to upgrade them to OSGi's MANIFEST.MF
> "format".
>
> There are sections with 'runtime' XML elements that I do not know how to
> migrate.
>
> <runtime>
> <library name="changelog.jar">
> <export name="*"/>
> </library>
> </runtime>
>
> How do I replace that XML element in the new MANIFEST.MF? Do I put
> something like "Bundle-Classpath: changelog.jar"?
>
> I also noticed some "optional" attributes in the "requires" element. How
> do I replace these?
>
> <requires>
> <!-- ... -->
> <import plugin="org.eclipse.cdt.ui" optional="true" />
> <import plugin="org.eclipse.cdt.core" optional="true" />
> </requires>
>
> Thanks.
>
> Regards,
> Rem
|
|
|
Re: Migrating 2.x plug-ins from plugin.xml to MANIFEST.MF... [message #84945 is a reply to message #84930] |
Fri, 23 March 2007 12:49  |
Eclipse User |
|
|
|
On Fri, 23 Mar 2007 16:20:29 -0400, Pascal Rapicault wrote:
> If you right click on the plugin.xml (or the project) you should you find
> a "convert" menu under PDE. It will do everything you need.
I tried that last night actually. Attempting to tell it to 'Migrate to
3.0' prompted me with a dialog stating that "There are no pre-Eclipse 3.0
plug-in projects to migrate." "Update Classpath" also did nothing useful
besides rearranging the contained XML elements in the .classpath file.
|
|
|
Re: Migrating 2.x plug-ins from plugin.xml to MANIFEST.MF... [message #84960 is a reply to message #84886] |
Fri, 23 March 2007 15:49  |
Eclipse User |
|
|
|
I asked on IRC and Paul Webster was nice enough to help me figure out what
was needed.
On Fri, 23 Mar 2007 13:16:34 +0000, Remy Suen wrote:
> <runtime>
> <library name="changelog.jar">
> <export name="*"/>
> </library>
> </runtime>
'Bundle-Classpath: changelog.jar' for the library, and the exporting is
just a matter of exporting every single package in the bundle.
> <requires>
> <!-- ... -->
> <import plugin="org.eclipse.cdt.ui" optional="true" /> <import
> plugin="org.eclipse.cdt.core" optional="true" />
> </requires>
This was solved with the resolution directive.
org.eclipse.cdt.ui;resolution:=optional,
org.eclipse.cdt.core;resolution:=optional,
Regards,
Rem
|
|
|
Powered by
FUDForum. Page generated in 0.03787 seconds