de.saumya.mojo.jruby
Class AbstractJRubyMojo

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

public abstract class AbstractJRubyMojo
extends org.apache.maven.plugin.AbstractMojo

Base for all JRuby mojos.


Field Summary
protected  String args
          common arguments
protected  org.codehaus.classworlds.ClassRealm classRealm
          classrealm for internal use.
protected  ScriptFactory factory
           
static String GEM_RUBY_COMMAND
           
static String IRB_RUBY_COMMAND
           
static String IRB_SWING_RUBY_COMMAND
           
protected  String jrubyArgs
          arguments for the jruby command.
protected  boolean jrubyFork
          fork the JRuby execution.
protected  String jrubyJvmArgs
          arguments for the jruby command.
protected  String jrubySwitches
          switches for the jruby command.
protected  boolean jrubyVerbose
          verbose jruby related output
protected  String jrubyVersion
          if the pom.xml has no runtime dependency to a jruby-complete.jar then this version is used to resolve the jruby-complete dependency from the local/remote maven repository.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          local repository for internal use.
protected  Logger logger
           
protected  org.apache.maven.project.MavenProject project
          reference to maven project for internal use.
static String RAKE_RUBY_COMMAND
           
protected  org.apache.maven.repository.RepositorySystem repositorySystem
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJRubyMojo()
           
 
Method Summary
 void execute()
           
protected abstract  void executeJRuby()
           
protected  File launchDirectory()
           
protected  ScriptFactory newScriptFactory()
           
protected  org.apache.maven.artifact.Artifact resolveJRUBYCompleteArtifact()
           
 
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

GEM_RUBY_COMMAND

public static final String GEM_RUBY_COMMAND
See Also:
Constant Field Values

IRB_RUBY_COMMAND

public static final String IRB_RUBY_COMMAND
See Also:
Constant Field Values

IRB_SWING_RUBY_COMMAND

public static final String IRB_SWING_RUBY_COMMAND
See Also:
Constant Field Values

RAKE_RUBY_COMMAND

public static final String RAKE_RUBY_COMMAND
See Also:
Constant Field Values

args

protected String args
common arguments


jrubyArgs

protected String jrubyArgs
arguments for the jruby command.


jrubyJvmArgs

protected String jrubyJvmArgs
arguments for the jruby command.


jrubySwitches

protected String jrubySwitches
switches for the jruby command.


jrubyVersion

protected String jrubyVersion
if the pom.xml has no runtime dependency to a jruby-complete.jar then this version is used to resolve the jruby-complete dependency from the local/remote maven repository. defaults to "1.5.6".


jrubyFork

protected boolean jrubyFork
fork the JRuby execution.


jrubyVerbose

protected boolean jrubyVerbose
verbose jruby related output


project

protected org.apache.maven.project.MavenProject project
reference to maven project for internal use.


localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
local repository for internal use.


classRealm

protected org.codehaus.classworlds.ClassRealm classRealm
classrealm for internal use.


repositorySystem

protected org.apache.maven.repository.RepositorySystem repositorySystem

logger

protected Logger logger

factory

protected ScriptFactory factory
Constructor Detail

AbstractJRubyMojo

public AbstractJRubyMojo()
Method Detail

newScriptFactory

protected ScriptFactory newScriptFactory()
                                  throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

executeJRuby

protected abstract void executeJRuby()
                              throws org.apache.maven.plugin.MojoExecutionException,
                                     org.apache.maven.plugin.MojoFailureException,
                                     IOException,
                                     ScriptException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
IOException
ScriptException

launchDirectory

protected File launchDirectory()

resolveJRUBYCompleteArtifact

protected org.apache.maven.artifact.Artifact resolveJRUBYCompleteArtifact()
                                                                   throws org.apache.maven.artifact.DependencyResolutionRequiredException,
                                                                          org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.artifact.DependencyResolutionRequiredException
org.apache.maven.plugin.MojoExecutionException


Copyright © 2011. All Rights Reserved.