[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] can't weave using aspect in aspectpath
|
Matthew,
Yes, you are correct. The ANT script you wrote works perfect and
aspects are woven (this is actually what I'm using right now). It is
only when I move the aspect classes into a jar and onto the aspectpath
that it doesn't work. There's several ways I have checked this: first,
no closure classes are being generated and secondly, running the
programming does proove no aspects are executed.
If the "-showWeaveInfo" is in CVS and could help me diagnose the
problem, I might check this out later today, but I'm limited on time
right now.
regards,
Peter
On Fri, 22 Oct 2004 12:00:03 -0400, aspectj-users-request@xxxxxxxxxxx
<aspectj-users-request@xxxxxxxxxxx> wrote:
> Message: 5
> Subject: Re: [aspectj-users] can't weave using aspect in aspectpath
> To: aspectj-users@xxxxxxxxxxx
> From: Matthew Webster <matthew_webster@xxxxxxxxxx>
> Date: Fri, 22 Oct 2004 10:17:34 +0100
> Reply-To: aspectj-users@xxxxxxxxxxx
>
> Peter,
>
> How do you determine that your program is not being woven? Do you run it?
> The -verbose option will not help. However in AspectJ 1.2.1, which will be
> available shortly, we have added "-showWeaveInfo" which lists all join
> points that are woven and by whom. When you compile everything in one go I
> presume your XML looks a bit like this i.e. to facilitate binary weaving
> you simply move the aspect source directories into the separate build step:
>
> <iajc destdir="${classes.dir}">
> <sourceroots>
> <pathelement location="${src.dir}" />
> <pathelement location="${generated.dir}" />
> <pathelement location="${src}/be/ugent/aadd/aspect" />
> <pathelement location="${src}/be/ugent/aadd/util" />
> </sourceroots>
> <classpath><path refid="project.class.path" /></classpath>
> </iajc>
>
> Matthew Webster
> AOSD Project
> Java Technology Centre, MP146
> IBM Hursley Park, Winchester, SO21 2JN, England
> Telephone: +44 196 2816139 (external) 246139 (internal)
> Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
> http://w3.hursley.ibm.com/~websterm/
>
> Peter Backx <peter.backx@xxxxxxxxx>@eclipse.org on 21/10/2004 11:04:56
>
> Please respond to aspectj-users@xxxxxxxxxxx
>
> Sent by: aspectj-users-admin@xxxxxxxxxxx
>
> To: aspectj-users@xxxxxxxxxxx
> cc:
> Subject: [aspectj-users] can't weave using aspect in aspectpath
>
> I'm currently using the iajc ant task (AspectJ 1.2) in a project and
> I'm experiencing a problem. I want to put the aspect itself in a
> different jar so that it is reusable in other parts of the projects
> and it seems that this should be done through the aspectpath property,
> however I can't get this to work.
>
> What I do (copy-and-paste from build files I'm currently experimenting
> with, so they're far from perfect):
>
> * first I put the aspect and some utility classses in a jar:
> <iajc outjar="dist/aadd.jar" classpathref="cp">
> <sourceroots>
> <pathelement location="${src}/be/ugent/aadd/aspect" />
> <pathelement location="${src}/be/ugent/aadd/util" />
> </sourceroots>
> </iajc>
>
> * I then try to compile the code that the aspect should be woven into:
> <iajc destdir="${classes.dir}">
> <sourceroots>
> <pathelement location="${src.dir}" />
> <pathelement location="${generated.dir}" />
> </sourceroots>
> <aspectpath><pathelement location="../../aadd/dist/aadd.jar"
> /></aspectpath>
> <classpath><path refid="project.class.path" /></classpath>
> </iajc>
>
> However this does not work and the aspect is not woven into the code.
> If I just compile all files in one go everything is fine and the
> aspect works as expected.
>
> Am I missing something obvious? How should I go about analysing this
> problem (I've tried the "verbose" output but that isn't helping me
> much)?
>
> Thanks in advance,
> Peter
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users