public class AjcHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
ACCEPTED_COMPLIANCE_LEVEL_VALUES
List holding all accepted values for the
complianceLevel parameter. |
static String |
DEFAULT_EXCLUDES |
static String |
DEFAULT_INCLUDES |
| Constructor and Description |
|---|
AjcHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createClassPath(org.apache.maven.project.MavenProject project,
List<org.apache.maven.artifact.Artifact> pluginArtifacts,
List<String> outDirs)
Constructs AspectJ compiler classpath string
|
protected static String |
getAsCsv(String[] strings)
Convert a string array to a comma separated list
|
static Set<String> |
getBuildFilesForAjdtFile(String ajdtBuildDefFile,
File basedir)
Based on a AJDT build properties file resolves the combination of all
include and exclude statements and returns a set of all the files to be
compiled and weaved.
|
static Set<String> |
getBuildFilesForSourceDirs(List<String> sourceDirs,
String[] includes,
String[] excludes)
Based on a set of sourcedirs, apply include and exclude statements and
returns a set of all the files to be compiled and weaved.
|
static Set<String> |
getWeaveSourceFiles(String[] weaveDirs)
Based on a set of weavedirs returns a set of all the files to be weaved.
|
static boolean |
isValidComplianceLevel(String complianceLevel)
Checks if the given complianceLevel value is valid.
|
static List<String> |
readBuildConfigFile(String fileName,
File outputDir)
Reads a build config file, and returns the List of all compiler arguments.
|
protected static Set<String> |
resolveIncludeExcludeString(String input,
File basedir)
Helper method to find all .java or .aj files specified by the
includeString.
|
static void |
writeBuildConfigToFile(List<String> arguments,
String fileName,
File outputDir)
Creates a file that can be used as input to the ajc compiler using the -argdfile flag.
|
public static final String DEFAULT_INCLUDES
public static final String DEFAULT_EXCLUDES
public static boolean isValidComplianceLevel(String complianceLevel)
complianceLevel - A complianceLeveltrue if the supplied complianceLevel is valid, implying that it is defined within the
ACCEPTED_COMPLIANCE_LEVEL_VALUES List.ACCEPTED_COMPLIANCE_LEVEL_VALUESpublic static String createClassPath(org.apache.maven.project.MavenProject project, List<org.apache.maven.artifact.Artifact> pluginArtifacts, List<String> outDirs)
project - the Maven ProjectpluginArtifacts - the plugin ArtifactsoutDirs - the outputDirectoriespublic static Set<String> getBuildFilesForAjdtFile(String ajdtBuildDefFile, File basedir) throws org.apache.maven.plugin.MojoExecutionException
ajdtBuildDefFile - the ajdtBuildDefFilebasedir - the baseDirectoryorg.apache.maven.plugin.MojoExecutionExceptionpublic static Set<String> getBuildFilesForSourceDirs(List<String> sourceDirs, String[] includes, String[] excludes) throws org.apache.maven.plugin.MojoExecutionException
sourceDirs - includes - excludes - org.apache.maven.plugin.MojoExecutionExceptionpublic static Set<String> getWeaveSourceFiles(String[] weaveDirs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void writeBuildConfigToFile(List<String> arguments, String fileName, File outputDir) throws IOException
arguments - All arguments passed to ajc in this runfileName - the filename of the argfileoutputDir - the build output area.IOExceptionpublic static List<String> readBuildConfigFile(String fileName, File outputDir) throws IOException
fileName - the filename of the argfileoutputDir - the build output areaIOExceptionprotected static String getAsCsv(String[] strings)
strings - protected static Set<String> resolveIncludeExcludeString(String input, File basedir) throws org.apache.maven.plugin.MojoExecutionException
src/main/java/
src/main/java
src/main/java/com/project/AClass.java
src/main/java/com/project/AnAspect.aj
src/main/java/com/project/AnAspect.java
input - basedir - the baseDirectoryIOExceptionorg.apache.maven.plugin.MojoExecutionExceptionCopyright © 2005–2014 Codehaus. All rights reserved.