Hi Arnaud,

apologies for not being clearer in my first email, I'll try to explain better now.

I have a parent pom which contains some dependencies and two child projects included via modules.

parent pom.xml
   <modules>
        <module>../child1</module>
        <module>../child2</module>
    </modules>

if I execute 'child1>mvn install' then the war is built correctly with only the deps I need at runtime.

if I execute 'parent>mvn install' the child war is built except the WEB-INF/lib contains many additional jars which are only required at build time.

confused?  I am :)

cheers
Nathan

Arnaud Bailly wrote:
Nathan Coast <[EMAIL PROTECTED]> writes:

Hi,

I'm fairly new to maven 2 and am having some trouble with module
dependencies.

I have a war project that builds fine when I build it in
isolation. However, when it is built from the parent project (via the
modules mechanism) all of the dependencies from all of the modules end
up in the WEB-INF/lib directory.  This includes plugin dependencies
which are only needed at build-time.


Hello,
I am deducing (maybe wrongly) from your post that your module do not
use parent pom which defines dependencies that are then included in
the war file.
There is a notion of scope for dependencies that handles just this
problem.

Fairly obviously I have done something wrong, I just can't see
what. Feel free to rtfm me if I've missed the relevant docs :)


Maybe readin Better Build With Maven would help :-) Look at
maven.apache.org/guides for more info.

regards


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

Reply via email to