On Fri, Apr 20, 2007 at 02:25:43PM +0200, Gilles Scokart wrote:
> What you propose is exactly what I want to do... except that I don't want
> to place all jars in the ivy.xml of the war.
>
> The reason is that I have also ivy.xml for each jars. And if someone adds a
> dependency to one of this jar, I want to have it added automatically in the
> war or in the ear (depending on the type of filtering I placed) without
> having to update the ivy.xml of the war.
Just to be sure I understand your problem correctly: you've some
internally developed libraries (that you want to go into the wars),
that *may* depend on other interal stuff (also to go into the wars)
and external (e.g. apache) stuff, which you want to go into the
ear.
If this is the case, *and* if the decision internal/external can
be made in the ivys of the internal libraries (not in the wars and
not in the ear), it may be possible to use three runtime-like
configurations instead of one:
- runtime-internal: additional libraries from your SW dept.
- runtime-external: additional libraries from 3rd party (e.g. apache
stuff). Artifacts that should be considered external from an ear's
point of view (i.e. your war files) should also use this
configuration. [yes, now the naming becomes strange again, but don't
have a better idea for now]
- runtime: extends runtime-internal and runtime-external.
For dependencies in your war's ivys, something like
conf="runtime -> #(runtime); compile->runtime"
may be used, but i'll have to check this.
I'll try to write some sample ivys later this day or next weekend
and test wether this actually works.
Ciao,
Kili