I got a multi level maven project as follows;
Core (generate core jar)
web-service (generate service jar)
If you run maven commands in the child directory it won't know about sibling or parent dependencies. I find it easiest to run the maven commands in the outermost parent root directory with multi module projects. If you just want to build some descendent project (let's call it
foo) then from the parent you can do:
mvn install -pl :foo -am
pl flag is a list of artifacts you want to build and the
am flag means also build their dependencies.