|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.saumya.mojo.gems.DefaultMavenArtifactConverter
@Component(role=MavenArtifactConverter.class) public class DefaultMavenArtifactConverter
This is full of "workarounds" here, since for true artifact2gem conversion I would need interpolated POM!
| Nested Class Summary | |
|---|---|
static class |
DefaultMavenArtifactConverter.MavenDependency
|
| Constructor Summary | |
|---|---|
DefaultMavenArtifactConverter()
|
|
| Method Summary | |
|---|---|
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)
|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMavenArtifactConverter()
| Method Detail |
|---|
public boolean canConvert(MavenArtifact artifact)
MavenArtifactConverter
canConvert in interface MavenArtifactConverterpublic String getGemFileName(MavenArtifact artifact)
MavenArtifactConverter
getGemFileName in interface MavenArtifactConverterpublic GemSpecification createSpecification(MavenArtifact artifact)
MavenArtifactConverter
createSpecification in interface MavenArtifactConverter
public GemArtifact createGemStubFromArtifact(MavenArtifact artifact,
File target)
throws IOException
MavenArtifactConverter
createGemStubFromArtifact 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
artifact
IOException
public GemArtifact createGemFromArtifact(MavenArtifact artifact,
File target)
throws IOException
MavenArtifactConverter
createGemFromArtifact in interface MavenArtifactConverterartifact - the artifact to gemizetarget - where to save Gem file. If null, it will be created next to
artifact
IOExceptionprotected String sanitizeStringValue(String val)
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 createGemName(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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||