开发者

How can I tell Hudson to build the modules instead of the jobs?

I have a alot of jobs on Hudson, most of which are really small and consist of just a few modules. But one is big and consist of several modules.

When ever I make a commit to our subversion repository for any of those several modules in that big job, Hudson builds the entire job instead of ju开发者_如何学编程st the module that have changed.

It doesn't matter if I just scm-polling or a subversion hook, the result is the same.

It seems to me like it would be better if the modules where built instead of the jobs since the other modules in other jobs have dependencies to the modules and not to the jobs.

Can this be configured or do I have to create several jobs instead of the big one? And if so, can I configure the big job to never build when any of it's modules are being triggered but still build when it's own pom.xml is changed?

Thanks.


Hudson has an "Incremental Build" option in the Maven area of the job configuration.

It's hidden in the "Advanced" area.


You could make use of the reactor plugin. For example:

mvn reactor:make-scm-changes

This will only build those modules that have been changed in the SCM. Follow the link for other examples.


Doesn't your compiler offers you the incremental compile option? The java 1.6 compiler usually searches for class and source files and decides using the timestamp to determine whether to use the source or class file. Just leave out the clean goal when building your code.

Another option would be to first run a batch/shell script to determine what files changed and delete the corresponding class files so that the compiler incrementally builds the class files that are missing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜