|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.kuali.maven.mojo.AntMojo
public class AntMojo
Maven Ant Mojo. Allows Maven to invoke a target inside an Ant build file. The build file can be located on the file system, the ant-maven-plugin classpath, or any resource URL that Spring 3.0 can understand.
By default, this mojo makes the following available to Ant build files as both properties and references:
maven.compile.classpath=The classpath Maven is using for compilationThese are available as Ant references:
maven.project=MavenProject
Field Summary | |
---|---|
static String |
ANTLIB
The path to The XML file containing the definition of the Maven tasks. |
static String |
DEFAULT_ANT_TARGET_NAME
The default target name. |
static String |
DEFAULT_MAVEN_LOCAL_REPOSITORY_REFID
The refid used to store the Maven local repository object in the Ant build. |
static String |
DEFAULT_MAVEN_PROJECT_HELPER_REFID
The refid used to store the Maven project helper object in the Ant build. |
static String |
DEFAULT_MAVEN_PROJECT_REFID
The refid used to store the Maven project object in the Ant build. |
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
The local Maven repository |
static String |
TASK_URI
The URI which defines the built in Ant tasks |
static String |
UTF_8
The default encoding to use for the generated Ant build. |
static String |
XML_HEADER
|
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AntMojo()
|
Method Summary | |
---|---|
protected String |
attr(String name,
String value)
Return XML for an attribute |
protected File |
createBuildWrapper(File localBuildFile)
Write the ant target and surrounding tags to a temporary file |
void |
execute()
|
protected String |
findFragment(org.apache.tools.ant.BuildException buildException)
|
String |
getAntFilename()
|
org.apache.tools.ant.Project |
getAntProject(File localBuildFile)
Create a wrapper build file that calls into the build file they supplied us with. |
protected AntTaskPojo |
getAntTaskPojo()
Aggregate some of the Maven configuration into a pojo |
String |
getCustomTaskPrefix()
|
protected String |
getDefaultXML(AntTaskPojo atp)
Default XML that wraps the build file they supplied us with |
String |
getFile()
|
String |
getInheritAll()
|
String |
getInheritRefs()
|
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository()
|
org.apache.maven.project.MavenProject |
getMavenProject()
Get the current Maven project |
protected Map<String,?> |
getMavenRefs(org.apache.maven.project.MavenProject mavenProject)
Collect Maven model objects, the currently executing project, the project helper, and the local repository |
String |
getOutput()
|
List<org.apache.maven.artifact.Artifact> |
getPluginArtifacts()
|
org.apache.maven.project.MavenProject |
getProject()
|
org.apache.maven.project.MavenProjectHelper |
getProjectHelper()
|
protected String |
getProjectOpen()
XML for the Ant project tag |
String |
getPropertyPrefix()
|
protected String |
getRelativeFilename(File basedir,
File file)
|
String |
getRelativeLocalFilename()
|
String |
getTarget()
|
File |
getWorkingDir()
|
protected String |
getXML(AntTaskPojo atp)
Convert an AntTaskPojo into XML http://ant.apache.org/manual/Tasks/ant.html |
protected File |
handleAntfile()
Copy the build file to a local temp directory and preserve some information about the filename |
protected void |
handleBuildException(org.apache.tools.ant.BuildException e)
There was an Ant build exception |
void |
initMavenTasks(org.apache.tools.ant.Project antProject)
|
boolean |
isExportAntProperties()
|
boolean |
isFailOnError()
|
protected boolean |
isSkip()
Determine if mojo execution should be skipped |
void |
setCustomTaskPrefix(String customTaskPrefix)
|
void |
setExportAntProperties(boolean exportAntProperties)
|
void |
setFailOnError(boolean failOnError)
|
void |
setFile(String file)
|
void |
setInheritAll(String inheritAll)
|
void |
setInheritRefs(String inheritRefs)
|
void |
setOutput(String output)
|
void |
setPropertyPrefix(String propertyPrefix)
|
void |
setSkip(boolean skip)
|
void |
setTarget(String target)
|
void |
setWorkingDir(File workingDir)
|
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 |
Field Detail |
---|
public static final String DEFAULT_MAVEN_PROJECT_REFID
public static final String DEFAULT_MAVEN_PROJECT_HELPER_REFID
public static final String DEFAULT_MAVEN_LOCAL_REPOSITORY_REFID
public static final String DEFAULT_ANT_TARGET_NAME
public static final String UTF_8
public static final String XML_HEADER
public static final String ANTLIB
public static final String TASK_URI
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Constructor Detail |
---|
public AntMojo()
Method Detail |
---|
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected boolean isSkip()
public org.apache.tools.ant.Project getAntProject(File localBuildFile) throws IOException
IOException
protected Map<String,?> getMavenRefs(org.apache.maven.project.MavenProject mavenProject)
protected void handleBuildException(org.apache.tools.ant.BuildException e) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public org.apache.maven.project.MavenProject getMavenProject()
public void initMavenTasks(org.apache.tools.ant.Project antProject)
protected String getDefaultXML(AntTaskPojo atp) throws IOException
IOException
protected File createBuildWrapper(File localBuildFile) throws IOException
IOException
protected File handleAntfile() throws IOException
IOException
protected String getRelativeFilename(File basedir, File file)
protected AntTaskPojo getAntTaskPojo()
protected String getProjectOpen()
protected String findFragment(org.apache.tools.ant.BuildException buildException)
buildException
- not null
protected String getXML(AntTaskPojo atp)
protected String attr(String name, String value)
public String getPropertyPrefix()
public void setPropertyPrefix(String propertyPrefix)
public String getCustomTaskPrefix()
public void setCustomTaskPrefix(String customTaskPrefix)
public boolean isExportAntProperties()
public void setExportAntProperties(boolean exportAntProperties)
public boolean isFailOnError()
public void setFailOnError(boolean failOnError)
public String getFile()
public void setFile(String file)
public String getTarget()
public void setTarget(String target)
public String getOutput()
public void setOutput(String output)
public String getInheritAll()
public void setInheritAll(String inheritAll)
public String getInheritRefs()
public void setInheritRefs(String inheritRefs)
public org.apache.maven.project.MavenProject getProject()
public org.apache.maven.project.MavenProjectHelper getProjectHelper()
public List<org.apache.maven.artifact.Artifact> getPluginArtifacts()
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
public String getAntFilename()
public String getRelativeLocalFilename()
public void setSkip(boolean skip)
public File getWorkingDir()
public void setWorkingDir(File workingDir)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |