I'm trying to link together a set of disjoint maven projects into a standard multi module project.
The interesting thing is that the modules are currently not arranged in a natural heirarchy. If I link together with a parent pom, then the reactor won't start up until I add relativePaths
to the parent stanza in the child pom XML files.
If the GAV details are correct in the parent version vs the child, and the child modules are all linked in the parent pom - shouldn't this be enough?
in simple terms - for a non-standard directory structure, is the relativePath
strictly necessary for a multi module maven project?
Thanks, Ace
in simple terms - for a non-standard directory structure, is the relativePath strictly necessary for a multi module maven project?
The answer is: Yes!
If the parent is not yet installed in the local repository and if the directory structure is for example:
.
|-- my-module
| `-- pom.xml
`-- parent
`-- pom.xml
The child modules cannot inherit the groupId / version of their parent POM without setting the <relativePath>
element.
See http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Example_2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With