You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Muzammil <mu...@gmail.com> on 2008/02/29 07:46:10 UTC

POM Dependency question

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. 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?
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. If not then what is the exact way to put those jars in the local
repository?
I hope I have made myself clear to everyone:-)
-- 
View this message in context: http://www.nabble.com/POM-Dependency-question-tp15753056s177p15753056.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: POM Dependency question

Posted by Wayne Fay <wa...@gmail.com>.
You really need to just read Better Builds With Maven (from
devzuz.com) or Maven: The Definitive Guide (from sonatype.com), they
have answers for all your questions.

Wayne

On 2/29/08, Maria Odea Ching <oc...@apache.org> wrote:
> On Fri, Feb 29, 2008 at 2:46 PM, Muzammil <mu...@gmail.com> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: POM Dependency question

Posted by Maria Odea Ching <oc...@apache.org>.
On Fri, Feb 29, 2008 at 2:46 PM, Muzammil <mu...@gmail.com> 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