Class DefaultGemManager

java.lang.Object
de.saumya.mojo.ruby.gems.DefaultGemManager
All Implemented Interfaces:
GemManager

@Component(role=GemManager.class) public class DefaultGemManager extends Object implements GemManager
  • Field Details

    • DEFAULT_GEMS_REPOSITORY_BASE_URL

      public static final String DEFAULT_GEMS_REPOSITORY_BASE_URL
      See Also:
    • repositorySystem

      @Requirement private org.apache.maven.repository.RepositorySystem repositorySystem
    • repositoryMetadataManager

      @Requirement private org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager repositoryMetadataManager
    • builder

      @Requirement private org.apache.maven.project.ProjectBuilder builder
  • Constructor Details

    • DefaultGemManager

      public DefaultGemManager()
  • Method Details

    • setLatestVersionIfMissing

      private org.apache.maven.artifact.Artifact setLatestVersionIfMissing(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws GemException
      Throws:
      GemException
    • createGemArtifact

      public org.apache.maven.artifact.Artifact createGemArtifact(String gemname) throws GemException
      Specified by:
      createGemArtifact in interface GemManager
      Throws:
      GemException
    • createGemArtifact

      public org.apache.maven.artifact.Artifact createGemArtifact(String gemname, String version) throws GemException
      Specified by:
      createGemArtifact in interface GemManager
      Throws:
      GemException
    • createGemArtifactWithLatestVersion

      public org.apache.maven.artifact.Artifact createGemArtifactWithLatestVersion(String gemname, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws GemException
      Specified by:
      createGemArtifactWithLatestVersion in interface GemManager
      Throws:
      GemException
    • defaultGemArtifactRepository

      public org.apache.maven.artifact.repository.ArtifactRepository defaultGemArtifactRepository()
      Specified by:
      defaultGemArtifactRepository in interface GemManager
    • defaultGemArtifactRepositoryForVersion

      public org.apache.maven.artifact.repository.ArtifactRepository defaultGemArtifactRepositoryForVersion(String artifactVersion)
      Specified by:
      defaultGemArtifactRepositoryForVersion in interface GemManager
    • addDefaultGemRepository

      public void addDefaultGemRepository(List<org.apache.maven.artifact.repository.ArtifactRepository> repos)
      Specified by:
      addDefaultGemRepository in interface GemManager
    • addDefaultGemRepositories

      public void addDefaultGemRepositories(List<org.apache.maven.artifact.repository.ArtifactRepository> repos)
      Specified by:
      addDefaultGemRepositories in interface GemManager
    • addDefaultGemRepositoryForVersion

      public void addDefaultGemRepositoryForVersion(String artifactVersion, List<org.apache.maven.artifact.repository.ArtifactRepository> repos)
      Specified by:
      addDefaultGemRepositoryForVersion in interface GemManager
    • createJarArtifactForGemname

      public org.apache.maven.artifact.Artifact createJarArtifactForGemname(String gemName) throws GemException
      Specified by:
      createJarArtifactForGemname in interface GemManager
      Throws:
      GemException
    • createPomArtifactForGemname

      public org.apache.maven.artifact.Artifact createPomArtifactForGemname(String gemName) throws GemException
      Specified by:
      createPomArtifactForGemname in interface GemManager
      Throws:
      GemException
    • createJarArtifactForGemname

      public org.apache.maven.artifact.Artifact createJarArtifactForGemname(String gemName, String version) throws GemException
      Specified by:
      createJarArtifactForGemname in interface GemManager
      Throws:
      GemException
    • createJarArtifactForGemnameWithLatestVersion

      public org.apache.maven.artifact.Artifact createJarArtifactForGemnameWithLatestVersion(String gemName, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws GemException
      Specified by:
      createJarArtifactForGemnameWithLatestVersion in interface GemManager
      Throws:
      GemException
    • createArtifact

      public org.apache.maven.artifact.Artifact createArtifact(String groupId, String artifactId, String version, String type)
      Specified by:
      createArtifact in interface GemManager
    • createArtifact

      public org.apache.maven.artifact.Artifact createArtifact(String groupId, String artifactId, String version, String classifier, String type)
      Specified by:
      createArtifact in interface GemManager
    • resolve

      public Set<org.apache.maven.artifact.Artifact> resolve(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws GemException
      Specified by:
      resolve in interface GemManager
      Throws:
      GemException
    • resolve

      public Set<org.apache.maven.artifact.Artifact> resolve(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories, boolean transitively) throws GemException
      Specified by:
      resolve in interface GemManager
      Throws:
      GemException
    • buildModel

      public org.apache.maven.project.MavenProject buildModel(org.apache.maven.artifact.Artifact artifact, Object repositorySystemSession, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories, boolean resolve) throws GemException
      Specified by:
      buildModel in interface GemManager
      Throws:
      GemException
    • setRepositorySession

      public void setRepositorySession(org.apache.maven.project.ProjectBuildingRequest pomRequest, Object repositorySystemSession) throws GemException
      Specified by:
      setRepositorySession in interface GemManager
      Throws:
      GemException
    • buildPom

      public org.apache.maven.project.MavenProject buildPom(org.apache.maven.artifact.Artifact artifact, Object repositorySystemSession, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws GemException
      Specified by:
      buildPom in interface GemManager
      Throws:
      GemException
    • latestVersion

      public String latestVersion(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws GemException
      Specified by:
      latestVersion in interface GemManager
      Throws:
      GemException
    • availableVersions

      public List<String> availableVersions(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws GemException
      Specified by:
      availableVersions in interface GemManager
      Throws:
      GemException