本文翻译自:Updating version numbers of modules in a multi-module Maven project
I have a multi-module maven project. 我有一个多模块的Maven项目。 We intend to version all these modules together. 我们打算将所有这些模块一起版本化。 But as of now I am ending up hard-coding version in each of the module pom.xml as below 但是到目前为止,我将在每个模块pom.xml中结束硬编码版本,如下所示
<parent>
<artifactId>xyz-application</artifactId>
<groupId>com.xyz</groupId>
<version>2.50.0.g</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.xyz</groupId>
<artifactId>xyz-Library</artifactId>
<version>2.50.0.g</version>
and the main parent module has the below configuration 并且主父模块具有以下配置
<modelVersion>4.0.0</modelVersion>
<groupId>com.xyz</groupId>
<artifactId>xyz-application</artifactId>
<version>2.50.0.g</version>
<packaging>pom</packaging>
#1楼
参考:https://stackoom.com/question/O1fX/在多模块Maven项目中更新模块的版本号</