Class MavenWorkspaceReader

  • All Implemented Interfaces:
    org.sonatype.aether.repository.WorkspaceReader

    public class MavenWorkspaceReader
    extends java.lang.Object
    implements org.sonatype.aether.repository.WorkspaceReader
    Search local file system for parent and sibling module POMs.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File findArtifact​(org.sonatype.aether.artifact.Artifact artifact)
      Locates the specified artifact.
      protected java.io.File findModuleInParent​(org.sonatype.aether.artifact.Artifact artifact, org.apache.maven.model.Model parent)
      Find the artifact as a module in a parent.
      java.util.List<java.lang.String> findVersions​(org.sonatype.aether.artifact.Artifact artifact)
      Determines all available versions of the specified artifact.
      org.sonatype.aether.repository.WorkspaceRepository getRepository()
      Gets a description of the workspace repository.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MavenWorkspaceReader

        public MavenWorkspaceReader​(org.apache.maven.model.Model model,
                                    MavenDependencyResolverService service)
        Create a maven workspace reader.
    • Method Detail

      • getRepository

        public org.sonatype.aether.repository.WorkspaceRepository getRepository()
        Gets a description of the workspace repository.
        Specified by:
        getRepository in interface org.sonatype.aether.repository.WorkspaceReader
        Returns:
        The repository description, never null.
      • findArtifact

        public java.io.File findArtifact​(org.sonatype.aether.artifact.Artifact artifact)
        Locates the specified artifact.
        Specified by:
        findArtifact in interface org.sonatype.aether.repository.WorkspaceReader
        Parameters:
        artifact - The artifact to locate, must not be null.
        Returns:
        The path to the artifact or null if the artifact is not available.
      • findModuleInParent

        protected java.io.File findModuleInParent​(org.sonatype.aether.artifact.Artifact artifact,
                                                  org.apache.maven.model.Model parent)
        Find the artifact as a module in a parent.
      • findVersions

        public java.util.List<java.lang.String> findVersions​(org.sonatype.aether.artifact.Artifact artifact)
        Determines all available versions of the specified artifact.
        Specified by:
        findVersions in interface org.sonatype.aether.repository.WorkspaceReader
        Parameters:
        artifact - The artifact whose versions should be listed, must not be null.
        Returns:
        The available versions of the artifact, must not be null.