<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body 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>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-15">
<span class="Apple-style-span" style="border-collapse: separate;
color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing:
0px; -webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
font-size: medium; "><span class="Apple-style-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 class="line" id="LC37" 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 class="kn" 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; ">
import</span> <span class="nn" 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 class="o" 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 class="moz-cite-prefix">Am 03.08.2012 08:32, schrieb Jérémie:<br>
</div>
<blockquote
cite="mid:CAGM=3huLXSyBMNQkR-uBPR5-xZm0oh2br4wo5mCDut90DWo65g@mail.gmail.com"
type="cite">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 moz-do-not-send="true"
href="https://github.com/jerr/forge-eclipse-plugins">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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
forge-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>