aspectj:compile

Full name:

org.codehaus.mojo:aspectj-maven-plugin:1.3:compile

Description:

Weaves all main classes.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Binds by default to the lifecycle phase: compile.

Optional Parameters

Name Type Since Description
XaddSerialVersionUID boolean - Causes the compiler to calculate and add the SerialVersionUID field to any type implementing Serializable that is affected by an aspect. The field is calculated based on the class before weaving has taken place.
XhasMember boolean 1.3 Enables the compiler to support hasmethod(method_pattern) and hasfield(field_pattern) type patterns, but only within declare statements. It's experimental and undocumented because it may change, and because it doesn't yet take into account ITDs.
Xlint String - Set default level for messages about potential programming mistakes in crosscutting code. {level} may be ignore, warning, or error. This overrides entries in org/aspectj/weaver/XlintDefault.properties from aspectjtools.jar.
XnoInline boolean - (Experimental) do not inline around advice
Xreweavable boolean - (Experimental) runs weaver in reweavable mode which causes it to create woven classes that can be rewoven, subject to the restriction that on attempting a reweave all the types that advised the woven type must be accessible.
XserializableAspects boolean - (Experimental) Normally it is an error to declare aspects Serializable. This option removes that restriction.
ajdtBuildDefFile String - Where to find the ajdt build definition file. If set this will override the use of project sourcedirs.
argumentFileName String - The filename to store build configuration in. This file will be placed in the project build output directory, and will contain all the arguments passed to the compiler in the last run, and also all the filenames included in the build. Aspects as well as java files.
Default value is: builddef.lst.
aspectDirectory String - The source directory for the aspects
Default value is: src/main/aspect.
aspectLibraries Module[] - Weave binary aspects from the jars. The aspects should have been output by the same version of the compiler. The modules must also be dependencies of the project. Corresponds to ajc -aspectpath option
bootclasspath String - Override location of VM's bootclasspath for purposes of evaluating types when compiling. Path is a single argument containing a list of paths to zip files or directories, delimited by the platform-specific path delimiter.
complianceLevel String - Specify compiler compliance setting (1.3 to 1.6) default is 1.4
deprecation boolean - Toggle warningmessages on deprecations
emacssym boolean - Generate .ajesym symbol files for emacs support
encoding String - Specify default source encoding format.
excludes String[] - List of ant-style patterns used to specify the aspects that should be excluded when compiling. When none specified all .java and .aj files in the project source directories, or directories spesified by the ajdtDefFile property are included.
forceAjcCompile boolean - Forces re-compilation, regardless of whether the compiler arguments or the sources have changed.
includes String[] - List of ant-style patterns used to specify the aspects that should be included when compiling. When none specified all .java and .aj files in the project source directories, or directories spesified by the ajdtDefFile property are included.
noImportError boolean - Emit no errors for unresolved imports;
outxml boolean - Generate aop.xml file for load-time weaving with default name.(/META-INF/aop.xml)
outxmlfile String - Generate aop.xml file for load-time weaving with custom name.
preserveAllLocals boolean - Preserve all local variables during code generation (to facilitate debugging).
proceedOnError boolean - Keep compiling after error, dumping class files with problem methods
referenceInfo boolean - Compute reference information.
repeat int - Repeat compilation process N times (typically to do performance analysis).
showWeaveInfo boolean - Emit messages about weaving
source String - Toggle assertions (1.3, 1.4, or 1.6 - default is 1.4). When using -source 1.3, an assert() statement valid under Java 1.4 will result in a compiler error. When using -source 1.4, treat assert as a keyword and implement assertions according to the 1.4 language spec. When using -source 1.5 or higher, Java 5 language features are permitted.
Default value is: ${project.build.java.target}.
target String - Specify classfile target setting (1.1 to 1.6) default is 1.2
Default value is: ${project.build.java.target}.
testAspectDirectory String - The source directory for the test aspects
Default value is: src/test/aspect.
verbose boolean - Emit messages about accessed/processed compilation units
warn String - Emit warnings for any instances of the comma-delimited list of questionable code (eg 'unusedLocals,deprecation'): see http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html#ajc for available settings
weaveDependencies Module[] - List of of modules to weave (into target directory). Corresponds to ajc -inpath option (or -injars for pre-1.2 (which is not supported)).

Parameter Details

XaddSerialVersionUID:

Causes the compiler to calculate and add the SerialVersionUID field to any type implementing Serializable that is affected by an aspect. The field is calculated based on the class before weaving has taken place.
  • Type: boolean
  • Required: No

XhasMember:

Enables the compiler to support hasmethod(method_pattern) and hasfield(field_pattern) type patterns, but only within declare statements. It's experimental and undocumented because it may change, and because it doesn't yet take into account ITDs.
  • Type: boolean
  • Since: 1.3
  • Required: No

Xlint:

Set default level for messages about potential programming mistakes in crosscutting code. {level} may be ignore, warning, or error. This overrides entries in org/aspectj/weaver/XlintDefault.properties from aspectjtools.jar.
  • Type: java.lang.String
  • Required: No

XnoInline:

(Experimental) do not inline around advice
  • Type: boolean
  • Required: No

Xreweavable:

(Experimental) runs weaver in reweavable mode which causes it to create woven classes that can be rewoven, subject to the restriction that on attempting a reweave all the types that advised the woven type must be accessible.
  • Type: boolean
  • Required: No

XserializableAspects:

(Experimental) Normally it is an error to declare aspects Serializable. This option removes that restriction.
  • Type: boolean
  • Required: No

ajdtBuildDefFile:

Where to find the ajdt build definition file. If set this will override the use of project sourcedirs.
  • Type: java.lang.String
  • Required: No

argumentFileName:

The filename to store build configuration in. This file will be placed in the project build output directory, and will contain all the arguments passed to the compiler in the last run, and also all the filenames included in the build. Aspects as well as java files.
  • Type: java.lang.String
  • Required: No
  • Default: builddef.lst

aspectDirectory:

The source directory for the aspects
  • Type: java.lang.String
  • Required: No
  • Default: src/main/aspect

aspectLibraries:

Weave binary aspects from the jars. The aspects should have been output by the same version of the compiler. The modules must also be dependencies of the project. Corresponds to ajc -aspectpath option
  • Type: org.codehaus.mojo.aspectj.Module[]
  • Required: No

bootclasspath:

Override location of VM's bootclasspath for purposes of evaluating types when compiling. Path is a single argument containing a list of paths to zip files or directories, delimited by the platform-specific path delimiter.
  • Type: java.lang.String
  • Required: No

complianceLevel:

Specify compiler compliance setting (1.3 to 1.6) default is 1.4
  • Type: java.lang.String
  • Required: No

deprecation:

Toggle warningmessages on deprecations
  • Type: boolean
  • Required: No

emacssym:

Generate .ajesym symbol files for emacs support
  • Type: boolean
  • Required: No

encoding:

Specify default source encoding format.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.sourceEncoding}

excludes:

List of ant-style patterns used to specify the aspects that should be excluded when compiling. When none specified all .java and .aj files in the project source directories, or directories spesified by the ajdtDefFile property are included.
  • Type: java.lang.String[]
  • Required: No

forceAjcCompile:

Forces re-compilation, regardless of whether the compiler arguments or the sources have changed.
  • Type: boolean
  • Required: No

includes:

List of ant-style patterns used to specify the aspects that should be included when compiling. When none specified all .java and .aj files in the project source directories, or directories spesified by the ajdtDefFile property are included.
  • Type: java.lang.String[]
  • Required: No

noImportError:

Emit no errors for unresolved imports;
  • Type: boolean
  • Required: No

outxml:

Generate aop.xml file for load-time weaving with default name.(/META-INF/aop.xml)
  • Type: boolean
  • Required: No

outxmlfile:

Generate aop.xml file for load-time weaving with custom name.
  • Type: java.lang.String
  • Required: No

preserveAllLocals:

Preserve all local variables during code generation (to facilitate debugging).
  • Type: boolean
  • Required: No

proceedOnError:

Keep compiling after error, dumping class files with problem methods
  • Type: boolean
  • Required: No

referenceInfo:

Compute reference information.
  • Type: boolean
  • Required: No

repeat:

Repeat compilation process N times (typically to do performance analysis).
  • Type: int
  • Required: No

showWeaveInfo:

Emit messages about weaving
  • Type: boolean
  • Required: No

source:

Toggle assertions (1.3, 1.4, or 1.6 - default is 1.4). When using -source 1.3, an assert() statement valid under Java 1.4 will result in a compiler error. When using -source 1.4, treat assert as a keyword and implement assertions according to the 1.4 language spec. When using -source 1.5 or higher, Java 5 language features are permitted.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.java.target}

target:

Specify classfile target setting (1.1 to 1.6) default is 1.2
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.java.target}

testAspectDirectory:

The source directory for the test aspects
  • Type: java.lang.String
  • Required: No
  • Default: src/test/aspect

verbose:

Emit messages about accessed/processed compilation units
  • Type: boolean
  • Required: No

warn:

Emit warnings for any instances of the comma-delimited list of questionable code (eg 'unusedLocals,deprecation'): see http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html#ajc for available settings
  • Type: java.lang.String
  • Required: No

weaveDependencies:

List of of modules to weave (into target directory). Corresponds to ajc -inpath option (or -injars for pre-1.2 (which is not supported)).
  • Type: org.codehaus.mojo.aspectj.Module[]
  • Required: No