-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AspectJ plugin matching join points but not weaving them #835
Comments
When using the
When you configured the Just put all your sources in |
Hi Lars, thank you for the explanation... it makes sense. |
To be clear, my aspect classes are in src/main/aspectj but I'd like the classes that I'm weaving to be in src/main/java. edit: I'm also seeing the Lombok's @log4j2 annotation does not get processed with the ajc compiler. Is there way to configure that? and FWIW, I was able to use the post compile weaving plugin and make this work without moving my source code Thanks |
When using Lombok, you must use the post-compile-weaving plugin, as Lombok does not support ajc. An example for compile-time-weaving with the |
Hello,
I'm struggling to convert my maven project to to Gradle. The maven project compiles and weaves aspects using aspectj-maven-plugin v1.14.0 . When I add the io.freefair.aspectj plugin,
the build output shows that the aspects are compiling but not matching anything:
[warning] advice defined in UIActivityAspect has not been applied [Xlint:adviceDidNotMatch]
when I add
compileAspectj.ajcOptions.sourceroots.from sourceSets.main.java.srcDirs
to the build file, then all the matches are found. For example,
... (TaskCellFactory.java:192) advised by after advice from 'com.nanocellect.wolfi.aop.UIActivityAspect' (UIActivityAspect.java:57)
Based on the docs, it seems that the plugin should not need to be configured with the 'sourceroots' but this is the only way I've been able to get the build to find the matching join points.
With that problem solved, my current issue is that advice is not being executed when I run my app. So it seems that the classes are not being instrumented with the advice even though the log entry implies that it is.
Here is my setup:
Do you have any ideas I can try? or let me know what additional information you need.
Thank you.
The text was updated successfully, but these errors were encountered: