You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@community.apache.org by Karesh Arunakirinathan <ka...@gmail.com> on 2012/02/27 20:52:56 UTC

Maven local repository

Hai all,

If I try to do build the two maven project in the same machine that will
affect the any of the other project ? Because .m2 local repository is same
for the machine But I am not sure about this issue. Could any one please
help me?

Thanks in advance.

Karesh
Undergraduate (CSE)
University of Surrey.

Re: Maven local repository

Posted by Suresh Marru <sm...@apache.org>.
Hi Karesh,

If you look in your ~/.m2/repository/ you will see bunch of directories. Within this root of local repository, you will see that artifacts will be organized by $groupId/$artifactId/$version/ 

So if your two project are pulling in different jars, then both projects should not affect each other at all.  You can safely work on both of them. In the cases, where both project depend upon same version of a jar, once the jar is download into local repo, the second project will use the local version instead of downloading it again. There are cases, some times bad versions can pulled from a unwanted repo which rarely breaks the build of first project, but thats very rare. You can easily track those bad jars and remove the directory and you will be fine again. You should not worry about sharing .m2 and safely work on both projects. Bravely dive into the new project and hack-on.

Suresh

On Feb 27, 2012, at 2:52 PM, Karesh Arunakirinathan wrote:

> Hai all,
> 
> If I try to do build the two maven project in the same machine that will
> affect the any of the other project ? Because .m2 local repository is same
> for the machine But I am not sure about this issue. Could any one please
> help me?
> 
> Thanks in advance.
> 
> Karesh
> Undergraduate (CSE)
> University of Surrey.