@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)
MavenArtifactConverter
canConvert
in interface MavenArtifactConverter
public String getGemFileName(MavenArtifact artifact)
MavenArtifactConverter
getGemFileName
in interface MavenArtifactConverter
public GemSpecification createSpecification(MavenArtifact artifact)
MavenArtifactConverter
createSpecification
in interface MavenArtifactConverter
public GemArtifact createGemStubFromArtifact(MavenArtifact artifact, File target) throws IOException
MavenArtifactConverter
createGemStubFromArtifact
in interface MavenArtifactConverter
artifact
- the artifact to gemize (without data only gemspec)target
- where to save Gem file. If null, it will be created next to
artifactIOException
public GemArtifact createGemFromArtifact(MavenArtifact artifact, File target) throws IOException
MavenArtifactConverter
createGemFromArtifact
in interface MavenArtifactConverter
artifact
- the artifact to gemizetarget
- where to save Gem file. If null, it will be created next to
artifactIOException
protected 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
NullPointerException
public File createGemspecFromArtifact(MavenArtifact artifact, File target) throws IOException
createGemspecFromArtifact
in interface MavenArtifactConverter
IOException
Copyright © 2017. All rights reserved.