问题
I have setup a multimodule project with maven.
hierachie is - parent -- module 1 -- module 2 -- module n
I am wondering, how I can release just one single module of this project in Jenkins.
Would appreciate any comments.
Thank you
回答1:
No problem with that, go for the maven-release-plugin and release the modules of interest only.
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.
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
Moreover, as you're interested in Jenkins release, you should go for: non-interactive release
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.
来源:https://stackoverflow.com/questions/20075382/release-modules-w-different-version-of-multimodule-maven-project-through-jenkin