I’ve a question regarding the use of a local parent pom, when it comes to deployment and release of artifacts which use this parent’s pom.
Imagine the following multi module maven projects:
- pom.xml (Aggregator)
|
— Submodule 1
|
— pom.xml
|
— Submodule 2
|
— pom.xml
|
— parent
|
— pom.xml
Now, I use the parent/pom.xml as parent (with relative path!) in Submodule 1, respectively Submodule 2. Within the aggregator pom, we define both submodules.
If we now try to deploy them with mvn deploy
we face the error, that the parent pom isn’t available in maven central. Okay, fine. But: If I add the parent/pom.xml as a submodule to the aggregator, the deployment works. (nothing else changed)
As I really like to understand that behavior to think of possible pro’s and con’s, I would appreciate if someone could explain that 🙂
Thank you!
I tried what I mentioned, including the parent pom.xml as submodule and not.