We can work on prototyping this feature in Forge. This is within the forge Vision, but needs to be done carefully. Maven has some tools for getting information about a project&#39;s dependencies and deliverables. See the MavenDependencyFacet and RepositoryLookup classes. The MavenSystemSession class in RepositoryLookup has methods for reading a project POM. Perhaps we could leverage those. Although, wouldn&#39;t this kind of Export better be handled by the test framework itself, since it is already classloading everything?<br>
<br>~Lincoln<br><br><div class="gmail_quote">On Tue, Mar 29, 2011 at 10:36 AM, Max Rydahl Andersen <span dir="ltr">&lt;<a href="mailto:max.andersen@redhat.com">max.andersen@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">&gt; I&#39;m working on a feature in the Arquillian plugin that Dan asked about, which is to be able to export @Deployments that are part of the project&#39;s tests. To do this I need to invoke the static method on a test class to create the Archive that has to be exported.<br>

<br>
</div>Not only do you need access to the method you need the full classpath initialized for the project for it work.<br>
<div class="im"><br>
&gt; The problem is that is seems to be impossible to load a class that is in the user&#39;s project, although I already have an instance of the JavaSource object that describes the class. I believe it would be best to not rely on the question if the user&#39;s project has been compiled or not. So what should happen is the following:<br>

<br>
&gt; -Compile the class based on the JavaSource object<br>
&gt; -(optionally) Create a temporarily .class object<br>
&gt; -Load the class<br>
&gt; -(optionally) instantiate it<br>
&gt;<br>
&gt; I guess this is something that other plugins might need too in the future, so it would be better to find a reusable solution instead of hacking my way around it.<br>
<br>
<br>
</div>yeah, Dan asked the same for eclipse tooling and I don&#39;t really have a good answer beyond creating an isolated classloader<br>
that loads the users full classpath and execute (optimally under a security manager to avoid too many accidents).<br>
<br>
/max<br>
<a href="http://about.me/maxandersen" target="_blank">http://about.me/maxandersen</a><br>
<br>
<br>
<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>