Antonio Fornie wrote:Thank you very much.
You talk about two separate areas, but I guess it's better to have it all in my local repository with the correct directory structure, isn't it?
Yes, you may have your jar for example at c:\mylibs\log4j-1.2.14.jar. If you use Maven it will automatically download the canonical version of that jar and generally put it in your $USER_HOMe/.m2/repository.
Antonio Fornie wrote:
For example, if I need two libraries: a.jar and b.jar and I already have a.jar. I guess I should put the two dependencies in my pom and then copy a.jar to my local repository. Am I right? Then Maven should look for them and finally download only the b.jar. That way the only thing I'd need to know is which directory structure to use when placing a.jar by hand. Is this the right way to do it?
Correct _if_ the jar you are dealing with is not already a Maven central jar (remember the Maven hosts 1000's of jars in its repository, so for most libs it will automatically download from central and place in your local).
If it is a 3rd party jar that Maven central does not have then yes you need to manually place it in your local repository, the directory structure is up to you but should obviously match the group-id you specify in your pom.xml
If this is your own jar that you've built from your source code then you actually want to be using mvn install to install that into your local repository.
Hope that helps!