Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Export an aspectj enabled feature.

Thanks for your answers, it makes sense. However I still don't get it to work. Since my aspectj plugins depend on the org.aspectj.runtime I figure that I have to supply an aspectj runtime bundle when I deploy my project into a new eclipse environment. The aspectj bundles are however not resolved, due to "Missing required bundle org.aspectj.runtime_0.0.0". So which Aspectj plugin should I put into the Eclipse plugins directory in order for this to work?! The aspectjrt.jar has bundle information specified in its manifest but it doesn't seem to work to just drop it in the plugins folder.

Another question that I have is if you have to deploy your aspects projects (i.e. where the aspects are actually defined) as well in order to get things to work? Do I have to include the aspectjrt.jar in the bundle class path for each project using aspectj? I find these things quite confusing.


On Nov 28, 2007 10:45 AM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> Thanks for your answer. Just for curiosity, why is the aspectjrt.jar needed
> in runtime when performing compile-time weaving? Shouldn't it be possible to
> perform some post-compilation step in Eclipse where the aspectj compiler
> statically modifies the byte-code produced by Eclipse when exporting the
> plugin? This way you would have no dependency to aspectj what so ever. I'm
> sure that there's a very good reason though :).

There are a few common types that all woven code uses, for example
NoAspectBoundException which is thrown when an aspect instance is
missing, or the classes that implement thisJoinPoint.  I don't think
the inclusion of a small jar is too painful.  The alternative of
generating all these classes for each built system I can imagine
getting into problems when multiple versions of the same types are
encountered in a complete running system.

> When you say that I should turn off Build Automatically for my project, do
> you mean that I have to turn off the Eclipse compilation as well? There's no
> way to just turn off automatic aspectj weaving for a certain project? I
> think I've run into the problem that you're describing and it's quite time
> consuming have to wait for the weaving process so often.

Yep - turns off the eclipse compilation too - but doesn't necessarily
turn off the eager parsing that shows the red squigglies for you in
the editor.  There is no nice way to turn off weaving.  If working
with code style then the resultant bytecode from compilation is not
well formed, it must be 'completed' by the weaver to  be consistent.
I don't want people running the incomplete bytecode because they then
start reporting invalid bugs.

cheers,
Andy.
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top