Maven managed dependencies - resolving ${project.version} from parent pom

后端 未结 1 1308
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 01:19

How is placeholder ${project.version} resolved for managed properties from parent pom? I\'ve expected that it is resolved globally, so when the parent pom has

相关标签:
1条回答
  • 2020-12-29 02:04

    You have to skip <version> tag in child, but keep the <parent><version> ... </parent> tag.

    http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance

    One factor to note is that these variables are processed after inheritance as outlined above. This means that if a parent project uses a variable, then its definition in the child, not the parent, will be the one eventually used.

    0 讨论(0)
提交回复
热议问题