Marco Ehrentreich wrote:Hi RamandeepS,
the Maven local repository is only a per-user directory (at least with Linux and Windows) where artifacts are stored after you have downloaded them once. For release versions (in contrast to snapshot versions) this means you have to download these files never again.
Nexus or any other Maven repository manager on the other hand does more than just this and I would definitely recommend to use such a repository manager if you want to have fun and work without too much trouble with Maven Some typical use cases / features of a repository manager are:
shared cache: It does not only cache artifacts you have used once but it also enables you to share artifacts with other users or computers in your network. That way only one user have to download the artifact and all the others can use the artifact from the central cache.
proxy: Nexus not only allows you to cache artifacts it also allows you to act as a proxy for public remote repositories. That makes it easy to hide several public repository URLs behind the repository manager URL. Otherwise you would have to specify all needed additional repositories inside your settings.xml file or in every project POM (a bad practice!). Nexus also can be configured to download remote indexes and index the local artifacts for faster access from inside your network.
share artifacts: A repository manager is not limited to be used as a proxy cache. Additionally it allows you to upload and distribute your own artifacts. This way you can publish your own library or project JARs, WARs, EARs etc. with your repository manager. Then other users/computers can easily access these artifacts from the central repository manager. Of course this makes it a lot easier to manage and handle artifacts in a single place instead of copying and moving them manually. It's also easier to make backups of your artifacts.
speed: Some of the public repositories are really slow from time to time. A repository manager helps you to speed up your development experience because you don't have to contact all remote repositories during your builds. For release versions this is not a big deal, because they are only downloaded once. But for snapshot versions the remote repositories are contacted each day (by default) to look or newer versions. There are several options to configure this behavior for the repository manager. For example if you know that artifacts don't change often for a remote repository Nexus doesn't need to check for it every 24h. Additionally it can download remote indexes at night so that you have the newest indexes but don't have to wait for it during development.
There are more features depending on the repository manager you choose but I guess you now have an idea what the advantages are.
like in our network server if i install maven then in my local system maven configuration i set the local repo the path to the server local repo, i have not done this before but i think this could be done
please let me know where i am wrong.. Cant we do the above configuration?