In a Maven project, how can I automatically update the version all child modules, plus the parent?

前端 未结 4 615
梦谈多话
梦谈多话 2021-01-30 02:05

I have a multi-module project.

parent POM (1.0-SNAPSHOT)
|-- module1 (1.0-SNAPSHOT)
|-- module2 (1.0-SNAPSHOT)
`-- module3 (1.0-SNAPSHOT)

When I execute m

4条回答
  •  不知归路
    2021-01-30 02:33

    There is a potentially better option over at https://issues.apache.org/jira/browse/MNG-624?focusedCommentId=14415968&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14415968

    That is a workaround for the fact that you can't refer to the top level pom in the sub-module poms without having an explicit version listed. (which is what bug MNG-624 is about) It explains how you can have a single location for the version (in a top-level profiles.xml file), and simply have a property references in all the pom.xml files (i.e. ${currentVersion})

    However, in this scheme release:prepare probably won't update profiles.xml for you.

提交回复
热议问题