Package de.saumya.mojo.gem
Class PackageMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
de.saumya.mojo.jruby.AbstractJRubyMojo
de.saumya.mojo.gem.AbstractGemMojo
de.saumya.mojo.gem.PackageMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="package",
requiresDependencyResolution=TEST,
requiresProject=false)
public class PackageMojo
extends AbstractGemMojo
goal to convert that artifact into a gem or uses a given gemspec to build a gem.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String(package private) Fileprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate String(package private) Filethe gemspec to use for building the gem(package private) booleanuse the pom to generate a gemspec and overwrite the one in lauchDirectory.(package private) booleanprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate String(package private) booleanuse repository layout for included dependenciesFields 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
Modifier and TypeMethodDescriptionprivate voidbuildFromPom(org.apache.maven.project.MavenProject project, GemArtifact artifact) voidprotected voidprivate voidgeneratePom(File source, File target) private org.apache.maven.artifact.resolver.ArtifactResolutionResultincludeDependencies(org.apache.maven.project.MavenProject project, GemArtifact artifact) private StringtitleizedClassname(String artifactId) Methods inherited from class de.saumya.mojo.gem.AbstractGemMojo
addResource, execute, 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
-
buildDirectory
-
gemspec
the gemspec to use for building the gem -
gemspecOverwrite
@Parameter(property="gemspec.overwrite") boolean gemspecOverwriteuse the pom to generate a gemspec and overwrite the one in lauchDirectory. -
date
-
extraRdocFiles
-
extraFiles
-
rdocOptions
-
requirePaths
-
rubygemsVersion
-
requiredRubygemsVersion
-
bindir
-
requiredRubyVersion
-
postInstallMessage
-
executables
-
extensions
-
platform
-
gemHook
-
includeDependencies
@Parameter(defaultValue="false") boolean includeDependencies -
useRepositoryLayout
@Parameter(defaultValue="false") boolean useRepositoryLayoutuse repository layout for included dependencies
-
-
Constructor Details
-
PackageMojo
public PackageMojo()
-
-
Method Details
-
generatePom
- Throws:
ScriptExceptionIOException
-
executeJRuby
public void executeJRuby() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, ScriptException- Overrides:
executeJRubyin classAbstractGemMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionScriptException
-
buildFromPom
private void buildFromPom(org.apache.maven.project.MavenProject project, GemArtifact artifact) throws org.apache.maven.plugin.MojoExecutionException, IOException, ScriptException - Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOExceptionScriptException
-
includeDependencies
private org.apache.maven.artifact.resolver.ArtifactResolutionResult includeDependencies(org.apache.maven.project.MavenProject project, GemArtifact artifact) throws IOException - Throws:
IOException
-
titleizedClassname
-
executeWithGems
protected void executeWithGems() throws org.apache.maven.plugin.MojoExecutionException, ScriptException, IOException- Specified by:
executeWithGemsin classAbstractGemMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionScriptExceptionIOException
-