开发者

aspectj-maven-plugin multi module project

开发者 https://www.devze.com 2023-03-01 23:33 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消