Search code examples
maventerminology

What is meant by local repository and remote repository in Maven?


I am reading up Maven - The complete reference and came across this

Maven assumes that the parent POM is available from the local repository, or available in the parent directory (../pom.xml) of the current project. If neither location is valid this default behavior may be overridden via the relativePath element.

What exactly is meant by local and remote repository for a Maven installation and a project?


Solution

  • A local repository is a local directory structure that caches artifacts downloaded from remote repositories, or those that are manually installed (eg from the command line option).

    A remote repository is a web service (defined by a URL) that contains versioned artifacts. This might be as simple as an Apache server, or a full-blown Maven repository, such as Artifactory, that allows uploading, permissions based on a user directory, etc.

    http://maven.apache.org/guides/introduction/introduction-to-repositories.html