[forge-dev] invoking project classes

Paul Bakker paul.bakker.nl at gmail.com
Tue Mar 29 10:17:52 EDT 2011


Hi all,

I'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'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.

The problem is that is seems to be impossible to load a class that is in the
user'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's project has been compiled or not. So what should
happen is the following:

-Compile the class based on the JavaSource object
-(optionally) Create a temporarily .class object
-Load the class
-(optionally) instantiate it

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.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20110329/a1b483c8/attachment.html 


More information about the forge-dev mailing list