org.codehaus.mojo.mant
Class MantGoal

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

public class MantGoal
extends java.lang.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 java.lang.String JAVA
           
static java.lang.String JAVA_GEN
           
static java.lang.String META_INF_GEN
           
static java.lang.String RES
           
static java.lang.String RES_GEN
           
static java.lang.String WEB_INF_GEN
           
 
Constructor Summary
MantGoal(org.apache.maven.plugin.Mojo mojo, org.apache.maven.project.MavenProject project, java.lang.String taskdefClass, java.lang.String task, java.lang.String[] mappings)
          Creates this goal using the given mojo and project information.
 
Method Summary
 void execute()
          Executes the underlying ant task.
 void execute(java.lang.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.
 java.lang.String getClasspathString()
          Gets the classpath as a single string and always has a colon (or OS equivalent) on the end, when non empty.
 java.lang.String getJava()
           
 java.lang.String getJavaGen()
           
 java.lang.String getMetaInfGen()
           
 java.lang.String getRes()
           
 java.lang.String getResGen()
           
 java.lang.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 java.lang.String JAVA
See Also:
Constant Field Values

RES

public static final java.lang.String RES
See Also:
Constant Field Values

JAVA_GEN

public static final java.lang.String JAVA_GEN
See Also:
Constant Field Values

RES_GEN

public static final java.lang.String RES_GEN
See Also:
Constant Field Values

WEB_INF_GEN

public static final java.lang.String WEB_INF_GEN
See Also:
Constant Field Values

META_INF_GEN

public static final java.lang.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,
                java.lang.String taskdefClass,
                java.lang.String task,
                java.lang.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(java.lang.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
java.lang.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 java.lang.Exception
Executes the ant task by creating the build.xml file and running it through ant.

Throws:
java.lang.Exception

updateProject

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


getClasspathString

public java.lang.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 java.lang.String getJava()

getRes

public java.lang.String getRes()

getJavaGen

public java.lang.String getJavaGen()

getResGen

public java.lang.String getResGen()

getWebInfGen

public java.lang.String getWebInfGen()

getMetaInfGen

public java.lang.String getMetaInfGen()


Copyright © 2005-2010. All Rights Reserved.