|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.mojo.aspectj.AjcHelper
public class AjcHelper
A helper class for creating classpaths for the compilers and report mojos
Field Summary | |
---|---|
static String |
DEFAULT_EXCLUDES
|
static String |
DEFAULT_INCLUDES
|
Constructor Summary | |
---|---|
AjcHelper()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_INCLUDES
public static final String DEFAULT_EXCLUDES
Constructor Detail |
---|
public AjcHelper()
Method Detail |
---|
public static String createClassPath(org.apache.maven.project.MavenProject project, List pluginArtifacts, List outDirs)
project
- the Maven ProjectpluginArtifacts
- the plugin ArtifactsoutDirs
- the outputDirectories
public static Set getBuildFilesForAjdtFile(String ajdtBuildDefFile, File basedir) throws org.apache.maven.plugin.MojoExecutionException
ajdtBuildDefFile
- the ajdtBuildDefFilebasedir
- the baseDirectory
org.apache.maven.plugin.MojoExecutionException
public static Set getBuildFilesForSourceDirs(List sourceDirs, String[] includes, String[] excludes) throws org.apache.maven.plugin.MojoExecutionException
sourceDirs
- includes
- excludes
-
org.apache.maven.plugin.MojoExecutionException
public static Set getWeaveSourceFiles(String[] weaveDirs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public 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.
IOException
public static List readBuildConfigFile(String fileName, File outputDir) throws IOException
fileName
- the filename of the argfileoutputDir
- the build output area
IOException
protected 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 baseDirectory
IOException
org.apache.maven.plugin.MojoExecutionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |