Enabling AspectJ post-compilation weave mode

I'm trying to weave an aspect into a dependency of my project, and it looks like post-compilation weaving is the way to achieve that. The "Enable Post-Compilation Weave Mode" checkbox in the AspectJ facet is grayed out however -- it says I need to enable external builds under Settings->Compiler first. However, that setting appears not to exist -- how can I enable post-compilation weaving?

(Extra context: The actual problem I'm trying to solve is setting up a profiling system with AspectJ, and having it only enabled in developer builds. Our main way of doing developer builds is having a separate module which includes the product as a dependency and wraps it with some extra stuff, so I'm trying to add an aspect to that module. However, then the aspect only gets weaved into the thin layer of extra code in that module, and not into the product itself.)

1 comment
Comment actions Permalink

That message is corrected in the latest builds, sorry for the confusion. So, you need to open the project settings, set Java compiler to Ajc, and enable "Delegate to Javac" option.

Please note that IDEA does not support "inpath" mode. The modules to be weaved should (1) depend on an aspect module and (2) have it in the aspect path.

0

Please sign in to leave a comment.