On Fri, Feb 29, 2008 at 2:46 PM, Muzammil <[EMAIL PROTECTED]> wrote:

>
> Hi All,
> I am required to use Maven for my project.
> My question is regarding the Jars I require for my project.
> Is it necessary to add information of all the Jars required by ur project
> in
> the POM file as dependency.


The required info are: groupId, artifactId and version


> These dependency jars as I know are either in
> the users local repository or if not available in the local repository are
> then downloaded from the remote repository into the local repository.
> But then what if the jars that I require or the versions of the jar that I
> require are not even available in the remote repository. In that case what
> to do?


You could host an internal repository where you could deploy these missing
jars and add this
repo in your pom. In this case, everyone who builds the project won't have
to install these
jars in their local repositories.

Check out these repo managers that you could use to host an internal repo
(and create proxies as well):
- Archiva
- Proximity
- Artifactory


> My other question related to this is that if I already have the required
> jars for my project on my system but not in the local repository then is
> there a way to tell Maven to use the required Jars from those locations in
> ur system.


I believe this would answer your question:
http://maven.apache.org/ref/current/maven-model/maven.html#class_dependency


> If not then what is the exact way to put those jars in the local
> repository?


You could use the install-file goal of the maven-install-plugin to put jars
in your local repository.


> I hope I have made myself clear to everyone:-)
> --


HTH,
Deng

Reply via email to