Class XAjcCompileMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="compile",
          defaultPhase=COMPILE,
          requiresDependencyResolution=COMPILE,
          threadSafe=true)
    public class XAjcCompileMojo
    extends org.codehaus.mojo.aspectj.AjcCompileMojo
    Weaves all main classes and adds the PatternTesting aspect libraries. It extends the AspectJ Compiler Plugin.
    Since:
    1.1 (10.01.2011)
    Author:
    oliver
    • Field Summary

      • Fields 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

      Constructors 
      Constructor Description
      XAjcCompileMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Before we can call the execute method of the super class we must prepare some parameters.
      java.lang.String getAjcOption​(java.lang.String name)
      Looks in the ajcOptions for the given name.
      java.util.List<?> getAjcOptions()
      Gets the ajc compiler options.
      org.codehaus.mojo.aspectj.Module[] getAspectLibraries()
      Gets the aspect path.
      java.lang.String getComplianceLevel()
      Gets the complianceLevel.
      java.lang.String getSource()
      Gets the source level.
      java.lang.String getTarget()
      Gets the target level.
      java.lang.String getXlint()
      Gets the value of the Xlint flag.
      void setComplianceLevel​(java.lang.String level)
      Sets the compliance level.
      void setSource​(java.lang.String level)
      Sets the source level.
      void setTarget​(java.lang.String level)
      Sets the target level.
      void setXlint​(java.lang.String value)
      Sets the value for the Xlint option.
      • Methods inherited from class org.codehaus.mojo.aspectj.AjcCompileMojo

        getAdditionalAspectPaths, getClasspathDirectories, getGeneratedSourcesDirectory, getJavaSources, getOutputDirectory, getSourceDirectories
      • Methods inherited from class org.codehaus.mojo.aspectj.AbstractAjcCompiler

        assembleArguments, getIncludedSources, isBuildNeeded, setArgumentFileName, setBootClassPath, setCrossrefs, setDeprecation, setEmacssym, setEncoding, setNoImportError, setOutxml, setOutxmlfile, setParameters, setPreserveAllLocals, setProceedOnError, setReferenceInfo, setRepeat, setShowWeaveInfo, setVerbose, setWarn, setXaddSerialVersionUID, setXajruntimetarget, setXhasMember, setXjoinpoints, 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XAjcCompileMojo

        public XAjcCompileMojo()
    • Method Detail

      • setComplianceLevel

        public void setComplianceLevel​(java.lang.String level)
        Sets the compliance level.
        Overrides:
        setComplianceLevel in class org.codehaus.mojo.aspectj.AbstractAjcCompiler
        Parameters:
        level - e.g. "1.5" for Java 5
      • getComplianceLevel

        public java.lang.String getComplianceLevel()
        Gets the complianceLevel.
        Returns:
        the complianceLevel level, e.g. "1.5" (for Java 5)
      • setTarget

        public void setTarget​(java.lang.String level)
        Sets the target level.
        Overrides:
        setTarget in class org.codehaus.mojo.aspectj.AbstractAjcCompiler
        Parameters:
        level - e.g. "1.5" for Java 5
      • getTarget

        public java.lang.String getTarget()
        Gets the target level.
        Returns:
        the target level, e.g. "1.5" (for Java 5)
      • setSource

        public void setSource​(java.lang.String level)
        Sets the source level.
        Overrides:
        setSource in class org.codehaus.mojo.aspectj.AbstractAjcCompiler
        Parameters:
        level - e.g. "1.5" for Java 5
      • getSource

        public java.lang.String getSource()
        Gets the source level.
        Returns:
        the source level, e.g. "1.5" (for Java 5)
      • getAjcOptions

        public java.util.List<?> getAjcOptions()
        Gets the ajc compiler options.
        Returns:
        the ajc options
      • getAjcOption

        public java.lang.String getAjcOption​(java.lang.String name)
        Looks in the ajcOptions for the given name.
        Parameters:
        name - the name e.g. "source"
        Returns:
        the ajc option e.g. "1.5"
      • getAspectLibraries

        public org.codehaus.mojo.aspectj.Module[] getAspectLibraries()
        Gets the aspect path.
        Returns:
        the aspect path as file list
      • setXlint

        public void setXlint​(java.lang.String value)
        Sets the value for the Xlint option.
        Overrides:
        setXlint in class org.codehaus.mojo.aspectj.AbstractAjcCompiler
        Parameters:
        value - allowed: "ignore", "warning" or "error"
        See Also:
        AbstractAjcCompiler.setXlint(java.lang.String)
      • getXlint

        public java.lang.String getXlint()
        Gets the value of the Xlint flag.
        Returns:
        "ignore", "warning" or "error"
      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Before we can call the execute method of the super class we must prepare some parameters.
        Specified by:
        execute in interface org.apache.maven.plugin.Mojo
        Overrides:
        execute in class org.codehaus.mojo.aspectj.AbstractAjcCompiler
        Throws:
        org.apache.maven.plugin.MojoExecutionException - the mojo execution exception
        See Also:
        AbstractAjcCompiler.execute()