Class LocalRepository

  • All Implemented Interfaces:
    ArtifactRepository

    public final class LocalRepository
    extends java.lang.Object
    implements ArtifactRepository
    A repository on the local file system used to cache contents of remote repositories and to store locally installed artifacts. Note that this class merely describes such a repository, actual access to the contained artifacts is handled by a LocalRepositoryManager which is usually determined from the type of the repository.
    • Constructor Detail

      • LocalRepository

        @Deprecated
        public LocalRepository​(java.lang.String basedir)
        Deprecated.
        Creates a new local repository with the specified base directory and unknown type.
        Parameters:
        basedir - The base directory of the repository, may be null.
      • LocalRepository

        public LocalRepository​(java.net.URI basedir)
        Creates a new local repository with the specified base directory and unknown type.
        Parameters:
        basedir - The base directory of the repository, may be null.
        Since:
        2.0.0
      • LocalRepository

        @Deprecated
        public LocalRepository​(java.io.File basedir)
        Deprecated.
        Creates a new local repository with the specified base directory and unknown type.
        Parameters:
        basedir - The base directory of the repository, may be null.
      • LocalRepository

        public LocalRepository​(java.nio.file.Path basePath)
        Creates a new local repository with the specified base directory and unknown type.
        Parameters:
        basePath - The base directory of the repository, may be null.
        Since:
        2.0.0
      • LocalRepository

        @Deprecated
        public LocalRepository​(java.io.File basedir,
                               java.lang.String type)
        Deprecated.
        Creates a new local repository with the specified properties.
        Parameters:
        basedir - The base directory of the repository, may be null.
        type - The type of the repository, may be null.
      • LocalRepository

        public LocalRepository​(java.nio.file.Path basePath,
                               java.lang.String type)
        Creates a new local repository with the specified properties.
        Parameters:
        basePath - The base directory of the repository, may be null.
        type - The type of the repository, may be null.
        Since:
        2.0.0
    • Method Detail

      • getId

        public java.lang.String getId()
        Description copied from interface: ArtifactRepository
        Gets the identifier of this repository.
        Specified by:
        getId in interface ArtifactRepository
        Returns:
        The (case-sensitive) identifier, never null.
      • getBasedir

        @Deprecated
        public java.io.File getBasedir()
        Deprecated.
        Use getBasePath() instead.
        Gets the base directory of the repository.
        Returns:
        The base directory or null if none.
      • getBasePath

        public java.nio.file.Path getBasePath()
        Gets the base directory of the repository.
        Returns:
        The base directory or null if none.
        Since:
        2.0.0
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object