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
    • 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