You can also try this configuration setting:<br><br><a href="http://forge.jboss.org/docs/plugin_development/reference-libraries.html">http://forge.jboss.org/docs/plugin_development/reference-libraries.html</a><br><br>To ensure all dependency libraries are loaded from the same classloader.<br>
<br>~Lincoln<br><br><div class="gmail_quote">On Fri, Aug 3, 2012 at 4:53 AM, Thomas Frühbeck <span dir="ltr"><<a href="mailto:fruehbeck@aon.at" target="_blank">fruehbeck@aon.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<font size="+1"><font face="Courier New, Courier, monospace">Hello
Jeremie,<br>
<br>
this looks like a "modularity" issue. The JBoss Modules class
loading seems not to be exporting all the dependencies you
require.<br>
I frequently ran into such problems when using classes that
where not registered with Forge runtime.<br>
During standalone unit tests the modularity restrictions are not
yet active, so you will not recognize the issue early.<br>
I couldnt go into details of your code but I would suspect
something like:<br>
</font></font>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:'Times New Roman';word-spacing:0px"><span style="border-collapse:collapse;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:16px">
<pre style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:12px;font-family:Consolas,'Liberation Mono',Courier,monospace">
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:10px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial">
<span>
import</span> <span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;color:rgb(85,85,85)">org.apache.maven.model.Model</span><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-weight:bold">;
</span></div></pre>
</span></span><big><br>
in EclipsePluginFacetImpl.java<br>
<br>
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 :-/<br>
Try to stick to the registered and exported classes of Forge
runtime.<br>
<br>
Thomas<br>
<br>
</big>
<div>Am 03.08.2012 08:32, schrieb Jérémie:<br>
</div>
<blockquote type="cite"><div><div class="h5">Hi all,
<div><br>
</div>
<div>
<div>I want to inject the current project in my plugin.</div>
<div>This works well when running my unit tests, but not after
installation via "forge source-plugin" or "forge git-plugin".</div>
</div>
<div><br>
</div>
<div>This problem seems to come from a different classloader for
the "javax.inject.Inject" class.</div>
<div>At line 221 in org.jboss.weld.util.Bean: for
(WeldField<?, ?> annotatedField :
t.getDeclaredWeldFields(Inject.class))</div>
<div>We have Inject class with a different classloader of the key
used in the map.</div>
<div><br>
</div>
<div>My code can be found here : <a href="https://github.com/jerr/forge-eclipse-plugins" target="_blank">https://github.com/jerr/forge-eclipse-plugins</a></div>
<div><br>
</div>
<div>The modules installed into the $${home}/.forge directory seem
loaded beings in a different classloader.</div>
<div><br>
</div>
<div>Do you have a good practice for this?</div>
<div>Thank you for your help.</div>
<div><br>
</div>
<div><br>
</div>
<div>Jeremie.</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
forge-dev mailing list
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a>
</pre>
</blockquote>
<br>
<br>
</div>
<br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>"Simpler is better."<br>