We compile module jars and then assemble them. Can we continue this with AspectJ?

0
Posted

We compile module jars and then assemble them. Can we continue this with AspectJ?

0

Aspects apply to everything in a namespace, as if everything is compiled together. Sometimes you can break the build down into separate steps without breaking this model, but we haven’t stated exactly where it could break because it depends on the interactions between all types. You can try the approaches below, but remember to rebuild everything in one go if there are problems. The simplest scenario is when the aspects apply to all modules and the modules compile without the aspects. In that case, weaving in the aspects is just the final assembly step for the build. Next is the case where the aspects make changes to a common library that are visible to other clients, which themselves are otherwise unaffected by the aspects. In this case, the common library can be built using ajc, and used on the classpath for the module builds: ajc -outjar common.jar -sourceroots “aspectj-src:src” … cd ../otherProject javac -classpath “../common/common.jar:” {src} Combining these last two, there’s t

Related Questions