public abstract class AbstractGemMojo extends AbstractJRubyMojo
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
binDirectory
directory of JRuby bin path to use when forking JRuby.
|
protected java.io.File |
gemHome
directory of gem home to use when forking JRuby.
|
protected java.util.Map<java.lang.String,java.lang.String> |
gemHomes
map different install locations for rubygems (GEM_HOME) to a directory.
|
protected java.io.File |
gemPath
directory of JRuby path to use when forking JRuby.
|
protected GemsConfig |
gemsConfig |
protected GemsInstaller |
gemsInstaller |
protected boolean |
gemUseSystem
use system gems instead of setting up GemPath/GemHome inside the build directory and ignores any set
gemHome and gemPath.
|
protected java.lang.String |
includeGemsInResources
EXPERIMENTAL
this gives the scope of the gems which shall be included to resources.
|
protected boolean |
includeLibDirectoryInResources
/**
flag whether to include file under the lib directory
Command line -Dgem.includeLibDirectoryInResources=... |
protected boolean |
includeOpenSSL
flag whether to include open-ssl gem or not
Command line -Dgem.includeOpenSSL=... |
protected boolean |
includeRubygemsInResources
flag whether to include all gems to resources, i.e.
|
protected boolean |
includeRubygemsInTestResources
flag whether to include all gems to test-resources, i.e.
|
protected boolean |
installRDoc
flag whether to install rdocs of the used gems or not
Command line -Dgem.installRDoc=... |
protected boolean |
installRI
flag whether to install ri of the used gems or not
Command line -Dgem.installRDoc=... |
protected GemManager |
manager |
protected org.apache.maven.plugin.descriptor.PluginDescriptor |
plugin |
protected boolean |
supportNative
flag to indicate to setup jruby's native support for C-extensions
Command line -Dgem.supportNative=... |
protected org.codehaus.plexus.archiver.UnArchiver |
unzip |
args, classRealm, DEFAULT_JRUBY_VERSION, env, factory, JRUBY_COMPLETE, JRUBY_CORE, JRUBY_STDLIB, jrubyFork, jrubyJvmArgs, jrubySwitches, jrubyVerbose, libDirectory, localRepository, logger, project, repositorySystem, rubySourceDirectory| Constructor and Description |
|---|
AbstractGemMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addResource(java.util.List<org.apache.maven.model.Resource> resources,
org.apache.maven.model.Resource resource) |
void |
execute() |
protected void |
executeJRuby() |
protected abstract void |
executeWithGems() |
protected java.io.File |
gemHome(java.lang.String base,
java.lang.String key) |
protected java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> |
getRemoteRepos() |
protected ScriptFactory |
newScriptFactory(org.apache.maven.artifact.Artifact artifact) |
getJrubyVersion, launchDirectory, resolveJRubyArtifact, resolveJRubyCompleteArtifact, resolveJRubyStdlibArtifactprotected org.codehaus.plexus.archiver.UnArchiver unzip
protected org.apache.maven.plugin.descriptor.PluginDescriptor plugin
protected boolean includeOpenSSL
protected boolean includeRubygemsInTestResources
protected boolean includeRubygemsInResources
protected java.lang.String includeGemsInResources
includeRubygemsInResources is that it
does not depend on rubygems during runtime since the required_path of the
gems gets added to resources. note that it expect the required_path of the
gem to be lib which is the default BUT that is not true for all gems.
in this sense this feature is incomplete and might not work for you !!!
IMPORTANT: it only adds the gems with provided scope since they are packed
with the jar and then the pom.xml will not have them (since they are marked
'provided') as transitive dependencies.
this feature can be helpful in situations where the classloader does not work
for rubygems due to rubygems uses file system globs to find the gems and this
only works if the classloader reveals the jar url of its jars (i.e. URLClassLoader).
for example OSGi classloader can not work with rubygems !!
protected boolean includeLibDirectoryInResources
protected boolean installRDoc
protected boolean installRI
protected boolean gemUseSystem
protected java.util.Map<java.lang.String,java.lang.String> gemHomes
protected java.io.File gemHome
protected java.io.File gemPath
protected java.io.File binDirectory
protected boolean supportNative
protected GemManager manager
protected GemsConfig gemsConfig
protected GemsInstaller gemsInstaller
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoexecute in class AbstractJRubyMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected ScriptFactory newScriptFactory(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException
newScriptFactory in class AbstractJRubyMojoorg.apache.maven.plugin.MojoExecutionExceptionprotected java.io.File gemHome(java.lang.String base,
java.lang.String key)
protected void executeJRuby()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException,
java.io.IOException,
ScriptException
executeJRuby in class AbstractJRubyMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionjava.io.IOExceptionScriptExceptionprotected void addResource(java.util.List<org.apache.maven.model.Resource> resources,
org.apache.maven.model.Resource resource)
protected abstract void executeWithGems()
throws org.apache.maven.plugin.MojoExecutionException,
ScriptException,
GemException,
java.io.IOException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionScriptExceptionGemExceptionjava.io.IOExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepos()
Copyright © 2015. All Rights Reserved.