de.saumya.mojo.gems
Interface MavenArtifactConverter

All Known Implementing Classes:
DefaultMavenArtifactConverter

public interface MavenArtifactConverter

This is the single entry point into the Maven artifact to Ruby Gem converter.

Author:
cstamas

Field Summary
static java.lang.String GEMNAME_PREFIX
           
 
Method Summary
 boolean canConvert(MavenArtifact artifact)
          Returns is the artifact convertable safely into Gem.
 GemArtifact createGemFromArtifact(MavenArtifact artifact, java.io.File target)
          Creates a valid Ruby Gem, and returns File pointing to the result.
 java.io.File createGemspecFromArtifact(MavenArtifact artifact, java.io.File target)
           
 GemArtifact createGemStubFromArtifact(MavenArtifact artifact, java.io.File target)
          Creates a valid Ruby Gem, and returns File pointing to the result.
 GemSpecification createSpecification(MavenArtifact artifact)
          Creates a Gem::Specification (the equivalent JavaBeans actually) filled up properly based on informaton from POM.
 java.lang.String getGemFileName(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 gemize
target - where to save Gem file. If null, it will be created next to artifact
Returns:
Throws:
java.io.IOException


Copyright © 2011. All Rights Reserved.