public class AjcHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
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 pluginArtifacts,
List outDirs)
Constructs AspectJ compiler classpath string
|
protected static String |
getAsCsv(String[] strings)
Convert a string array to a comma separated list
|
static Set |
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 |
getBuildFilesForSourceDirs(List 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 |
getWeaveSourceFiles(String[] weaveDirs)
Based on a set of weavedirs returns a set of all the files to be weaved.
|
static List |
readBuildConfigFile(String fileName,
File outputDir)
Reads a build config file, and returns the List of all compiler arguments.
|
protected static Set |
resolveIncludeExcludeString(String input,
File basedir)
Helper method to find all .java or .aj files specified by the
includeString.
|
static void |
writeBuildConfigToFile(List 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 String createClassPath(org.apache.maven.project.MavenProject project, List pluginArtifacts, List outDirs)
project - the Maven ProjectpluginArtifacts - the plugin ArtifactsoutDirs - the outputDirectoriespublic static Set getBuildFilesForAjdtFile(String ajdtBuildDefFile, File basedir) throws org.apache.maven.plugin.MojoExecutionException
ajdtBuildDefFile - the ajdtBuildDefFilebasedir - the baseDirectoryorg.apache.maven.plugin.MojoExecutionExceptionpublic static Set getBuildFilesForSourceDirs(List sourceDirs, String[] includes, String[] excludes) throws org.apache.maven.plugin.MojoExecutionException
sourceDirs - includes - excludes - org.apache.maven.plugin.MojoExecutionExceptionpublic static Set getWeaveSourceFiles(String[] weaveDirs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void writeBuildConfigToFile(List 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 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 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-2012 Codehaus. All Rights Reserved.