Everything I see online just says to select the "ajc" compiler from the list of compilers, but that's not an option for me. I've got javac, jikes, eclipse, and javac-in-process, but that's it.
As it is my project compiles from the command line with maven, but if I type anything in the IDE that uses an aspect, I get compiler warnings.
AspectJ support is not bundled with IntelliJ IDEA starting with IntelliJ IDEA 2021.2. To be able to use this technology in your application, download and install the AspectJ plugin following the instructions in section Install plugins.
Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment| Compiler.
Description. The ajc command compiles and weaves AspectJ and Java source and . class files, producing . class files compliant with any Java VM (1.1 or later). It combines compilation and bytecode weaving and supports incremental builds; you can also weave bytecode at run-time using Load-Time Weaving.
This plugin weaves AspectJ aspects into your classes using the AspectJ compiler ("ajc"). Typically, aspects are used in one of two ways within your Maven reactors: As part of a Single Project, implying aspects and code are defined within the same Maven project.
Make sure AspectJ Support plug-in is enabled in Settings
(Preferences
on Mac) | Plugins
. Follow the documentation for more details.
When using proper Maven project, ajc compiler will be enabled automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With