Interface ArtifactRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean containsArtifact​(org.guvnor.common.services.project.model.GAV gav)
      Checks whether this Maven repository contains the specified artifact (GAV).
      void delete​(org.guvnor.common.services.project.model.GAV gav)
      Delete an artifact from the repository
      void deploy​(String pom, org.eclipse.aether.artifact.Artifact... artifacts)
      Deploy a list of artifact into a repository
      File getArtifactFileFromRepository​(org.guvnor.common.services.project.model.GAV gav)
      Return an artifact from the repository
      String getName()
      Returns the name of the repository, an identifier
      String getRootDir()
      Return the root dir of a repository, if it doesn't have one, return null
      boolean isPomRepository()
      Identifies if is a repository that admit pom artifacts
      boolean isRepository()
      Identifies if is a repository that admit artifacts
      Collection<org.eclipse.aether.artifact.Artifact> listArtifacts​(List<String> wildcards)
      List repository artifacts filtered by wildcards
      Collection<File> listFiles​(List<String> wildcards)
      List repository files filtered by wildcards
    • Method Detail

      • getName

        String getName()
        Returns the name of the repository, an identifier
        Returns:
        the name
      • getRootDir

        String getRootDir()
        Return the root dir of a repository, if it doesn't have one, return null
        Returns:
        the root dir of a repository.
      • listFiles

        Collection<File> listFiles​(List<String> wildcards)
        List repository files filtered by wildcards
        Parameters:
        wildcards - the filtering wildcards
        Returns:
        the files
      • listArtifacts

        Collection<org.eclipse.aether.artifact.Artifact> listArtifacts​(List<String> wildcards)
        List repository artifacts filtered by wildcards
        Parameters:
        wildcards - the filtering wildcards
        Returns:
        the artifacts
      • deploy

        void deploy​(String pom,
                    org.eclipse.aether.artifact.Artifact... artifacts)
        Deploy a list of artifact into a repository
        Parameters:
        pom - the artifact pom
        artifacts - the list of artifacts
      • delete

        void delete​(org.guvnor.common.services.project.model.GAV gav)
        Delete an artifact from the repository
        Parameters:
        gav - the GAV identifier of the artifact to be deleted
      • containsArtifact

        boolean containsArtifact​(org.guvnor.common.services.project.model.GAV gav)
        Checks whether this Maven repository contains the specified artifact (GAV).

        As opposed to ${code getArtifactFileFromRepository(GAV)}, this method will not log any WARNings in case the artifact is not present (the Aether exception is only logged as TRACE message).

        Parameters:
        gav - artifact GAV, never null
        Returns:
        true if the this Maven repo contains the specified artifact, otherwise false
      • getArtifactFileFromRepository

        File getArtifactFileFromRepository​(org.guvnor.common.services.project.model.GAV gav)
        Return an artifact from the repository
        Parameters:
        gav - the GAV identifier
        Returns:
        the artifact found
      • isRepository

        boolean isRepository()
        Identifies if is a repository that admit artifacts
        Returns:
      • isPomRepository

        boolean isPomRepository()
        Identifies if is a repository that admit pom artifacts
        Returns: