public abstract class AbstractGemMojo extends AbstractJRubyMojo
Modifier and Type | Field and Description |
---|---|
protected File |
binDirectory
directory of JRuby bin path to use when forking JRuby.
|
protected File |
gemHome
directory of gem home to use when forking JRuby.
|
protected Map<String,String> |
gemHomes
map different install locations for rubygems (GEM_HOME) to a directory.
|
protected 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 String |
includeGemsInResources
Deprecated.
|
protected boolean |
includeLibDirectoryInResources
/**
flag whether to include file under the lib directory
Command line -Dgem.includeLibDirectoryInResources=... |
protected boolean |
includeOpenSSL
Deprecated.
|
protected boolean |
includeProvidedRubygemsInResources
flag whether to include all gems to resources, i.e.
|
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
Deprecated.
|
protected org.codehaus.plexus.archiver.UnArchiver |
unzip |
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, rubySourceDirectory
Constructor and Description |
---|
AbstractGemMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
addResource(List<org.apache.maven.model.Resource> resources,
org.apache.maven.model.Resource resource) |
void |
execute() |
protected void |
executeJRuby() |
protected abstract void |
executeWithGems() |
protected File |
gemHome(String base,
String key) |
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
getRemoteRepos() |
protected ScriptFactory |
newScriptFactory(org.apache.maven.artifact.Artifact artifact) |
getDefaultJRubyVersion, getJrubyVersion, getProjectClasspath, launchDirectory, resolveJRubyArtifact, resolveJRubyCompleteArtifact, resolveJRubyStdlibArtifact
@Component(hint="zip") protected org.codehaus.plexus.archiver.UnArchiver unzip
@Parameter(defaultValue="${plugin}", readonly=true) protected org.apache.maven.plugin.descriptor.PluginDescriptor plugin
@Parameter(defaultValue="false", property="gem.includeOpenSSL") @Deprecated protected boolean includeOpenSSL
@Parameter(defaultValue="true", property="gem.includeRubygemsInTestResources") protected boolean includeRubygemsInTestResources
@Parameter(defaultValue="false", property="gem.includeRubygemsInResources") protected boolean includeRubygemsInResources
@Parameter(defaultValue="false", property="gem.includeProvidedRubygemsInResources") protected boolean includeProvidedRubygemsInResources
@Parameter(property="gem.includeGemsInResources") @Deprecated protected 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 !!
@Parameter(defaultValue="false", property="gem.includeLibDirectoryInResources") protected boolean includeLibDirectoryInResources
@Parameter(defaultValue="false", property="gem.installRDoc") protected boolean installRDoc
@Parameter(defaultValue="false", property="gem.installRI") protected boolean installRI
@Parameter(defaultValue="false", property="gem.useSystem") protected boolean gemUseSystem
@Parameter(property="gem.homes") protected Map<String,String> gemHomes
@Parameter(property="gem.home", defaultValue="${project.build.directory}/rubygems") protected File gemHome
@Parameter(property="gem.path", defaultValue="${project.build.directory}/rubygems") protected File gemPath
@Parameter(property="gem.binDirectory") protected File binDirectory
@Parameter(defaultValue="false", property="gem.supportNative") @Deprecated protected boolean supportNative
@Component 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.Mojo
execute
in class AbstractJRubyMojo
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected ScriptFactory newScriptFactory(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException
newScriptFactory
in class AbstractJRubyMojo
org.apache.maven.plugin.MojoExecutionException
protected void executeJRuby() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, IOException, ScriptException
executeJRuby
in class AbstractJRubyMojo
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
IOException
ScriptException
protected void addResource(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, IOException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
ScriptException
GemException
IOException
org.apache.maven.plugin.MojoFailureException
protected List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepos()
Copyright © 2017. All rights reserved.