I googled this and it seems that no one has an answer, yet it seems like such an elementary thing that it should be possible.
I have the following project structure:
You should have a master pom at parent's level, in which you will list the modules of your project.
sub-project1
sub-project2 >
In each subproject you have to reference your parent:
parent
mygroup
1.0-SNAPSHOT
And you specify the dependencies between the project just as you did. I think you've missed some of the steps I've described.
Edit: you should issue your mvn clean install at the parent level.