You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rob McAuliffe <Ro...@volantis.com> on 2008/01/29 18:37:16 UTC

multi-module/subproject projects with interdependencies

Hi,

I'm trying to get a project which has multiple modules to compile at the 
top level.   Some of my submodules have dependencies on each other - eg 
i have A B and C submodules, and C depends on B, but A doesn't.  
Currently when I run mvn package from the top level project, each 
subproject/submodule gets built, but it fails on the ones that depend on 
their peers (eg. fails on C in previous example)  saying that it can't 
find the jar.  I can obviously jump into the directory and run an 
'install', but that's not neat, or I can run "mvn install package", but 
that's not massively neat either.

This is part of a larger attempt to get the whole build process 
integrated across multiple projects stored in separate locations in 
version control, so I really need an automated solution.

Is there an existing approach/recommended best way to do this?

Thanks,

Rob

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


Re: multi-module/subproject projects with interdependencies

Posted by Wayne Fay <wa...@gmail.com>.
If you have <parent>, <modules>, and <dependencies> tags set up
properly in the various poms, this should all "just work". There's a
ton of us who are doing exactly this day in and day out.

I think you've got something wrong in your poms. If you can't figure
it out, feel free to post them on pastebin.org and someone will
probably take a look, no guarantees of course. ;-)

Wayne

On 1/29/08, Rob McAuliffe <Ro...@volantis.com> wrote:
> Hi,
>
> I'm trying to get a project which has multiple modules to compile at the
> top level.   Some of my submodules have dependencies on each other - eg
> i have A B and C submodules, and C depends on B, but A doesn't.
> Currently when I run mvn package from the top level project, each
> subproject/submodule gets built, but it fails on the ones that depend on
> their peers (eg. fails on C in previous example)  saying that it can't
> find the jar.  I can obviously jump into the directory and run an
> 'install', but that's not neat, or I can run "mvn install package", but
> that's not massively neat either.
>
> This is part of a larger attempt to get the whole build process
> integrated across multiple projects stored in separate locations in
> version control, so I really need an automated solution.
>
> Is there an existing approach/recommended best way to do this?
>
> Thanks,
>
> Rob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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