Maven with an explicit finalName won't work properly

前端 未结 5 593
说谎
说谎 2021-01-17 10:46

1. Background

My maven project has a lot of modules and submodules with jars and wars and everything works. I also can dep

5条回答
  •  既然无缘
    2021-01-17 11:27

    This is issue with attribute inheritance.
    Try to use ${parent.name} instead of ${project.parent.name}.
    Look at: Project name declared in parent POM isn't expanded in a module filtered web.xml.

    ---UPDATE---

    Benjamin Bentmann (maven committier) said: "In general though, expressions of the form ${project.parent.*} are a bad practice as they rely on a certain build state and do not generally work throughout the POM, giving rise to surprises".

    https://issues.apache.org/jira/browse/MNG-5126?jql=text%20~%20%22parent%20name%22

    Maybe you should consider is using ${project.parent.*} is a good way.

提交回复
热议问题