You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Váry Péter <va...@wildom.com> on 2007/06/07 18:15:05 UTC

War plugin transitive dependency

Hi all,

For the "short version" jump at the end of the letter :o)

---------------- long version

I am new to maven, but impressed with the features, and possibilities. I would like to migrate our ant based build system to a maven based one. The main reason is dependencies, especially transitive dependencies.

We have approximately 50 small modules, and about half of them are web modules, with plenty of - tree structured - dependencies. There are dependencies between the web modules as well (say news web module depends on HTML editor web module, and user web module depends on group web module, and most importantly portal web module depends on news, and user module)

There are more than 70 small websites using these modules, and some own code, and web resources (jsp, js, css etc.) to build wars running on tomcat.

In our current build system in every module we package the classes in a jar, and put the web resources in a stub. And for the products we collect these stubs, and jars, and merge it along with the product specific ones.

---------------- short version

With using the war plugin, we can declare transitive dependencies, A depends on B, and B depends on C. With SNAPSHOT versions I would like to see every changes in C appear immediately in A, without any manual interaction (or as few as possible).

I have tried another way to create assemblies from warstub-s, but I was unable to declare them as dependencies.

Any idea how can I solve this problem with maven?

Thanks,
Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: War plugin transitive dependency

Posted by Jo Vandermeeren <jo...@gmail.com>.
On 6/7/07, Váry Péter <va...@wildom.com> wrote:
>
> With using the war plugin, we can declare transitive dependencies, A
> depends on B, and B depends on C. With SNAPSHOT versions I would like to see
> every changes in C appear immediately in A, without any manual interaction
> (or as few as possible).



Hi Peter,

Maven depends on artifacts which installed in your repository.
When depending on SNAPSHOT versions, Maven will use that latest installed
(or deployed, determined by the check interval) version of the dependency.

So, if you have made changes in C, don't expect B and A to see them, unless
module C has been (re)installed in the repository.
When you build from a common parent (which contains A, B and C as modules),
Maven will order the module's build based upon defined dependencies between
them.
This is why builds started from the parent level, can guarantee that B and A
will see the latest changes made in C.

Cheers
Jo