org.codehaus.mojo.shell
Class ShellExecMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
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.
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
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 |
ShellExecMojo
public ShellExecMojo()
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.