Class 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 Detail

      • MAVEN_TEST_SKIP

        protected static final java.lang.String MAVEN_TEST_SKIP
        See Also:
        Constant Field Values
      • weaveMainSourceFolder

        @Parameter(defaultValue="false")
        protected boolean weaveMainSourceFolder
        Flag 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 weaveWithAspectsInMainSourceFolder
        Flag to indicate if aspects in the the main source dirs should be a part of the compile process
    • Constructor Detail

      • AjcTestCompileMojo

        public AjcTestCompileMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Description copied from class: AbstractAjcCompiler
        Do the AspectJ compiling.
        Specified by:
        execute in interface org.apache.maven.plugin.Mojo
        Overrides:
        execute in class AbstractAjcCompiler
        Throws:
        org.apache.maven.plugin.MojoExecutionException - if arguments file cannot be written
      • getClasspathDirectories

        protected java.util.List<java.lang.String> 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 class AbstractAjcCompiler
        Returns:
        the directories containing compiled classes.
      • getSourceDirectories

        protected java.util.List<java.lang.String> getSourceDirectories()
        Description copied from class: AbstractAjcCompiler
        Abstract method used by child classes to specify the correct source directory for classes.
        Specified by:
        getSourceDirectories in class AbstractAjcCompiler
        Returns:
        where sources may be found.
      • getAdditionalAspectPaths

        protected java.lang.String getAdditionalAspectPaths()
        Description copied from class: AbstractAjcCompiler
        Abstract method used by child classes to specify additional aspect paths.
        Specified by:
        getAdditionalAspectPaths in class AbstractAjcCompiler
        Returns:
        the additional aspect paths