maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael.J.Br...@jpmorgan.com
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"
           xmlns:interaction="jelly:interaction">

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

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.

Regards,

     Mike






Michal Maczka <Mmaczka@cqs.ch> on 24/01/2003 08:18:24

Please respond to "Turbine Maven Users List"
      <turbine-maven-user@jakarta.apache.org>



To:   "'Turbine Maven Users List'" <turbine-maven-user@jakarta.apache.org>
cc:
Subject:  RE: copy jars to web-inf/lib best practice

Mark your dependiencise like this:


 <dependency>
       <groupId>fop</groupId>
       <artifactId>fop</artifactId>
       <version>0.20.3</version>
       <properties>
         <war.bundle.jar>true</war.bundle.jar>
       </properties>
     </dependency>

     <dependency>
       <groupId>avalon-framework</groupId>
       <artifactId>avalon-framework</artifactId>
       <version>4.0</version>
       <properties>
         <war.bundle.jar>true</war.bundle.jar>
       </properties>
    </dependency>


and war pluging will know what to do

regards

Michal

> -----Original Message-----
> From: Mingfai Ma [mailto:mingfai@hongkong.com]
> Sent: Friday, January 24, 2003 9:10 AM
> To: turbine-maven-user@jakarta.apache.org
> 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:
> <mailto:turbine-maven-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:turbine-maven-user-help@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <
mailto:turbine-maven-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:turbine-maven-user-help@jakarta.apache.org>







Mime
View raw message