1

Is there a way to specify the name of the aop.xml file with LTW? or define another name and location? I have several software modules that I use and that all use META-INF/aop.xml with different settings. I include these modules in a web application and then it all dependens how it's deployed/unpacked, which aop.xml file is used .. So I discovered after long time of searching that not all LTW weaving toke place correcting as it depends with aop.xml was used ...

Basically I need to use both aop.xml files, kinda of merging both contents of the aop.xml files...

How to do this? Ed

cb4
  • 6,689
  • 7
  • 45
  • 57
edbras
  • 4,145
  • 9
  • 41
  • 78

2 Answers2

3

When using AspectJ you can use the system property org.aspectj.weaver.loadtime.configuration to point to another config file. For example:

-Dorg.aspectj.weaver.loadtime.configuration=file:META-INF/myaop.xml
Vignesh Raja
  • 7,927
  • 1
  • 33
  • 42
Adriaan
  • 187
  • 1
  • 7
  • 2
    `-Dorg.aspectj.weaver.loadtime.configuration=file:META-INF/myaop.xml` [#](http://grepcode.com/file/repository.springsource.com/org.aspectj/com.springsource.org.aspectj.tools/1.6.6/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java#214) – o_nix Jan 10 '13 at 11:01
1

Duplicate of Load time weaving in AspectJ using aop.xml.

Furthermore, the AspectJ documentation says:

When several configuration files are visible from a given weaving class loader their contents are conceptually merged.

Community
  • 1
  • 1
Vincent
  • 1,035
  • 6
  • 14