public abstract class AbstractAjcCompiler extends AbstractAjcMojo
http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
ajcOptions
Holder for ajc compiler options
|
protected String |
ajdtBuildDefFile
Where to find the ajdt build definition file.
|
protected String |
argumentFileName
The filename holding AJC build arguments.
|
protected String |
aspectDirectory
The source directory for the aspects.
|
protected String |
bootclasspath
Override location of VM's bootclasspath for purposes of evaluating types when compiling.
|
protected String |
complianceLevel
Specify compiler compliance setting.
|
protected boolean |
crossrefs
generate .ajsym file into the output directory
|
protected boolean |
deprecation
Toggle warning messages on deprecations
|
protected boolean |
emacssym
Generate .ajesym symbol files for emacs support.
|
protected String |
encoding
Specify default source encoding format.
|
protected String[] |
excludes
List of ant-style patterns used to specify the aspects that should be excluded when compiling.
|
protected boolean |
forceAjcCompile
Forces re-compilation, regardless of whether the compiler arguments or the sources have changed.
|
protected String[] |
includes
List of ant-style patterns used to specify the aspects that should be included when compiling.
|
protected boolean |
noImportError
Emit no errors for unresolved imports;
|
protected boolean |
outxml
Generate aop.xml file for load-time weaving with default name (/META-INF/aop.xml).
|
protected String |
outxmlfile
Generate aop.xml file for load-time weaving with custom name.
|
protected boolean |
preserveAllLocals
Preserve all local variables during code generation (to facilitate debugging).
|
protected String |
proc
Set the compiler "proc" argument.
|
protected boolean |
proceedOnError
Keep compiling after error, dumping class files with problem methods
|
protected boolean |
referenceInfo
Compute reference information.
|
protected int |
repeat
Repeat compilation process N times (typically to do performance analysis).
|
protected Set<String> |
resolvedIncludes
Holds all files found using the includes, excludes parameters.
|
protected boolean |
showWeaveInfo
Emit messages about weaving
|
protected String |
source
Toggle assertions (1.3, 1.4, 1.5, 1.6, 1.7 or 1.8 - default is 1.4).
|
protected String |
target
Specify classfile target setting (1.1 to 1.8) default is 1.2
|
protected String |
testAspectDirectory
The source directory for the test aspects.
|
protected boolean |
verbose
Emit messages about accessed/processed compilation units
|
protected String |
warn
Emit warnings for any instances of the comma-delimited list of questionable code.
|
protected boolean |
XaddSerialVersionUID
Causes the compiler to calculate and add the SerialVersionUID field to any type implementing
Serializable that is
affected by an aspect. |
protected String |
Xajruntimetarget
(Experimental) Allows code to be generated that targets a 1.2 or a 1.5 level AspectJ runtime (default 1.5)
|
static List<String> |
XAJRUNTIMETARGET_SUPPORTED_VALUES
List holding all accepted values for the
Xajruntimetarget parameter. |
protected boolean |
XhasMember
Enables the compiler to support hasmethod(method_pattern) and hasfield(field_pattern) type patterns, but only
within declare statements.
|
protected String |
Xjoinpoints
supply a comma separated list of new joinpoints
that can be identified by pointcuts.
|
protected String |
Xlint
Set default level for messages about potential programming mistakes in crosscutting code.
|
protected File |
Xlintfile
Specify properties file to set levels for specific crosscutting messages.
|
protected boolean |
XnoInline
(Experimental) do not inline around advice
|
protected boolean |
XnotReweavable
(Experimental) Create class files that can't be subsequently rewoven by AspectJ.
|
protected boolean |
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.
|
protected boolean |
XserializableAspects
(Experimental) Normally it is an error to declare aspects
Serializable. |
protected Map<String,String> |
Xset
Allows the caller to provide additional arguments in a Map format.
|
protected boolean |
XterminateAfterCompilation
Causes compiler to terminate before weaving
|
aspectLibraries, basedir, project, weaveDependencies, weaveDirectories, xmlConfigured| Constructor and Description |
|---|
AbstractAjcCompiler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assembleArguments()
Assembles a complete ajc compiler arguments list.
|
void |
execute()
Do the AspectJ compiling.
|
protected abstract String |
getAdditionalAspectPaths()
Abstract method used by child classes to specify additional aspect paths.
|
protected abstract List<String> |
getClasspathDirectories()
Abstract method used by child classes to specify the correct output directory for compiled classes.
|
protected Set<String> |
getIncludedSources() |
protected abstract org.codehaus.plexus.util.Scanner[] |
getJavaSources() |
protected abstract File |
getOutputDirectory()
The directory where compiled classes go.
|
protected abstract List<String> |
getSourceDirectories()
Abstract method used by child classes to specify the correct source directory for classes.
|
protected boolean |
isBuildNeeded()
Checks modifications that would make us need a build
|
void |
setArgumentFileName(String argumentFileName) |
void |
setBootClassPath(String bootclasspath) |
void |
setComplianceLevel(String complianceLevel)
Setters which when called sets compiler arguments
|
void |
setCrossrefs(boolean crossrefs) |
void |
setDeprecation(boolean deprecation) |
void |
setEmacssym(boolean emacssym) |
void |
setEncoding(String encoding) |
void |
setNoImportError(boolean noImportError) |
void |
setOutxml(boolean outxml) |
void |
setOutxmlfile(String outxmlfile) |
void |
setPreserveAllLocals(boolean preserveAllLocals) |
void |
setProceedOnError(boolean proceedOnError) |
void |
setReferenceInfo(boolean referenceInfo) |
void |
setRepeat(int repeat) |
void |
setShowWeaveInfo(boolean showWeaveInfo) |
void |
setSource(String source) |
void |
setTarget(String target) |
void |
setVerbose(boolean verbose) |
void |
setWarn(String warn) |
void |
setXaddSerialVersionUID(boolean xaddSerialVersionUID) |
void |
setXajruntimetarget(String xajruntimetarget) |
void |
setXhasMember(boolean xhasMember) |
void |
setXjoinpoints(String xjoinpoints) |
void |
setXlint(String xlint) |
void |
setXlintfile(File xlintfile) |
void |
setXnoInline(boolean xnoInline) |
void |
setXnotReweavable(boolean xnotReweavable) |
void |
setXreweavable(boolean xreweavable) |
void |
setXserializableAspects(boolean xserializableAspects) |
void |
setXset(Map<String,String> xset) |
void |
setXterminateAfterCompilation(boolean xterminateAfterCompilation) |
isSkip, setXmlConfiguredpublic static final List<String> XAJRUNTIMETARGET_SUPPORTED_VALUES
Xajruntimetarget parameter.@Parameter(defaultValue="src/main/aspect") protected String aspectDirectory
@Parameter(defaultValue="src/test/aspect") protected String testAspectDirectory
@Parameter protected String[] includes
@Parameter protected String[] excludes
@Parameter protected String ajdtBuildDefFile
@Parameter protected boolean outxml
@Parameter protected String outxmlfile
@Parameter protected boolean emacssym
@Parameter protected String proc
proc:none.@Parameter protected Map<String,String> Xset
<configuration>
<Xset>
<overWeaving>true</overWeaving>
<avoidFinal>false</avoidFinal>
</Xset>
</configuration>
@Parameter protected boolean crossrefs
@Parameter protected String Xlint
@Parameter protected File Xlintfile
@Parameter protected boolean XhasMember
@Parameter(defaultValue="${project.build.java.target}")
protected String target
@Parameter(defaultValue="${mojo.java.target}")
protected String source
@Parameter(defaultValue="1.4") protected String complianceLevel
@Parameter protected boolean deprecation
@Parameter protected boolean noImportError
@Parameter protected boolean proceedOnError
@Parameter protected boolean preserveAllLocals
@Parameter protected boolean referenceInfo
@Parameter(property="project.build.sourceEncoding") protected String encoding
@Parameter protected boolean verbose
@Parameter protected boolean showWeaveInfo
@Parameter protected int repeat
@Parameter protected boolean Xreweavable
@Parameter protected boolean XnotReweavable
@Parameter protected boolean XnoInline
@Parameter protected boolean XserializableAspects
Serializable. This option removes that restriction.@Parameter protected boolean XaddSerialVersionUID
Serializable that is
affected by an aspect. The field is calculated based on the class before weaving has taken place.@Parameter protected boolean XterminateAfterCompilation
@Parameter(defaultValue="1.5") protected String Xajruntimetarget
@Parameter protected String Xjoinpoints
@Parameter protected String bootclasspath
@Parameter protected String warn
@Parameter(defaultValue="builddef.lst") protected String argumentFileName
-1.6
-encoding
UTF-8
-classpath
/Users/lj/Development/Projects/Nazgul/nazgul_tools/validation/validation-api/target/nazgul-tools-validation-api-2.0.10-SNAPSHOT.jar:/Users/lj/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar:/Users/lj/.m2/repository/org/aspectj/aspectjrt/1.7.3/aspectjrt-1.7.3.jar:/Users/lj/.m2/repository/junit/junit/4.11/junit-4.11.jar:/Users/lj/.m2/repository/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar:/Users/lj/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar:/Users/lj/Development/Projects/Nazgul/nazgul_tools/validation/validation-aspect/target/classes
-d
/Users/lj/Development/Projects/Nazgul/nazgul_tools/validation/validation-aspect/target/classes
/Users/lj/Development/Projects/Nazgul/nazgul_tools/validation/validation-aspect/src/main/java/se/jguru/nazgul/tools/validation/aspect/ValidationAspect.java
@Parameter(defaultValue="false") protected boolean forceAjcCompile
protected abstract List<String> getClasspathDirectories()
protected abstract File getOutputDirectory()
protected abstract List<String> getSourceDirectories()
protected abstract org.codehaus.plexus.util.Scanner[] getJavaSources()
protected abstract String getAdditionalAspectPaths()
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void assembleArguments()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - error in configurationprotected Set<String> getIncludedSources() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected boolean isBuildNeeded()
throws org.apache.maven.plugin.MojoExecutionException
true if build is needed, otherwise falseorg.apache.maven.plugin.MojoExecutionExceptionpublic void setComplianceLevel(String complianceLevel)
complianceLevel - the complianceLevelpublic void setDeprecation(boolean deprecation)
public void setEmacssym(boolean emacssym)
public void setCrossrefs(boolean crossrefs)
public void setEncoding(String encoding)
public void setNoImportError(boolean noImportError)
public void setOutxml(boolean outxml)
public void setOutxmlfile(String outxmlfile)
public void setPreserveAllLocals(boolean preserveAllLocals)
public void setProceedOnError(boolean proceedOnError)
public void setReferenceInfo(boolean referenceInfo)
public void setRepeat(int repeat)
public void setShowWeaveInfo(boolean showWeaveInfo)
public void setTarget(String target)
public void setSource(String source)
public void setVerbose(boolean verbose)
public void setXhasMember(boolean xhasMember)
public void setXlint(String xlint)
public void setXlintfile(File xlintfile)
public void setXnoInline(boolean xnoInline)
public void setXreweavable(boolean xreweavable)
public void setXnotReweavable(boolean xnotReweavable)
public void setXserializableAspects(boolean xserializableAspects)
public void setXaddSerialVersionUID(boolean xaddSerialVersionUID)
public void setXterminateAfterCompilation(boolean xterminateAfterCompilation)
public void setXajruntimetarget(String xajruntimetarget)
public void setBootClassPath(String bootclasspath)
public void setXjoinpoints(String xjoinpoints)
public void setWarn(String warn)
public void setArgumentFileName(String argumentFileName)
Copyright © 2005–2015 MojoHaus. All rights reserved.