aspectj-maven-plugin multi module project
I'm trying to use aspectj-maven-plugin in a multi-module project and can't understand where aspects have to be placed. I want to crosscut in-module and between-开发者_运维知识库modules calls. Where .aj
files should be located?
This is what I did so far (structure of maven modules):
foo
foo-api
foo-impl
foo-aspects
.aj
files are located in src/main/aspect
. All sub-modules (except foo-aspects
) are using aspectLibraries
option of aspectj-maven-plugin, where they use aspects from foo-aspects.jar
.
At the same time every sub-module has its own aspects in src/main/aspect
. Works fine for me so far.
精彩评论