Iulian Costan wrote:
> if it is adirect dependencies you can play with <scope> tag, you might use
> test or provided scopes. the default scope is compile so that dep will be
> included in war.
> 
> on the other side if it is a transitive dependency then play with
> <exclusions> tag,
> in the sample below artifact A is excluded from war.
> <dependecy>
>     <grouppId>
>     <artifactId>...
>     <version>...
>     <exlusions>
>        <exclusion>
>             <groupId>G<groupId>
>             <artifactId>A</artifactId>
>             <version>1.0</version>
>        <exclusion>
>     </exclusions>
> </dependency>

This is becoming my favourite maven subject in the last few months :-(
Managing what goes inside the war via <scope>provided</scope> works but
in practice turns out to be a quite tedious task.

We develop an enterprise system which consists of a large number of
EJBs. When developing web frontends to this system there are two main
use cases:

- development time: run the webapp against a remote app server
- deployment time: run the webapp in the same app server as the EJBs

In order to build different wars for development and deploy, we use
profiles. In the deployment profiles, we have to re-list most of the
webapp's dependencies with scope provided. This does not only turn the
pom into one giant xml file but becomes quite unmanageable since listing
dependencies has to be done in two places.

See http://jira.codehaus.org/browse/MWAR-21 for my patch to the war
plugin and the discussion why it was rejected. I still think that
dependency excludes/includes are a good idea as this would ease the
building of deployment packages a lot and make my POMs smaller.

I have the feeling that I might not be the only one with this problem ...

-dirk

-- 
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


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

Reply via email to