Package org.codehaus.mojo.aspectj
Class AjcTestCompileMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.aspectj.AbstractAjcMojo
org.codehaus.mojo.aspectj.AbstractAjcCompiler
org.codehaus.mojo.aspectj.AjcTestCompileMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="test-compile",
threadSafe=true,
defaultPhase=TEST_COMPILE,
requiresDependencyResolution=TEST)
public class AjcTestCompileMojo
extends AbstractAjcCompiler
Weaves all test classes.
AspectJ Compiler Plugin.
- Author:
- Kaare Nilsen
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected boolean
Flag to indicate if the main source dirs should be a part of the compile process.protected boolean
Flag to indicate if aspects in the the main source dirs should be a part of the compile processFields inherited from class org.codehaus.mojo.aspectj.AbstractAjcCompiler
additionalCompilerArgs, ajcOptions, ajdtBuildDefFile, argumentFileName, aspectDirectory, bootclasspath, complianceLevel, crossrefs, deprecation, emacssym, encoding, excludes, forceAjcCompile, includes, noImportError, outxml, outxmlfile, parameters, preserveAllLocals, proc, proceedOnError, referenceInfo, repeat, resolvedIncludes, showWeaveInfo, source, target, testAspectDirectory, verbose, warn, XaddSerialVersionUID, Xajruntimetarget, XAJRUNTIMETARGET_SUPPORTED_VALUES, XhasMember, Xjoinpoints, Xlint, Xlintfile, XnoInline, XnotReweavable, Xreweavable, XserializableAspects, Xset, XterminateAfterCompilation
Fields inherited from class org.codehaus.mojo.aspectj.AbstractAjcMojo
aspectLibraries, basedir, project, weaveDependencies, weaveDirectories, xmlConfigured
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Do the AspectJ compiling.protected String
Abstract method used by child classes to specify additional aspect paths.Abstract method used by child classes to specify the correct output directory for compiled classes.The directory for sources generated by annotation processing.protected org.codehaus.plexus.util.Scanner[]
protected File
The directory where compiled classes go.Abstract method used by child classes to specify the correct source directory for classes.Methods inherited from class org.codehaus.mojo.aspectj.AbstractAjcCompiler
assembleArguments, getIncludedSources, isBuildNeeded, setArgumentFileName, setBootClassPath, setComplianceLevel, setCrossrefs, setDeprecation, setEmacssym, setEncoding, setNoImportError, setOutxml, setOutxmlfile, setParameters, setPreserveAllLocals, setProceedOnError, setReferenceInfo, setRepeat, setShowWeaveInfo, setSource, setTarget, setVerbose, setWarn, setXaddSerialVersionUID, setXajruntimetarget, setXhasMember, setXjoinpoints, setXlint, setXlintfile, setXnoInline, setXnotReweavable, setXreweavable, setXserializableAspects, setXset, setXterminateAfterCompilation
Methods inherited from class org.codehaus.mojo.aspectj.AbstractAjcMojo
isSkip, setXmlConfigured
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
MAVEN_TEST_SKIP
- See Also:
-
weaveMainSourceFolder
@Parameter(defaultValue="false") protected boolean weaveMainSourceFolderFlag to indicate if the main source dirs should be a part of the compile process. Note! This will make all classes in main source dir appear in the test output dir also, potentially overwriting test resources. -
weaveWithAspectsInMainSourceFolder
@Parameter(defaultValue="true") protected boolean weaveWithAspectsInMainSourceFolderFlag to indicate if aspects in the the main source dirs should be a part of the compile process
-
-
Constructor Details
-
AjcTestCompileMojo
public AjcTestCompileMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractAjcCompiler
Do the AspectJ compiling.- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractAjcCompiler
- Throws:
org.apache.maven.plugin.MojoExecutionException
- if arguments file cannot be written
-
getClasspathDirectories
Description copied from class:AbstractAjcCompiler
Abstract method used by child classes to specify the correct output directory for compiled classes.- Specified by:
getClasspathDirectories
in classAbstractAjcCompiler
- Returns:
- the directories containing compiled classes.
-
getOutputDirectory
Description copied from class:AbstractAjcCompiler
The directory where compiled classes go.- Specified by:
getOutputDirectory
in classAbstractAjcCompiler
- Returns:
- the outputDirectory
-
getGeneratedSourcesDirectory
Description copied from class:AbstractAjcCompiler
The directory for sources generated by annotation processing.- Specified by:
getGeneratedSourcesDirectory
in classAbstractAjcCompiler
- Returns:
- the generatedSourcesDirectory
-
getSourceDirectories
Description copied from class:AbstractAjcCompiler
Abstract method used by child classes to specify the correct source directory for classes.- Specified by:
getSourceDirectories
in classAbstractAjcCompiler
- Returns:
- where sources may be found.
-
getJavaSources
protected org.codehaus.plexus.util.Scanner[] getJavaSources()- Specified by:
getJavaSources
in classAbstractAjcCompiler
-
getAdditionalAspectPaths
Description copied from class:AbstractAjcCompiler
Abstract method used by child classes to specify additional aspect paths.- Specified by:
getAdditionalAspectPaths
in classAbstractAjcCompiler
- Returns:
- the additional aspect paths
-