Adding dependant jars to Eclipse plugin? [message #269945] |
Fri, 03 September 2004 10:54 |
Eclipse User |
|
|
|
Originally posted by: mharp.seapine.com
Hey all,
I have a plugin that relies on the Apache Axis project, but can't seem to
figure out how to tell Eclipse to load those libraries when it loads my
plug-in. I keep getting ClassDefNotFound errors and my plugin loading fails.
I have the Axis jars in my PATH, I also added that to the lib dir of my
plugin and made the necessary <runtime> changes but they still aren't found.
<library name="lib\axis.jar">
<export name="*"/>
</library>
Can anyone explain how this is done? I'm gettin real frustrated; it seems
like adding the library elements to runtime should have worked. Second, is
there an Eclipse plug-in version of Axis somewhere out there? I can't seem
to find one, but it would be nice if I could just install Axis to Eclipse
w/o having to include it in my own plugin.
Thanks for any help you can give...
-matt
|
|
|
Re: Adding dependant jars to Eclipse plugin? [message #269978 is a reply to message #269945] |
Fri, 03 September 2004 11:09 |
Daniel Krügler Messages: 853 Registered: July 2009 |
Senior Member |
|
|
Hello Harpstein,
Harpstein schrieb:
> Hey all,
>
> I have a plugin that relies on the Apache Axis project, but can't seem to
> figure out how to tell Eclipse to load those libraries when it loads my
> plug-in. I keep getting ClassDefNotFound errors and my plugin loading fails.
>
> I have the Axis jars in my PATH, I also added that to the lib dir of my
> plugin and made the necessary <runtime> changes but they still aren't found.
>
> <library name="lib\axis.jar">
> <export name="*"/>
> </library>
>
> Can anyone explain how this is done? I'm gettin real frustrated; it seems
> like adding the library elements to runtime should have worked. Second, is
> there an Eclipse plug-in version of Axis somewhere out there? I can't seem
> to find one, but it would be nice if I could just install Axis to Eclipse
> w/o having to include it in my own plugin.
Yes that behaviour is quite astonishing on first changes from pure Java
programming to plugin programming!
The point is, that you should define a single library plugin, which
actually **contains** the corresponding axis jars and does export them,
like:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="com.example.axis"
name="Your plugin name"
version="1.0.0"
provider-name="Your provider id">
<runtime>
<library name="axis.jar">
<export name="*"/>
</library>
<library name="commons-discovery.jar">
<export name="*"/>
</library>
<library name="commons-logging.jar">
<export name="*"/>
</library>
...
</runtime>
</plugin>
Now your other plugins, which depend on the axis jar's simplply declare
their dependency on the above defined plugin (com.example.axis).
HTH
Daniel Krügler
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03092 seconds