I have to use two different locations to download different set of jar file, I am very new to Maven so need some basic help.
I added both the repository under <repositories> tag,but the build fails for the files for second repository, i don't know how do i tell maven that for a perticular dependency use different repository ?
All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Maven is based on the idea that anything in a repository is a fixed release, and once released, it will never change. So which repository you get a release from is immaterial - one is as good as another.
If you make fuzzy version requests, this can cause trouble, since there's a possibility of catching a release that wasn't propagated to other participating repositories. But making fuzzy version requests is a good way to ensure getting Maven's version of DLL Hell. I recommend always keying for specific releases unless there's a strong reason not to.
There probably is something like a "best-fit" rule that gets around problems where different versions have different, but equally eligible releases. I haven't checked.