[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] load-time-weaving with maven aspectj plugin


We use maven+aspectj, but we create the aop.xml file manually.
Here are some pointers for you (change env variables as necessary):

1. Add the aop.xml file to your project in the src/main/resources/META-INF directory.

2. Add the following plugin definition to your pom.xml file:


3. For unit tests also add the following plugin:

        <argLine>-javaagent:${basedir}/../lib/aspectjweaver-${aspectj.version}.jar ${debug}</argLine>

4. Add the following dependency to your pom.xml file:


4. Not part of maven, but make sure you add the following command line option to the java executable when you launch your app:


5. Also make sure your jar containing your aspects are in the classpath.

- Ashley

-----aspectj-users-bounces@xxxxxxxxxxx wrote: -----

>To: aspectj-users@xxxxxxxxxxx
>From: manuel aldana <aldana@xxxxxx>
>Sent by: aspectj-users-bounces@xxxxxxxxxxx
>Date: 06/16/2008 08:57AM
>Subject: [aspectj-users] load-time-weaving with maven aspectj plugin
>am posting to this list because most likely one of you is using maven
>aspectj plugin. my current problem is that enabling load-time-weaving
>with aspectj-plugin does not work properly. i tried out to enable 
>load-time weaving and to use the aop.xml generation capability of 
>aspectj-maven-plugin, but still following happens:
>-plugin still tries to do compile weaving
>-aop.xml does not get generated (though <outputxml>true</outputxml>
>so how do i achieve that load-time weaving is enabled, i.e. aop.xml
>generated (with defining certain source-aspect-libraries and 
>target-libraries) and further more compile weaving is switched off?
> manuel aldana
> aldana@xxxxxx
> software-engineering blog: www.aldana-online.de
>aspectj-users mailing list

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.