Having a dependency on a module, does NOT mean that it will be built! If you 
have a dependency on JUnit,
it is also only copied from your local repository. The only reason for a POM to 
build another module is when
it is defined in the <modules>-list.

So, if you go into your modA and run a 'mvn install', then change to modB and 
do the same, everything should
work fine (presuming the groupId's and artifactId's are correct of course).

As you've already said, calling a 'mvn install' in the root dir works, because 
there you've defined your <modules>!

Hope this helped,

Roland




On Monday 29 May 2006 17:35, Douglas WF Acheson wrote:
> Hello,
>
>   Now that I have been working with M2 for sometime, I still feel like a
> noob :-)  Anyways, here is my scenario and question:
>
> I have create a structure such as
>
> dir/project
> dir/project/modA
> dir/project/modB
> dir/project/modC
>
> I have a pom for each module (which include the project level pom as its
> parent), and a pom at the project level. The project level pom includes
> the module tag, which identifies the correct modules.  When I issues m2
> commands from the top level directory everything (so far) seems to work.
> But, when I issues commands from certain modules, it does not work the
> way I expected.  Here is the issue
>
> Module B depends upon module A, so when I want to compile and test only
> module B, I get an error that the dependency for module A cannot be
> found in the repository.  I understand this error, but do not know why
> it is happening.  I expect that since module B is dependant upon module
> A (as this is listed in the dependency section) that A would be built
> for B.  But, it does not.  Why is this the case.
>
> Regards,
> Douglas WF Acheson
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to