Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] LTW and pointcut not matched with @target and inheritance

Thanks Alex for your the suggestion.

now i got the print from the advice :D

now, since this was only a toy example to isolate problems related to the ltw, i'll get back where classes are generated on the fly...i'll post for any more problems, thanks you all.

thanks also to Adrian for quickly fixing bugs :-)



Alexandre Vasseur ha scritto:

Valerio

The aop.xml must appear
- wether directly with a -Daj5.def=pathToTheFile jvm argument. This
might be deprecated but can be handy for testing. When doing so, the
aop.xml will be registered as if it was in the system classpath
- wether indirectly in the classpath thru a META-INF/ entry. For
simple cases that means system classpath and you will thus need -cp
......;myfolder
where myfolder/META-INF/aop.xml points to the aop.xml file
(we also support more complex deployment where you can package this
file in a specific webapp, in an EAR file etc).

In your test app you thus need to fix that. I could do it and here is what I see
   [junit] ------------- Standard Output ---------------
   [junit] **in MyAspect**
   [junit] in Clazz: hello
   [junit] ------------- ---------------- ---------------
Plus a bunch of other verbose message and this most important one:
   [junit] info using (-Daj5.def) META-INF/aop.xml

The "advice did not matched" warning that you have from iajc is
expected in your case as you do "javac the app", "iajc the aspects in
.aj files", "run with load time weaving"
(thus indeed, the aspect' advice  is just compiled but does not weave
any of your app classes since you will use LTW).

The test Adrian did is not using LTW



Back to the top