If you're working on the projects A and B independently, you need to have artifact A in a repo first. The easiest way is to do a mvn install on project A first. That will "install" that into the local repo so it can be found/used by other projects (on your computer). So, now you can build project B.
/Anders On Mon, May 31, 2010 at 18:26, Rob Greene <robgre...@gmail.com> wrote: > I think this is a basic Maven module question, but I'm not spotting > anything > via google. I assume that when unit testing a multi-module project I can > unit test module-by-module instead of having to do the entire parent > project. > > Generally, I have a multi-module project hierarchy. I have the master > project (P) with modules A and B. A is an SPI interface project and module > B depends on A for those interfaces. I checkout the master project which > has A and B nested within the project, so all the code is present. When I > run unit tests via the master project (P), dependencies work and all unit > tests run. When I run just module B's unit tests, Maven complains that it > cannot find the POM for module A. These are SNAPSHOT releases, so I assume > I should be able to have maven locate A's code somewhere. > > The message is "Failed to resolve artifact". And it reports module A is > missing. > > Both module A and module B have a parent of P and P has modules A and B. I > am using m2eclipse 0.10, but I tried mvn 2.21 from the command line also. > > What am I missing? > > Thanks! > -Rob >