org.codehaus.mojo.mant
Class MantGoal

java.lang.Object
  extended by org.codehaus.mojo.mant.MantGoal

public class MantGoal
extends Object

Class to handle execution of an ant task. For an optional task a taskdef will be created using a constructor supplied class and the dependecies for the corresponding classpath. A build.xml temp file is created and executed with the ant api.


Field Summary
static String JAVA
           
static String JAVA_GEN
           
static String META_INF_GEN
           
static String RES
           
static String RES_GEN
           
static String WEB_INF_GEN
           
 
Constructor Summary
MantGoal(org.apache.maven.plugin.Mojo mojo, org.apache.maven.project.MavenProject project, String taskdefClass, String task, String[] mappings)
          Creates this goal using the given mojo and project information.
 
Method Summary
 void execute()
          Executes the underlying ant task.
 void execute(String classpathProperty)
          Executes the ant task whilst the given system property has the classpath string set.
 void executeTask()
          Executes the ant task by creating the build.xml file and running it through ant.
 String getClasspathString()
          Gets the classpath as a single string and always has a colon (or OS equivalent) on the end, when non empty.
 String getJava()
           
 String getJavaGen()
           
 String getMetaInfGen()
           
 String getRes()
           
 String getResGen()
           
 String getWebInfGen()
           
 void updateProject()
          Updates the resource and sources project directories to reflect generated code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA

public static final String JAVA
See Also:
Constant Field Values

RES

public static final String RES
See Also:
Constant Field Values

JAVA_GEN

public static final String JAVA_GEN
See Also:
Constant Field Values

RES_GEN

public static final String RES_GEN
See Also:
Constant Field Values

WEB_INF_GEN

public static final String WEB_INF_GEN
See Also:
Constant Field Values

META_INF_GEN

public static final String META_INF_GEN
See Also:
Constant Field Values
Constructor Detail

MantGoal

public MantGoal(org.apache.maven.plugin.Mojo mojo,
                org.apache.maven.project.MavenProject project,
                String taskdefClass,
                String task,
                String[] mappings)
Creates this goal using the given mojo and project information. Also supplied is the xml task to be run along with the mappings that specify which maven property to be substituted for the ant attribute. If the task is optional then the a non null taskdef class may be passed in.

Parameters:
mojo -
project -
taskdefClass -
task -
mappings -
Method Detail

execute

public void execute(String classpathProperty)
             throws org.apache.maven.plugin.MojoExecutionException
Executes the ant task whilst the given system property has the classpath string set. This is really just to support xdoclet that for some reason doesn't work with taskdef classpath.

Parameters:
classpathProperty - TODO
Throws:
org.apache.maven.plugin.MojoExecutionException
org.dom4j.DocumentException
Exception

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Executes the underlying ant task.

Throws:
org.apache.maven.plugin.MojoExecutionException

executeTask

public void executeTask()
                 throws Exception
Executes the ant task by creating the build.xml file and running it through ant.

Throws:
Exception

updateProject

public void updateProject()
Updates the resource and sources project directories to reflect generated code.


getClasspathString

public String getClasspathString()
Gets the classpath as a single string and always has a colon (or OS equivalent) on the end, when non empty.

Returns:

getJava

public String getJava()

getRes

public String getRes()

getJavaGen

public String getJavaGen()

getResGen

public String getResGen()

getWebInfGen

public String getWebInfGen()

getMetaInfGen

public String getMetaInfGen()


Copyright © 2005-2011 Codehaus. All Rights Reserved.