I have two maven projects: project-api project-impl
project-impl's POM specifies a dependency on project-api. The top level aggregation pom lists modules project-api and project-impl.
If I run compile at top level, the dependencies resolves correctly. If I run compile at project-impl, then it can't find dependency project-api. How can I set up maven such that when project-impl compiles, it first compiles and collects its dependencies on other projects?