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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected booleanFlag to indicate if the main source dirs should be a part of the compile process.protected booleanFlag 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, XterminateAfterCompilationFields inherited from class org.codehaus.mojo.aspectj.AbstractAjcMojo
aspectLibraries, basedir, project, weaveDependencies, weaveDirectories, xmlConfiguredFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Do the AspectJ compiling.protected StringAbstract 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 FileThe 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, setXterminateAfterCompilationMethods inherited from class org.codehaus.mojo.aspectj.AbstractAjcMojo
isSkip, setXmlConfiguredMethods 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:AbstractAjcCompilerDo the AspectJ compiling.- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractAjcCompiler- Throws:
org.apache.maven.plugin.MojoExecutionException- if arguments file cannot be written
-
getClasspathDirectories
Description copied from class:AbstractAjcCompilerAbstract method used by child classes to specify the correct output directory for compiled classes.- Specified by:
getClasspathDirectoriesin classAbstractAjcCompiler- Returns:
- the directories containing compiled classes.
-
getOutputDirectory
Description copied from class:AbstractAjcCompilerThe directory where compiled classes go.- Specified by:
getOutputDirectoryin classAbstractAjcCompiler- Returns:
- the outputDirectory
-
getGeneratedSourcesDirectory
Description copied from class:AbstractAjcCompilerThe directory for sources generated by annotation processing.- Specified by:
getGeneratedSourcesDirectoryin classAbstractAjcCompiler- Returns:
- the generatedSourcesDirectory
-
getSourceDirectories
Description copied from class:AbstractAjcCompilerAbstract method used by child classes to specify the correct source directory for classes.- Specified by:
getSourceDirectoriesin classAbstractAjcCompiler- Returns:
- where sources may be found.
-
getJavaSources
protected org.codehaus.plexus.util.Scanner[] getJavaSources()- Specified by:
getJavaSourcesin classAbstractAjcCompiler
-
getAdditionalAspectPaths
Description copied from class:AbstractAjcCompilerAbstract method used by child classes to specify additional aspect paths.- Specified by:
getAdditionalAspectPathsin classAbstractAjcCompiler- Returns:
- the additional aspect paths
-