开发者

Using Hudson and Maven release plugin to release multiple projects

I have three maven projects. Lets say A, B and C. Each of these projects are multi-module projects that have a flat directory structure.

Project C depends on project B. While, project B depends on project A.

At the moment, I can successfully do continuous integration using Hudson of all the three projects.

What I want to do is to use the maven-release-plugin to do a release for all the three projects in one go. As far as I understand, maven-release-plugin requires the dependencies to be full releases and not a SNAPSHOT version.

I need to maintain the SNAPSHOT version number so that Eclipse workspace resolution can maintain project interdependency during the development phase.

Since these projects have a hierarchical dependency, the projects have to be released in sequence, while updating the dependency SNAPSHOT version in succession.

Any ideas on how I can achieve this?

I don't think maven-release-p开发者_如何学JAVAlugin can achieve this. At least, from what I've learned. I am guessing I'll have to run a separate Hudson job that will update the dependency version number as the projects are released.


What about creating a build sequence?

Consider following configuration, you got a following jobs.

  • Project-A-Release-Job
  • Project-B-Release-Job
  • Project-C-Release-Job

Moreover
If Project-A-Release-Job is built it triggers Project-B-Release-Job,
If Project-B-Release-Job is built it triggers Project-C-Release-Job

In this case releasing any of these project will force to release a next one.

Consider usage maven-versions-plugin in combination of scm plugin in order:
1. Verify new release/snapshot versions are in repository
2. Update dependency versions in POMs
3. Commit updated Poms to SCM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜