Is there an easier way to force maven to build the parent before the modules ?
Use case: I'm trying to understand what is the best practice to solve the following problem
I have two projects that I will name 'A' and 'B' They both have a parent that I will name 'P'
'P' have a dependency management for shared resources this will allow using the same version for shared artifacts.
'P' is also used to run 'A' and 'B' as modules.
The problem: When a new artifact is added I'm adding the version in 'P' and the dependency at 'A' (for example). now when doing a maven clean install I'm getting 'dependencies.dependency.version' is missing for .
This is due to the fact that maven first builds it's modules before himself and then 'A' doesn't have the version.
I know that I can put in 'A' pom under the following: ../ and it works (but no always).
Back to my question: is there an easier way to force maven to build the parent before the modules ?