简体   繁体   English

在多模块Maven项目中仅发布一个模块

[英]Release only one module in multimodule maven project

I have one Multimodule maven projects which has nearly 20 modules. 我有一个多模块Maven项目,其中有近20个模块。 there is one common module which changes rarely and other 19 are independent of each other. 有一个通用模块很少更改,其他19个模块彼此独立。 Issue is when I change one module and go for release with hudson, It releases all modules. 问题是当我更改一个模块并与hudson一起发布时,它会发布所有模块。

If I go to specify version number for each module, it is very tedious job to change all numbers. 如果我要为每个模块指定版本号,那么更改所有编号是非常繁琐的工作。

It is like increase in version number unneccessarily and also wastage of time/memory. 就像不必要地增加了版本号,也浪费了时间/内存。 For eg if I change each out of 19 twice , the common version will go to 1.39 or 39.0 which I don't want to avoid confusion. 例如,如果我将19个表中的每一个都更改两次,则通用版本将变为1.39或39.0,我不想避免造成混淆。 we are using standard release plugin. 我们正在使用标准发布插件。

Is there any way to manage release such that we can release only one module instead of whole project. 有什么方法可以管理发布,以便我们只能发布一个模块,而不是整个项目。

Thanks 谢谢

Just go into your module's directory: 只需进入您模块的目录:

cd module19
mvn deploy

To release with hudson, just make a job for each submodule ( module1 through module19 ) and a job for the common module and the parent pom (use mvn -N to deploy the parent pom). 要与hudson一起发布,只需为每个子模块( 模块1模块 19 )创建一个作业,并为公共模块父pom (使用mvn -N部署父pom)创建一个作业。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM