Hi Jo,

I have checked the link (not working with FF 2.0.0.4, but ok with IE 6.0), and 
through several days of googling I have found the skinny war solution for the 
ear problem.
Unfortunately it does not help me in this situation: I do not have ear-s 
(working with tomcat), just war-s. One portal - one war. Every module is one 
war, or jar. Modules depend on each other like news.war (with jsp, html etc) 
depends on HTML editor war (with other jsp, html etc), and the product depends 
on news.war, with its own html-s, and jsp-s.

Any idea?

Thanks,
Peter
 

-----Original Message-----
From: Jo Vandermeeren [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 08, 2007 12:18 PM
To: Maven Users List
Subject: Re: War plugin transitive dependency

On 6/8/07, Váry Péter <[EMAIL PROTECTED]> wrote:
>
> If I working with jar-s, and A is transitively dependent on C, then if a
> new C is installed into the repository, I will get the new version. But with
> war - it does not count the transitive dependencies, so I does not get the
> changes.



Hi Peter,

Aha, war dependencies are something completely different.
So, as you experienced, it is always good to be as specific as possible
about your problem.

I assume that your module A is an ear, module B is a war, and module C is a
jar?

By default, the dependencies of a webapp (module B) are packaged within the
war artifact itself.
If you depend on that module in an ear module (A), the war artifact will
simply be included, and its dependencies will not be checked.
This is valid because changes in module B's dependencies would require a
rebuild of the webapp in this setup.

You can however make this work in the same way as you apparently expect it
to do.
You achieve this by depending on C in your ear and package the dependencies
of module B in the ear instead.
Some configuration has to be made to modify the manifest classpath of the
webapp et cetera.

If you have multiple modules in the ear which depend on the same
dependencies (or some of them), this is the preferred configuration.
Otherwise you end up with a bloated ear full of duplicate libraries.

Jeroen Leenarts has written an enlightening article about this some time
ago:
http://blog.leenarts.net/2007/02/11/maven-2s-ear-plugin-gives-me-a-headache/

Cheers
Jo

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

Reply via email to