Bill,

This is where maven differs from the more traditional ant- or make-like
build approaches. Maven uses a centralized repository that contains
third-party libraries, and the project.xml references these via the
dependency element. It also requires that you give an explicit version
and name for each dependency, but this you know. 

However, think about why. Although maven is primarily a build tool for
many people, in reality it is much more of a codebase management tool,
minus the SCM system. It allows you to build documentation, reports,
even an entire project website from the codebase. While it is important
to have explicit name/version entries to enable download from the
repository, it's even more important for supporting these other
activities.

You'll hear people on this list talk about the "maven philosophy." It's
real, and it's hard to get your head around when first jumping from
something like ant. The fundamental idea is to have a single description
of your project which states in no uncertain terms what that project
depends upon, what it is, who produced it, how it is built, etc.
Pointing maven at a /lib directory really doesn't definitively capture
all of that information in a single, reusable place. If I say that /lib
includes "javamail.jar" what does that mean? Is the project compatible
with javamail 1.0, 1.1, 1.2, or only 1.3.1? This is a real problem with
the "old way" of doing things, and it's why we use <dependency/>
elements.

To get started with maven 1.x you'll need to explicitly state all of
your project's dependencies, along with all of those dependencies'
dependencies. This is a weakness of maven 1.x which is being addressed
for a still-remote release. It can be a really cumbersome process, but
once it's done, it's done. Then, you can generate project definition
files for your IDE, and use the project.xml as the central point for
that info.

Hope this doesn't ramble too much, and that it helps you understand the
"why" of all this work.

-john

On Sun, 2004-04-25 at 11:43, Bill Madison wrote:
> Geoffrey,
> 
> Even if I do it the way you suggested, it still doesnt
> solve the problem of cut&paste and the versioning
> issue. I'm lookiing for something where I can place
> the jars and point to the location, If at all I can do
> that, it would save lot of my time. If anyone know of
> any solution, please let me know.
> 
> Regards
> Bill
> 
> --- Geoffrey <[EMAIL PROTECTED]> wrote:
> > Xerces supports XInclude (without xpointer).
> > Maven uses Xerces to parse its xml files if I am not
> > mistaken.
> > 
> > XInclude allows you to include an xml part from
> > another file.
> > You can define an xml file that contains all
> > dependencies and XInclude it?
> > 
> > "Bill Madison" <[EMAIL PROTECTED]> schreef in bericht
> >
> news:[EMAIL PROTECTED]
> > > Thanks Matt,
> > >
> > > Isnt there a lib or something where I can point
> > to,
> > > instead of putting each and every jar as a
> > dpendency,
> > > thats a lot of cut and paste work and also most of
> > the
> > > thirdparty jars dont come with a version and as I
> > see
> > > the version is a requiredd element. Theres got to
> > be a
> > > better and easier way of doing this.
> > >
> > > The problem in my case is that we have 2
> > development
> > > teams, and they put their jars in the IDE build
> > path
> > > and when it comes to integration/build I have to
> > start
> > > figuring out the version for each jar and start
> > > putting them in the project.xml which is kind of
> > > cumbersome. So trying to see if there is a better
> > way
> > > f doing this. Please let me know if you have a
> > > solution for this.
> > >
> > > Thanks
> > >
> > > --- "matthew.hawthorne" <[EMAIL PROTECTED]> wrote:
> > > > Bill Madison wrote:
> > > > > I am a newbie to Maven. And my question is, if
> > my
> > > > > project needs some 30 thirdparty jars, for
> > each of
> > > > > them do I need to put a <dependency> element
> > in
> > > > the
> > > > > project.xml? Please let me know.
> > > >
> > > >
> > > > Yes.
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Photos: High-quality 4x6 digital prints for
> > 25
> > > http://photos.yahoo.com/ph/print_splash
> > 
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> 
>       
>               
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25
> http://photos.yahoo.com/ph/print_splash
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
John Casey
[EMAIL PROTECTED]
CommonJava Open Components Project
http://www.commonjava.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to