REPOSITORY1. A repository can be a place where multiple databasesor files are located for distribution over a network, ora repository can be a location that is directlyaccessible to the user without having to travel acrossa network.
2. In a CASE development system, adatabase of information about the software,including data elements, processes, inputs,outputs and interrelationships. A CASEsystem uses a repository to identify objectsand rules for reuse.
THE LOCAL REPOSITORY:Refers to a copy on your own installationthat is a cache of the remote downloads,and also contains the temporary buildartifacts that you have not yet released.
REMOTE REPOSITORIES: refer to any other type of repository,accessed by a variety of protocols such asfile:// and http://. These repositories might bea truly remote repository set up by a thirdparty to provide their artifacts for downloading(for example, repo.maven.apache.org anduk.maven.org house Mavens centralrepository). Other "remote" repositories maybe internal repositories set up on a file orHTTP server within your company, used toshare private artifacts between developmentteams and for releases.
It uses less storage - while a repository istypically quite large, because each JAR isonly kept in the one place it is actuallysaving space, even though it may notseem that way
It makes checking out a project quicker -initial checkout, and to a small degreeupdating, a project will be faster if thereare no large binary files in CVS. Whilethey may need to be downloaded againafterwards anyway, this only happensonce and may not be necessary for somecommon JARs already in place.
No need for versioning - CVS and othersource control systems are designed forversioning files, but external dependenciestypically dont change, or if they do theirfilename changes anyway to indicate thenew version. Storing these in CVS doesnthave any added benefit over keeping them ina local artifact cache.
USING REPOSITORIES In general, you should not need to doanything with the local repository on aregular basis, except clean it out if you areshort on disk space (or erase it completely ifyou are willing to download everythingagain). For the remote repositories, they are used forboth downloading and uploading (if you havethe permission to do so).
You can set this in your settings.xml file toglobally use a certain mirror, however notethat it is common for a project to customizethe repository in their pom.xml and that yoursetting will take precedence. If you find thatdependencies are not being found, checkyou have not overridden the remoterepository.
UPLOADING TO A REMOTE REPOSITORY While this is possible for any type of remoterepository, you must have the permission todo so. To have someone upload to thecentral Maven repository, see RepositoryCenter
INTERNAL REPOSITORIESParticularly in a corporate environment,connecting to the internet to downloaddependencies is not acceptable for security,speed or bandwidth reasons. For that reason, itis desirable to set up an internal repository tohouse a copy of artifacts, and to publish privateartifacts to. Such an internal repository can bedownloaded from using HTTP or the file system(using a file:// URL), and uploaded to using SCP,FTP, or a file copy.
To set up an internal repository just requiresthat you have a place to put it, and then startcopying required artifacts there using thesame layout as in a remote repository suchas repo.maven.apache.org.