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  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
          artifact factory for internal use.
protected  java.util.Set<org.apache.maven.artifact.Artifact> artifacts
          The project's artifacts.
protected  org.apache.maven.project.MavenProjectBuilder builder
           
protected  boolean fork
          fork the JRuby execution.
protected  java.io.File gemHome
          directory of gem home to use when forking JRuby.
protected  java.io.File gemPath
          directory of JRuby path to use when forking JRuby.
protected  java.io.File home
          directory of JRuby home to use when forking JRuby.
protected  java.io.File launchDirectory
          the launch directory for the JRuby execution.
protected  java.lang.String launchMemory
          The amount of memory to use when forking JRuby.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          local repository for internal use.
protected  org.apache.maven.artifact.metadata.ArtifactMetadataSource metadata
           
protected  java.io.File outputDirectory
          output directory for internal use.
protected  java.io.File outputFile
          output file where the stdout will be redirected to
protected  org.apache.maven.project.MavenProject project
          reference to maven project for internal use.
protected  java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories
          list of remote repositories for internal use.
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
          artifact resolver for internal use.
protected  boolean verbose
          verbose jruby related output
protected  java.lang.String version
          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.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJRubyMojo()
           
 
Method Summary
protected  void ensureGem(java.lang.String gemName)
          Deprecated. 
protected  void ensureGems(java.lang.String[] gemNames)
          Deprecated. 
protected  void execute(java.lang.String args)
           
protected  void execute(java.lang.String[] args)
           
protected  void execute(java.lang.String[] args, java.io.File outputFile)
           
protected  void execute(java.lang.String[] args, java.io.File outputFile, boolean resolveArtifacts)
           
protected  void execute(java.lang.String args, boolean resolveArtifacts)
           
protected  java.lang.String fileFromClassloader(java.lang.String file)
           
protected  java.io.File launchDirectory()
           
protected  void resolveTransitively(java.util.Collection<org.apache.maven.artifact.Artifact> artifacts, org.apache.maven.artifact.Artifact artifact)
           
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

fork

protected boolean fork
fork the JRuby execution.


verbose

protected boolean verbose
verbose jruby related output


launchDirectory

protected java.io.File launchDirectory
the launch directory for the JRuby execution.


home

protected java.io.File home
directory of JRuby home to use when forking JRuby.


gemHome

protected java.io.File gemHome
directory of gem home to use when forking JRuby.


gemPath

protected java.io.File gemPath
directory of JRuby path to use when forking JRuby.


launchMemory

protected java.lang.String launchMemory
The amount of memory to use when forking JRuby.


project

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


artifacts

protected java.util.Set<org.apache.maven.artifact.Artifact> artifacts
The project's artifacts.


artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
artifact factory for internal use.


resolver

protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
artifact resolver for internal use.


localRepository

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


remoteRepositories

protected java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories
list of remote repositories for internal use.


version

protected java.lang.String version
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.4.1".


outputFile

protected java.io.File outputFile
output file where the stdout will be redirected to


outputDirectory

protected java.io.File outputDirectory
output directory for internal use.


metadata

protected org.apache.maven.artifact.metadata.ArtifactMetadataSource metadata

builder

protected org.apache.maven.project.MavenProjectBuilder builder
Constructor Detail

AbstractJRubyMojo

public AbstractJRubyMojo()
Method Detail

launchDirectory

protected java.io.File launchDirectory()

ensureGems

@Deprecated
protected void ensureGems(java.lang.String[] gemNames)
                   throws org.apache.maven.plugin.MojoExecutionException
Deprecated. 

Throws:
org.apache.maven.plugin.MojoExecutionException

ensureGem

@Deprecated
protected void ensureGem(java.lang.String gemName)
                  throws org.apache.maven.plugin.MojoExecutionException
Deprecated. 

Throws:
org.apache.maven.plugin.MojoExecutionException

execute

protected void execute(java.lang.String args,
                       boolean resolveArtifacts)
                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

execute

protected void execute(java.lang.String args)
                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

execute

protected void execute(java.lang.String[] args)
                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

execute

protected void execute(java.lang.String[] args,
                       java.io.File outputFile)
                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

execute

protected void execute(java.lang.String[] args,
                       java.io.File outputFile,
                       boolean resolveArtifacts)
                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

resolveTransitively

protected void resolveTransitively(java.util.Collection<org.apache.maven.artifact.Artifact> artifacts,
                                   org.apache.maven.artifact.Artifact artifact)
                            throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

fileFromClassloader

protected java.lang.String fileFromClassloader(java.lang.String file)


Copyright © 2010. All Rights Reserved.