maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: copy jars to web-inf/lib best practice
Date Fri, 24 Jan 2003 09:39:04 GMT

We never got this to work - I am guessing because we're using b7 rather
than the latest version.  An alternative is to add the following to your
build script

<project xmlns:deploy="deploy"

<deploy:copy-deps todir="${web.dir}/WEB-INF/lib"

Where web.dir is the build directory for the WAR file and excludes is a
comma separated list of group ids that should be excluded from the WAR
file.  It's a more manual process but definitely works with b7.

Michal's reply is almost certainly the better option, but try the above if
it doesn't work for you.



Michal Maczka <> on 24/01/2003 08:18:24

Please respond to "Turbine Maven Users List"

To:   "'Turbine Maven Users List'" <>
Subject:  RE: copy jars to web-inf/lib best practice

Mark your dependiencise like this:



and war pluging will know what to do



> -----Original Message-----
> From: Mingfai Ma []
> Sent: Friday, January 24, 2003 9:10 AM
> To:
> Subject: copy jars to web-inf/lib best practice
> hi,
> I use Maven to build a web application and would like to ask
> for the best
> practice of putting the jars to the web-inf/lib folder.
> at the maven dependency list, there is no seperation between
> run-time and
> compile time dependencies. How do you make Maven to copy all
> the required
> jars to the web-inf/lib folder? I can think of three ways:
>  i.           use the ant:generate to generate an ant script, that
> download all jars
> to lib/ of the project. And copy lib/* to the web-inf/lib
>  ii.          maintain a list of jar file and use ANT to copy the
> jars from maven's
> repository.
>  iii.         do copying manually from maven's repository.
> for the first way, it copies all jar files, which is not
> desirable. But it
> is simple to implement. For the other two ways, I got to do
> manual works,
> but can include only run time libraries in the final archive
> (Web ARchive).
> What are the better ways?
> besides, do you just copy the jars in building time (building
> of the .war,
> in my case)? I make my IDE use all jars in the lib/* currently.
> how do you do the above tasks? could you share your best
> practice in using
> Maven, please?
> regards,
> mingfai
> --
> To unsubscribe, e-mail:
> <>
> For additional commands, e-mail:
> <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message