So you’re trying to use AspectJ in a Maven project with IntelliJ IDEA. You add the basic dependency and plugin to your POM file, when IDEA gives you this message:
IDEA was unable to find AspectJ compiler JAR among plugin dependencies.
Please check Settings | Compiler | Java Compiler
The solution is to add a dependency on aspectjtools. For example:
<dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjtools</artifactId> <version>1.6.9</version> </dependency>
When IDEA imports the POM changes it will automatically set the AJC compiler and perform some extra indexing work, and then you’re done!