[forge-dev] *** PROBABLY SPAM *** Re: Project injection issue in a plugin and classloader
Jérémie
jer at printstacktrace.org
Fri Aug 3 11:28:29 EDT 2012
Hi Thomas,
Thank you for your help.
I fixed my problem by removing dependencies in my pom.xml file.
https://github.com/jerr/forge-eclipse-plugins/commit/5d9c3118481610fb4e233151f269ce22f5fea3a9
Regards,
Jeremie
2012/8/3 Thomas Frühbeck <fruehbeck at aon.at>
> Hello Jeremie,
>
> this looks like a "modularity" issue. The JBoss Modules class loading
> seems not to be exporting all the dependencies you require.
> I frequently ran into such problems when using classes that where not
> registered with Forge runtime.
> During standalone unit tests the modularity restrictions are not yet
> active, so you will not recognize the issue early.
> I couldnt go into details of your code but I would suspect something like:
>
>
> import org.apache.maven.model.Model;
>
>
> in EclipsePluginFacetImpl.java
>
> During plugin installation the dependencies of your plugin are rewritten
> to the allowed modules, you can verify this by having a look into the
> module.xml of your plugin after installation. If the classes cannot be
> resolved the facet will be silently ignored :-/
> Try to stick to the registered and exported classes of Forge runtime.
>
> Thomas
>
> Am 03.08.2012 08:32, schrieb Jérémie:
>
> Hi all,
>
> I want to inject the current project in my plugin.
> This works well when running my unit tests, but not after installation via
> "forge source-plugin" or "forge git-plugin".
>
> This problem seems to come from a different classloader for the
> "javax.inject.Inject" class.
> At line 221 in org.jboss.weld.util.Bean: for (WeldField<?, ?>
> annotatedField : t.getDeclaredWeldFields(Inject.class))
> We have Inject class with a different classloader of the key used in the
> map.
>
> My code can be found here : https://github.com/jerr/forge-eclipse-plugins
>
> The modules installed into the $${home}/.forge directory seem loaded
> beings in a different classloader.
>
> Do you have a good practice for this?
> Thank you for your help.
>
>
> Jeremie.
>
>
> _______________________________________________
> forge-dev mailing listforge-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/forge-dev
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120803/190ba183/attachment.html
More information about the forge-dev
mailing list