Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] jars build problems

Peter,

I've discussed this topic recently on the IRC channel and at the Server
Architecture meeting in NY.

The configuration framework loads classes from plugins or jars by name.
With traditional jars this works fine as long as the class implementations
are on the classpath at runtime.
Once we moved these implementations into plugins and ran them in an OSGi
framework, the rules prevented the classes from being loaded.
In order to avoid this problem I created extension points in the component
framework and each dynamically loaded class is now an extension.
In the plugins/jars that implement these extensions, this is just an entry
in the plugin.xml (no code dependenciy on eclipse at build or runtime.
As you've found, in the configuration.common there is code that executes,
if the traditional class load fails, to load the extension with the same
name as the class.
This configuraiton.common code requires eclipse in order to build. During
runtime it only executes this new code if the traditional class load fails.
If old code would have successfully loaded classes, new code will do the
same.
If old code would have failed to load classes, new code tries via extension
mechanism.
If new code is running in eclipse this works if the extension is present.
If new code is running without eclipse, this results in class not found
exception.

Therefore, class not found exception (for eclipse.core) in new code happens
only when class not found exception (for dynamically loaded class) would
have otherwise happened.

I would like to eventually refactor this code so this dependency is in a
separate module that can be implemented either for eclipse or for standard
jars to remove the build dependency on eclipse for those that never expect
to run in that environment.

Regards,
Mike

higgins-dev-bounces@xxxxxxxxxxx wrote on 12/21/2007 06:03:15 AM:

> Hi Mike,
> I find that you made some changes to configuration.common which causes
> problems with jar build. I mean that now jars can not be built and used
> without eclipse runtime. A specially this is critical for deployments.
> Peter
> _______________________________________________
> higgins-dev mailing list
> higgins-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/higgins-dev



Back to the top