From becb5d8d0b1624e5a48dd361a631b75a453017ff Mon Sep 17 00:00:00 2001 From: vmassol Date: Sat, 27 Dec 2003 13:11:25 +0000 Subject: [PATCH] - Ok, I think I now better understand how AW works. The plugin should be in a workable state for attribdef style. It has not been fully tested for xmldef style yet. - The next step is probably to add support for executing java applications using the different AW bootstrapping mechanisms git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114510 13f79535-47bb-0310-9956-ffa450edef68 --- aspectwerkz/plugin.jelly | 179 +++++++++++++----- aspectwerkz/plugin.properties | 46 ++++- aspectwerkz/src/plugin-test/maven.xml | 2 +- .../src/plugin-test/project.properties | 5 +- aspectwerkz/xdocs/goals.xml | 9 +- aspectwerkz/xdocs/properties.xml | 92 ++++++++- 6 files changed, 264 insertions(+), 69 deletions(-) diff --git a/aspectwerkz/plugin.jelly b/aspectwerkz/plugin.jelly index 6cbca4e4..d30deff0 100644 --- a/aspectwerkz/plugin.jelly +++ b/aspectwerkz/plugin.jelly @@ -3,6 +3,13 @@ + + + + + + + + + + Valid values for [maven.aspectwerkz.mode] are [xmldef] and [attribdef] only. + + + @@ -30,72 +57,134 @@ + description="Compile AspectWerkz javadoc attributes (xml-defined aspects)"> - + + + - + - + - - - - - - - - + + + + + + + + - - - - - + + + + + - + + + - + - - - + + - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + - + + + diff --git a/aspectwerkz/plugin.properties b/aspectwerkz/plugin.properties index 63ce2b04..53f1ea84 100644 --- a/aspectwerkz/plugin.properties +++ b/aspectwerkz/plugin.properties @@ -1,22 +1,52 @@ +#============================================================================ +# Properties for the AspectWerkz plugin for Maven +# =========================================================================== + +# 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". +maven.aspectwerkz.mode = attribdef + # Location of AW sources maven.aspectwerkz.src.dir = ${basedir}/src/main -# Location of the AW XML definition file that will be created by the -# attribute compilation (when calling ). -maven.aspectwerkz.build.definition.file = ${maven.build.dir}/aspectwerkz.xml +# Location where weaved classes will be generated. +maven.aspectwerkz.build.dir = ${maven.build.dest} # Decide whether definition validation is turned on or off. maven.aspectwerkz.definition.validate = false -maven.aspectwerkz.definition.file = ${maven.aspectwerkz.build.definition.file} +# Verbose mode +maven.aspectwerkz.verbose = false +#---------------------------------------------------------------------------- +# attribdef mode properties +# --------------------------------------------------------------------------- + +# Location of the XML definition file. +maven.aspectwerkz.definition.file.src = ${basedir}/conf/aspectwerkz.xml + +#---------------------------------------------------------------------------- +# xmldef mode properties +# --------------------------------------------------------------------------- + +# Location of the AW XML definition file that will be created by the +# attribute compilation (when calling ). This is only +# used in "xmldef" mode. +maven.aspectwerkz.definition.file.build = ${maven.build.dir}/aspectwerkz.xml + +# TODO: explain property here maven.aspectwerkz.transform.filter = no -maven.aspectwerkz.transform.verbose = no # (optional). Definition file to be merged with the main definition file. -# Used by the goal. -# maven.aspectwerkz.definition.merge.file = +# Used by the goal. Only for "xmldef" mode. +# maven.aspectwerkz.definition.file.merge = # (optional). UUID to use. If not specified a default one will be automatically -# generated. Used by the goal. +# generated. Used by the goal. Only for "xmldef" mode. # maven.aspectwerkz.uuid = diff --git a/aspectwerkz/src/plugin-test/maven.xml b/aspectwerkz/src/plugin-test/maven.xml index bc0bacbf..2ea6ae84 100644 --- a/aspectwerkz/src/plugin-test/maven.xml +++ b/aspectwerkz/src/plugin-test/maven.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/aspectwerkz/src/plugin-test/project.properties b/aspectwerkz/src/plugin-test/project.properties index 8baa0290..bf03a41c 100644 --- a/aspectwerkz/src/plugin-test/project.properties +++ b/aspectwerkz/src/plugin-test/project.properties @@ -2,7 +2,4 @@ # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- -maven.aspectwerkz.uuid = test -maven.aspectwerkz.definition.merge.file = ${basedir}/conf/aspectwerkz.xml -maven.aspectwerkz.definition.validate = true -maven.aspectwerkz.transform.verbose = yes +maven.aspectwerkz.verbose = true diff --git a/aspectwerkz/xdocs/goals.xml b/aspectwerkz/xdocs/goals.xml index 6d18f9d3..33e2a267 100644 --- a/aspectwerkz/xdocs/goals.xml +++ b/aspectwerkz/xdocs/goals.xml @@ -10,13 +10,16 @@ aspectwerkz:attributec - Compile AspectWerkz javadoc attributes. + Compile AspectWerkz javadoc attributes for xml-defined aspects + (i.e. maven.aspectwerkz.mode = xmldef). - aspectwerkz:transform + aspectwerkz:weave - Weaves aspects on byte code (offline mode). + Weave aspects at build time (offline mode). Works for both "xmldef" + (maven.aspectwerkz.mode = xmldef) and "attribdef" + (maven.aspectwerkz.mode = attribdef) modes. diff --git a/aspectwerkz/xdocs/properties.xml b/aspectwerkz/xdocs/properties.xml index 1b3bf94e..cd87b092 100644 --- a/aspectwerkz/xdocs/properties.xml +++ b/aspectwerkz/xdocs/properties.xml @@ -6,29 +6,51 @@ Vincent Massol -
+
+ + + + + - + @@ -40,7 +62,54 @@ - + + + + +
Property Optional? Description
maven.aspectwerkz.modeYes + 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.src.dir Yes Location of aspect sources. Default location is - ${basedir}/src/aspectwerkz. + ${basedir}/src/main.
maven.aspectwerkz.build.definition.filemaven.aspectwerkz.build.dir Yes - Location of the AW XML definition file that will be created by the - attribute compilation (when calling the - aspectwerkz:attributeC goal). Defaults to - ${maven.build.dir}/aspectwerkz.xml. + Location where weaved classes will be generated. Default to + ${maven.build.dest}.
maven.aspectwerkz.definition.merge.filemaven.aspectwerkz.verboseYes + Decide whether to use verbose output or not during execution of + this plugin's goals. Defaults to false. +
+
+ +
+ + + + + + + + + + + +
PropertyOptional?Description
maven.aspectwerkz.definition.file.srcYes + Location of the XML definition file. Default to + ${basedir}/conf/aspectwerkz.xml. +
+
+ +
+ + + + + + + + + + + + + + + + + +
PropertyOptional?Description
maven.aspectwerkz.definition.file.buildYes + 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. @@ -55,6 +124,13 @@ automatically generated. This property is not defined by default.
maven.aspectwerkz.transform.filterYes + TODO: explain property here. Defaults to no. +