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.


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.


forge-dev mailing list