org.codehaus.mojo.shell
Class ShellExecMojo

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

public class ShellExecMojo
extends org.apache.maven.plugin.AbstractMojo

Mojo used to embed a shell script inside the POM. This class handles construction of the command-line and monitoring of the check file, if specified. It will also handle chmod'ing the given shell command, if required.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ShellExecMojo()
           
 
Method Summary
 void execute()
          1.
 org.codehaus.plexus.util.cli.StreamConsumer newDebugStreamConsumer()
           
 org.codehaus.plexus.util.cli.StreamConsumer newInfoStreamConsumer()
           
protected  void setChmodUsed(boolean chmodUsed)
           
protected  void setProject(org.apache.maven.project.MavenProject project)
           
 
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
 

Constructor Detail

ShellExecMojo

public ShellExecMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
1. Create a temporary file containing the script. This is the executable. 3. If chmodUsed == true, then we'll set the executable bit on the executable file using chmod. 4. Construct the Ant Exec task using the supplied command, any command-line options, an optional Make target, working directory, and overrides for failure conditions. 5. Next, execute the resulting Exec task.

Throws:
org.apache.maven.plugin.MojoExecutionException

setChmodUsed

protected final void setChmodUsed(boolean chmodUsed)

setProject

protected final void setProject(org.apache.maven.project.MavenProject project)

newDebugStreamConsumer

public org.codehaus.plexus.util.cli.StreamConsumer newDebugStreamConsumer()

newInfoStreamConsumer

public org.codehaus.plexus.util.cli.StreamConsumer newInfoStreamConsumer()


Copyright © 2010. All Rights Reserved.