Package de.saumya.mojo.gems
Interface MavenArtifactConverter
-
- All Known Implementing Classes:
DefaultMavenArtifactConverter
public interface MavenArtifactConverterThis is the single entry point into the Maven artifact to Ruby Gem converter.- Author:
- cstamas
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGEMNAME_PREFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanConvert(MavenArtifact artifact)Returns is the artifact convertable safely into Gem.GemArtifactcreateGemFromArtifact(MavenArtifact artifact, java.io.File target)Creates a valid Ruby Gem, and returns File pointing to the result.java.io.FilecreateGemspecFromArtifact(MavenArtifact artifact, java.io.File target)GemArtifactcreateGemStubFromArtifact(MavenArtifact artifact, java.io.File target)Creates a valid Ruby Gem, and returns File pointing to the result.GemSpecificationcreateSpecification(MavenArtifact artifact)Creates a Gem::Specification (the equivalent JavaBeans actually) filled up properly based on informaton from POM.java.lang.StringgetGemFileName(MavenArtifact artifact)Returns the "regular" gem filename, as it is expected this artifact to be called as Gem.
-
-
-
Field Detail
-
GEMNAME_PREFIX
static final java.lang.String GEMNAME_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
canConvert
boolean canConvert(MavenArtifact artifact)
Returns is the artifact convertable safely into Gem.- Parameters:
pom-- Returns:
- true if yes.
-
getGemFileName
java.lang.String getGemFileName(MavenArtifact artifact)
Returns the "regular" gem filename, as it is expected this artifact to be called as Gem.- Parameters:
pom-- Returns:
-
createSpecification
GemSpecification createSpecification(MavenArtifact artifact)
Creates a Gem::Specification (the equivalent JavaBeans actually) filled up properly based on informaton from POM. The "better" POM is, the getter is gemspec. For best results, fed in interpolated POMs!- Parameters:
artifact-- Returns:
-
createGemspecFromArtifact
java.io.File createGemspecFromArtifact(MavenArtifact artifact, java.io.File target) throws java.io.IOException
- Throws:
java.io.IOException
-
createGemStubFromArtifact
GemArtifact createGemStubFromArtifact(MavenArtifact artifact, java.io.File target) throws java.io.IOException
Creates a valid Ruby Gem, and returns File pointing to the result.- Parameters:
artifact- the artifact to gemize (without data only gemspec)target- where to save Gem file. If null, it will be created next to artifact- Returns:
- Throws:
java.io.IOException
-
createGemFromArtifact
GemArtifact createGemFromArtifact(MavenArtifact artifact, java.io.File target) throws java.io.IOException
Creates a valid Ruby Gem, and returns File pointing to the result.- Parameters:
artifact- the artifact to gemizetarget- where to save Gem file. If null, it will be created next to artifact- Returns:
- Throws:
java.io.IOException
-
-