@Component(role=MavenArtifactConverter.class) public class DefaultMavenArtifactConverter extends Object implements MavenArtifactConverter
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMavenArtifactConverter.MavenDependency |
GEMNAME_PREFIX| Constructor and Description |
|---|
DefaultMavenArtifactConverter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(MavenArtifact artifact)
Returns is the artifact convertable safely into Gem.
|
GemArtifact |
createGemFromArtifact(MavenArtifact artifact,
File target)
Creates a valid Ruby Gem, and returns File pointing to the result.
|
protected String |
createGemName(String groupId,
String artifactId,
String version) |
File |
createGemspecFromArtifact(MavenArtifact artifact,
File target) |
GemArtifact |
createGemStubFromArtifact(MavenArtifact artifact,
File target)
Creates a valid Ruby Gem, and returns File pointing to the result.
|
protected String |
createGemVersion(String mavenVersion) |
protected String |
createJarfileName(String groupId,
String artifactId,
String version) |
protected String |
createLibFileName(MavenArtifact artifact,
String postfix) |
protected String |
createRequireName(String groupId,
String artifactId,
String version) |
GemSpecification |
createSpecification(MavenArtifact artifact)
Creates a Gem::Specification (the equivalent JavaBeans actually) filled
up properly based on informaton from POM.
|
protected String |
getGemFileName(GemSpecification gemspec) |
String |
getGemFileName(MavenArtifact artifact)
Returns the "regular" gem filename, as it is expected this artifact to be
called as Gem.
|
protected String |
getGemFileName(String groupId,
String artifactId,
String version,
String platform) |
protected String |
sanitizeStringValue(String val) |
public boolean canConvert(MavenArtifact artifact)
MavenArtifactConvertercanConvert in interface MavenArtifactConverterpublic String getGemFileName(MavenArtifact artifact)
MavenArtifactConvertergetGemFileName in interface MavenArtifactConverterpublic GemSpecification createSpecification(MavenArtifact artifact)
MavenArtifactConvertercreateSpecification in interface MavenArtifactConverterpublic GemArtifact createGemStubFromArtifact(MavenArtifact artifact, File target) throws IOException
MavenArtifactConvertercreateGemStubFromArtifact in interface MavenArtifactConverterartifact - the artifact to gemize (without data only gemspec)target - where to save Gem file. If null, it will be created next to
artifactIOExceptionpublic GemArtifact createGemFromArtifact(MavenArtifact artifact, File target) throws IOException
MavenArtifactConvertercreateGemFromArtifact in interface MavenArtifactConverterartifact - the artifact to gemizetarget - where to save Gem file. If null, it will be created next to
artifactIOExceptionprotected String createLibFileName(MavenArtifact artifact, String postfix)
protected String createRequireName(String groupId, String artifactId, String version)
protected String createJarfileName(String groupId, String artifactId, String version)
protected String getGemFileName(String groupId, String artifactId, String version, String platform)
protected String getGemFileName(GemSpecification gemspec)
protected String createGemVersion(String mavenVersion) throws NullPointerException
NullPointerExceptionpublic File createGemspecFromArtifact(MavenArtifact artifact, File target) throws IOException
createGemspecFromArtifact in interface MavenArtifactConverterIOExceptionCopyright © 2016. All Rights Reserved.