maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: multiple sourceDirectory elements & local jar dependencies
Date Mon, 02 Jun 2003 10:30:28 GMT


> -----Original Message-----
> From: Scott Stirling [mailto:scottstirling@rcn.com]
> Sent: 02 June 2003 11:13
> To: 'Maven Users List'
> Subject: RE: multiple sourceDirectory elements & local jar
dependencies
> 
> > -----Original Message-----
> > From: Vincent Massol [mailto:vmassol@pivolis.com]
> [...]
> 
> Hi Vince,
> 
> Thanks for the reply!
> 
> > The Maven philosophy is to have a single source tree per project. If
you
> > need several then simply split into several projects. Creating a
project
> > in Maven simply consists in creating a project.xml file.
> 
> There's no escaping that Maven enforces its philosophy on my team's
> project
> unnecessarily (it seems to me).
> 
> It's nice that project's can inherit, which should ameliorate the
change
> in
> perspective for the team as to what constitutes a "project."  We
already
> have at least 3 different uses of "project" in our current tool set of
> Eclipse, ClearCase and management's use(s) (along which we have
organized
> code in ClearCase UCM).  It may not be that big of a deal, although we
> don't
> want too many Eclipse projects, and this is going to encourage two
> everywhere we had one before.

You only need several Eclipse project if you wish to use the
Eclipse/Maven plugin. Otherwise you can still have a single Eclipse
project (not a big deal - That's what I do).

> 
> Another question: if you have a dependency on a jar that doesn't have
a
> neat
> external place to get it, and you want to pick up that jar from the
local
> file system, what do you do?  I manually created the necessary
directory
> structure under maven-1.0-beta-9\repository to make like it had been
> downloaded.  Is there another way?  I think it would be cool to just
say:
> 
> <dependency>
>   <id>myjar</id>
>   <uri>./lib</uri>
> </dependency>
> 
> Where it defaults to looking in ./lib for myjar.jar (no version, but
> version
> could be optionally specified), or the URI could specify the protocol
like
> file:./lib, or be a variable like ${maven.repo.local}.  Or again, an
> optional attribute on the dependency, like <dependency
> repository="local"/>.

It's possible with the <jar> tag (replace <uri> by <jar> :-)). However,
the correct solution is that any project artfifact (jars are a project
artifact) go through the maven repository. 

Thus, for example, a "maven jar:deploy" will deploy the jar to the local
repository, making it accessible to any other project.

This is a different philosophy from "traditional" ant scripts which were
sharing artifacts through a dist/, target/ or release/ directory. The
Maven approach is much cleaner IMO.

> 
> Current common solution (in mail archives) is to set maven.repo.remote
to
> a
> local repository (either local file system or an internal server).
This
> is
> also a cool idea.  A local repository (supplemental to ibiblio) on our
own
> server seems like a cool idea.

Yep, it works real well here (we have 300+ maven projects). We have an
automated build which runs on the maven remote repository machine and
publishes the artifacts after each build, making them available to the
whole team. 

> 
> Anyway, Maven is really cool, as I am getting sick of writing the same
> build
> files again and again.  I hope I can convince some other folks on the
team
> to buy into it.

Excellent! Once you start understanding and using it, there's not
running back :-)

-Vincent

> 
> Thank you,
> 
> Scott Stirling
> Framingham, MA
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



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


Mime
View raw message