Package de.saumya.mojo.gem
Class ExecMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
de.saumya.mojo.jruby.AbstractJRubyMojo
de.saumya.mojo.gem.AbstractGemMojo
de.saumya.mojo.gem.ExecMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="exec",
defaultPhase=INITIALIZE,
requiresDependencyResolution=TEST,
requiresProject=false)
public class ExecMojo
extends AbstractGemMojo
executes a ruby script in context of the gems from pom. the arguments for
jruby are build like this:
to execute an inline script the exec parameters are ignored.
${jruby.args} ${exec.file} ${exec.args} ${args} to execute an inline script the exec parameters are ignored.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]an array of arguments which can contain spaces for the ruby script given through file parameter.protected Stringarguments separated by whitespaces for the ruby script given through file parameter.protected Fileruby file which gets executed in context of the given gems..protected Stringruby file found on search path which gets executed.protected Fileoutput file where the standard out will be writtenprotected Stringruby code from the pom configuration part which gets executed.Fields inherited from class de.saumya.mojo.gem.AbstractGemMojo
binDirectory, gemHome, gemHomes, gemPath, gemsConfig, gemsInstaller, gemUseSystem, includeGemsInResources, includeLibDirectoryInResources, includeOpenSSL, includeProvidedRubygemsInResources, includeRubygemsInResources, includeRubygemsInTestResources, installRDoc, installRI, manager, plugin, supportNative, unzipFields inherited from class de.saumya.mojo.jruby.AbstractJRubyMojo
addProjectClasspath, args, classRealm, DEFAULT_JRUBY_VERSION, eclipseRefresh, eclipseWatches, env, factory, JRUBY_COMPLETE, JRUBY_CORE, JRUBY_STDLIB, jrubyFork, jrubyJvmArgs, jrubySwitches, jrubyVerbose, libDirectory, localRepository, logger, project, repositorySystem, rubySourceDirectoryFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class de.saumya.mojo.gem.AbstractGemMojo
addResource, execute, executeJRuby, gemHome, getRemoteRepos, newScriptFactoryMethods inherited from class de.saumya.mojo.jruby.AbstractJRubyMojo
getDefaultJRubyVersion, getJrubyVersion, getProjectClasspath, launchDirectory, resolveJRubyArtifact, resolveJRubyCompleteArtifact, resolveJRubyStdlibArtifactMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
script
ruby code from the pom configuration part which gets executed. -
file
ruby file which gets executed in context of the given gems.. -
filename
ruby file found on search path which gets executed. the search path includes the executable scripts which were installed via the given gem-artifacts. -
outputFile
output file where the standard out will be written -
execArgs
arguments separated by whitespaces for the ruby script given through file parameter. no quoting or escaping possible - if needed use execArglines instead. -
execArgLines
an array of arguments which can contain spaces for the ruby script given through file parameter.
-
-
Constructor Details
-
ExecMojo
public ExecMojo()
-
-
Method Details
-
executeWithGems
protected void executeWithGems() throws org.apache.maven.plugin.MojoExecutionException, ScriptException, IOException- Specified by:
executeWithGemsin classAbstractGemMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionScriptExceptionIOException
-