java - How does maven resolve a parent pom? -
i came accross problem , want understand it.
story
maven version 3.2.1. had multi-module project structure this:
mainmodulea -pom.xml -submoduleb --pom.xml --submodulec ---pom.xml -submoduled --pom.xml --submodulee ---pom.xml
the submodules child of module in parent folder. none of them have relativepath
in parent
element in pom, means far know ../pom.xml
. problem was, submodulec
has become new dependency, , submodulee
depending on submodulec
. version of new dependency of submodulec
managed in mainmodulea
. in local repository , in company repository still old version of mainmodulea
, did not contain managed version. workspace folder structure contained correct mainmodulea
pom. if have built submodulee
alone, have got warning transitive dependencies of submodulec
ignored because of missing managed version, , results compilation errors.
resolution priority
what order of possibilities used maven parent pom?
based on experience above:
- maven local repository
- maven remote repository
- tracking down in folder structure based on
relativepath
tags ofparent
tags.
am right statements above? can prove somehow? did not find relevant documentation.
Comments
Post a Comment