Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] How to make aop.xml configurable

1. So, does aop.xml need to be packed in a JAR (or any archive) always ?

Nope. By default it just needs to be in a META-INF folder. So META-INF/aop.xml can be just lying around on your filesystem (but the folder containing META-INF needs to be on the class path).


2. Is the below VM argument useful to identify and use aop XML present only in JAR (or any archive) files if there are more than one aop XML files available ?

-Dorg.aspectj.weaver.loadtime.configuration

You could use that. I am not very familiar with it but looking at the code it may work:

-Dorg.aspectj.weaver.loadtime.configuration=aop.xml

That takes a semicolon separated list of candidates to try. If the candidates start file: then we attempt to access directly as a file. If not then we attempt to access it on the class path.

Andy

On Jun 22, 2015, at 3:10 AM, sridhar thiyagarajan <sridharthiyagarajan@xxxxxxxxx> wrote:

Hello,

I am using AspectJ version 1.8.6 in my sample project AopTest (a JAR project) as the project structure is mentioned below:


<image.png>

I have a query on the place of aop.xml. Currently, I am packing aop.xml under resources/META-INF folder of the JAR project and the generated JAR works fine applying desired advices.

I want to move aop.xml out of JAR file to make aop.xml configurable. So, I placed aop.xml in the folder D:\workspacedummy and added the below VM argument to point to aop.xml but the file is not loaded and hence, there are no advices applied.

-Dorg.aspectj.weaver.loadtime.configuration=D:\workspacedummy\aop.xml


1. So, does aop.xml need to be packed in a JAR (or any archive) always ?


2. Is the below VM argument useful to identify and use aop XML present only in JAR (or any archive) files if there are more than one aop XML files available ?

-Dorg.aspectj.weaver.loadtime.configuration


Please help me to achieve making aop.xml configurable.

Many Thanks.

Sridhar Thiyagarajan

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top