org.codehaus.groovy.maven.mojo
Class GroovyMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.groovy.maven.mojo.GroovyMojo
All Implemented Interfaces:
groovy.lang.GroovyObject, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public abstract class GroovyMojo
extends org.apache.maven.plugin.AbstractMojo
implements groovy.lang.GroovyObject

Provides support for Maven 2 plugins implemented in Groovy.

Version:
$Id: GroovyMojo.groovy 11481 2008-04-08 10:32:20Z user57 $
Author:
Jason Dillon

Field Summary
protected  boolean sanitizeErrors
          Sanatize errors, stripping out Groovy internals.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
GroovyMojo()
           
 
Method Summary
protected  void afterExecute()
           
protected  void beforeExecute()
           
protected  java.lang.Object fail(java.lang.Object msg)
           
protected  java.lang.Object fail(java.lang.Object msg, java.lang.Throwable cause)
           
protected  groovy.util.AntBuilder getAnt()
          Lazilly initialize the AntBuilder, so we can pick up the log impl correctly.
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
          Intercept calls to execute() and surround by beforeExecute() and afterExecute()
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

sanitizeErrors

protected boolean sanitizeErrors
Sanatize errors, stripping out Groovy internals.

Constructor Detail

GroovyMojo

public GroovyMojo()
Method Detail

getAnt

protected groovy.util.AntBuilder getAnt()
Lazilly initialize the AntBuilder, so we can pick up the log impl correctly.


fail

protected java.lang.Object fail(java.lang.Object msg)

fail

protected java.lang.Object fail(java.lang.Object msg,
                                java.lang.Throwable cause)

invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
Intercept calls to execute() and surround by beforeExecute() and afterExecute()

Specified by:
invokeMethod in interface groovy.lang.GroovyObject

beforeExecute

protected void beforeExecute()

afterExecute

protected void afterExecute()

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2006-2009 Codehaus. All Rights Reserved.