Hi James,

Please take a look at http://jira.codehaus.org/browse/MEAR-60. This improvement 
should help you get rid of the duplicate dependency declarations. Please vote 
for it or comment if you see other ways to solve this problem.

Regards,
Marcel

----- Original Message ----
From: "Shute, James" <[EMAIL PROTECTED]>
To: Maven Users List <users@maven.apache.org>
Sent: Tuesday, April 17, 2007 6:52:08 PM
Subject: RE: M2 : Controlling WEB-INF/lib contents in war


I had already seen about scopes and my original mail did note that
setting the scope to provided for a.jar and b.jar did give me the layout
I wanted, but meant I had to duplicate all the <dependency><version>
details which I wasn't keen on.

I have now found the <dependencyManagement> section I can declare in the
parent POM which means I can declare the version in that, and then the
scope override in my webapp module pom.  This seems to give me what I
need for my command line build which is a good start.  Unfortunately the
corresponding IDEA module generated suffers from the bug MIDEA-62, but
that'll get fixed when the 2.1 version of that plugin is released.

thanks

-----Original Message-----
From: Jerome Lacoste [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 5:04 PM
To: Maven Users List
Subject: Re: M2 : Controlling WEB-INF/lib contents in war

On 4/17/07, Shute, James <[EMAIL PROTECTED]> wrote:
>
> The target layout I'm after is:
>
> ear
> |
> |-lib
> |  |-a.jar
> |  |-b.jar
> |
> |-webapp
>    |
>    |-WEB-INF
>        |-web.xml
>        |-lib
>            |-c.jar
>
> I can't use warSourceExcludes as AFAIK excludes take precedence over

james,

I think you need to look at the bottom of
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-g
uide.html

in particular:

 <dependencies>
    <dependency>
      <groupId>org.foo</groupId>
      <artifactId>bar-jar1</artifactId>
      <version>${pom.version}</version>
      <optional>true</optional>
      <!-- goes in manifest classpath, but not included in WEB-INF/lib
-->
    </dependency>
    <dependency>
      <groupId>org.foo</groupId>
      <artifactId>bar-jar2</artifactId>
      <version>${pom.version}</version>
      <!-- goes in manifest classpath, AND included in WEB-INF/lib -->
    </dependency>
    <dependency>
      <groupId>org.foo</groupId>
      <artifactId>bar-jar1</artifactId>
      <version>${pom.version}</version>
      <scope>provided</scope>
      <!-- excluded from manifest classpath, and excluded from
WEB-INF/lib -->
    </dependency>

Jerome

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



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.




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





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to