Apache Maven 1.x has reached its end of life, and is no longer supported. For more information, see the announcement. Users are encouraged to migrate to the current version of Apache Maven.

Weaving aspect libraries

It is possible to specify aspect libraries that will be weaved to the main source code. For example:


AspectWerkz generic properties

Property Optional? Description
maven.aspectwerkz.mode Yes AW supports 2 types of Aspects/Advice/Pointcuts definition:
  • xmldef: Advice are defined as extending *Advice classes (BeforeAdvice, AroundAdvice, etc). Custom javadoc attributes can be used to link code to weave with advices.
  • attribdef: Advices and pcds are defined purely using custom javadoc attributes (@Execute, @Aspect, etc).
You need to tell the plugin how you have defined your AW Aspects/Advices/Pointcuts. The 2 valid values are xmldef and attribdef. The default value is attribdef.
maven.aspectwerkz.weave.build.dir Yes Location where weaved classes will be generated. Default to ${maven.build.dest}.
maven.aspectwerkz.definition.validate Yes Decide whether definition validation is turned on or off. Defaults to false.
maven.aspectwerkz.verbose Yes Decide whether to use verbose output or not during execution of this plugin's goals. Defaults to false.
maven.aspectwerkz.src.dir Yes Location of non-production aspect source files. The AW plugin looks for source files in ${pom.sourceDirectory}. It also supports all source directories added to the ${maven.compile.src.set} Ant path variable. Moreover, if you wish to keep non-production aspects in a specific directory, you can define the maven.aspectwerkz.src.dir property. Defaults to maven.aspectwerkz.src.dir = ${basedir}/src/aspectwerkz.
maven.aspectwerkz.build.dest Yes Location where non-production aspect classes will be compiled to. These are the classes defined by ${maven.aspectwerkz.src.dir}. Defaults to maven.aspectwerkz.build.dest = ${maven.build.dir}/aspectwerkz/classes.
maven.aspectwerkz.classloader.preprocessor Yes Classloader to use for class files weaving. Defaults to org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor.

AspectWerkz properties specific to 'attribdef' mode

Property Optional? Description
maven.aspectwerkz.definition.file.src Yes Location of the XML definition file. Default to ${basedir}/conf/aspectwerkz.xml.
maven.aspectwerkz.aspectc.build.dir Yes Location where aspectc results will be generated. Defaults to ${maven.build.dir}/aspectwerkz/aspectc.

AspectWerkz properties specific to 'xmldef' mode

Property Optional? Description
maven.aspectwerkz.definition.file.build Yes Location of the AW XML definition file that will be created by the attribute compilation (when calling the aspectwerkz:attributec goal). This is only used in xmldef mode. Defaults to ${maven.build.dir}/aspectwerkz.xml.
maven.aspectwerkz.definition.file.merge Yes Definition file to be merged with the main definition file. This property is not defined by default.
maven.aspectwerkz.uuid Yes UUID to use. If not specified a default one will be automatically generated. This property is not defined by default.
maven.aspectwerkz.transform.filter Yes If set to "no", prevents org.codehaus.aspectwerkz and related classes (jexl, trove, dom4j...) from being instrumented. Defaults to no.