de.saumya.mojo.gem
Class ExecMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by de.saumya.mojo.jruby.AbstractJRubyMojo
          extended by de.saumya.mojo.gem.AbstractGemMojo
              extended by de.saumya.mojo.gem.ExecMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ExecMojo
extends AbstractGemMojo

executes a ruby script in context of the gems from pom. the arguments for jruby are build like this: ${jruby.args} ${exec.file} ${exec.args} ${args}
to execute an inline script the exec parameters are ignored.


Field Summary
protected  String execArgs
          arguments for the ruby script given through file parameter.
protected  File file
          ruby file which gets executed in context of the given gems..
protected  File outputFile
          output file where the standard out will be written
Command line -Dexec.outputFile=...
protected  String script
          ruby code from the pom configuration part which gets executed.
 
Fields inherited from class de.saumya.mojo.gem.AbstractGemMojo
binDirectory, gemHome, gemPath, gemsConfig, gemsInstaller, includeOpenSSL, includeRubygemsInTestResources, installRDoc, installRI, manager, plugin, supportNative, unzip
 
Fields inherited from class de.saumya.mojo.jruby.AbstractJRubyMojo
args, classRealm, DEFAULT_JRUBY_VERSION, factory, JRUBY_COMPLETE, JRUBY_CORE, JRUBY_STDLIB, jrubyFork, jrubyJvmArgs, jrubySwitches, jrubyVerbose, jrubyVersion, libDirectory, localRepository, logger, project, repositorySystem, rubySourceDirectory
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ExecMojo()
           
 
Method Summary
 void execute()
           
 void executeWithGems()
           
 
Methods inherited from class de.saumya.mojo.gem.AbstractGemMojo
executeJRuby, newScriptFactory
 
Methods inherited from class de.saumya.mojo.jruby.AbstractJRubyMojo
launchDirectory, newScriptFactory, resolveJRubyArtifact, resolveJRubyCompleteArtifact, retrieveStdlibArtifact
 
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
 

Field Detail

script

protected String script
ruby code from the pom configuration part which gets executed.
Command line -Dexec.script=...


file

protected File file
ruby file which gets executed in context of the given gems..
Command line -Dexec.file=...


outputFile

protected File outputFile
output file where the standard out will be written
Command line -Dexec.outputFile=...


execArgs

protected String execArgs
arguments for the ruby script given through file parameter.
Command line -Dexec.args=...

Constructor Detail

ExecMojo

public ExecMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AbstractJRubyMojo
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

executeWithGems

public void executeWithGems()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            ScriptException,
                            IOException
Specified by:
executeWithGems in class AbstractGemMojo
Throws:
org.apache.maven.plugin.MojoExecutionException
ScriptException
IOException


Copyright © 2011. All Rights Reserved.