The example given here doesn't work:
https://dev-aspectj.github.io/aspectj-maven-plugin/examples/weaveDirectories.html
This is because already compiled classes will be overridden with the configuration they give.
In my use case, I need to compile classes, apply modifications to their bytecode using another plugin entirely, and then weave them. My modifications are lost because they are overridden with the weaving that comes from the source code.
The example here seems to offer a solution:
https://dev-aspectj.github.io/aspectj-maven-plugin/examples/includeExclude.html
I tried using an empty source tag, <sources/>, but then the weaving is skipped entirely.
The only work-around that works for me is to exclude part of the source code, using <excludes>...</excludes> for example, while leaving at least one class to avoid the weaving being skipped entirely.