释放模块w.通过詹金斯的不同版本的多模块Maven项目 [英] Release modules w. different version of multimodule maven project through jenkins

查看:70
本文介绍了释放模块w.通过詹金斯的不同版本的多模块Maven项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用maven设置了一个多模块项目.

I have setup a multimodule project with maven.

hierachie是 -父母 -模块1 -模块2 -模块n

hierachie is - parent -- module 1 -- module 2 -- module n

我想知道如何在Jenkins中仅发布该项目的一个模块.

I am wondering, how I can release just one single module of this project in Jenkins.

不胜感激.

谢谢

推荐答案

没问题,请使用

No problem with that, go for the maven-release-plugin and release the modules of interest only.

您应该从父母开始.然后,继续其他(假设继承到位,而这些不是父级的子模块).此外,由于模块之间可能存在依赖关系,因此请确保遵循以下规则:即将发布的模块上没有SNAPSHOT依赖关系.

You should start with the parent. Afterwards, go for the others (assuming inheritence is in place, and these are not submodules of parent). Moreover, as there might be dependencies between modules, make sure to follow the rule, that: there are no SNAPSHOT dependencies on the module you're about to release.

要获得更深入的了解,请查看maven-release-plugin的官方文档,或使用

For deeper understanding, check the official docs of maven-release-plugin, or go for the link (that seems to summarize/detail steps on release, even the background things happening).

每个模块要完成的步骤是:

Steps to be done on each module are:

  • preparation for release
  • performing a release

此外,由于您对Jenkins发行版感兴趣,因此您应该寻求:

Moreover, as you're interested in Jenkins release, you should go for: non-interactive release

好吧,发布插件可能很难正确使用/习惯,但是一旦安装完毕,并假设将为此目的创建Jenkins作业,事情就应该解决并顺利发布.

Well, release plugin might be a pain to use properly/get used to, but once it's setup, moreover assuming Jenkins jobs would be created for the purpose, things should get settled and releases smooth.

这篇关于释放模块w.通过詹金斯的不同版本的多模块Maven项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆