巡航控制 - 父/子项目

发布于 2024-08-15 04:23:56 字数 350 浏览 12 评论 0原文

我正在使用巡航控制来不断检查我的项目,到目前为止,除了一些小问题外,它似乎比连续体工作得更好。

如果我有一个项目依赖于其他几个项目,并且我更新了其中一个依赖项而不更新其版本号,因此不需要更改父 pom,则父项目将永远不会被重建。

这是可能的,还是我应该在每次更改后返回并继续增加 pom,然后根据需要在父级中进行相应的更改?

我希望这能自动完成(如果巡航控制有更紧密的 Maven 集成),这样我就会神奇地知道这个变化破坏了下游的某些东西。

我猜我的新格式可能是:

${date}.${buildNumber}

2009.12.18.1

谢谢, 瓦尔特

I am using cruise control to constantly check my projects and so far it appears to be working better than continuum except for some minor issues.

If I have a project that depends on several other projects and I update one of those dependencies without updating its version number thus requiring no change in the parent pom, the parent will never get rebuilt.

Is this possible, or should I just go back and keep incrementing the pom after each change then make the corresponding changes in the parents as needed?

I was hoping this would be done automatically (if cruise control had tighter maven integration), so that I would magically know this change broke something downstream.

I am guessing my new format will probably be:

${date}.${buildNumber}

2009.12.18.1

Thanks,
Walter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

秋心╮凉 2024-08-22 04:23:56

如果您的项目在 Maven 中处于父子关系,则每次使用 install 目标时,构建父项目还应该使用新解析的依赖项构建其模块。

根据您的描述,听起来您没有带有模块的父项目,而是有一些相互依赖的独立项目。在这种情况下,我建议你做两件事:

  1. 更改 poms 顶层的版本,并在末尾包含 -SNAPSHOT 。这会强制 Maven 在指定的时间范围内检查任何依赖项的新版本 - 默认情况下每天检查一次。可以通过专门更改存储库的 updatePolicy 来更改此行为 - 您可以拥有它如果您愿意,请每次检查一次。当涉及到标记并构建/发布项目时,您需要删除该版本的 -SNAPSHOT 限定符,然后在增加版本号后将其重新添加回来以支持下一个开发周期。
  2. 在 CI 服务器中,您可以强制连续构建项目。由于看起来您已切换到 Hudson,因此它应该涉及根据另一个项目的完成情况设置构建触发器,就像您想为 scm 轮询添加触发器一样。

If your projects are in a parent->child relationship in maven, building the parent should also the build its modules with the newly resolved dependencies everytime if you are using the install goal.

Based on your description, it sounds like you don't have a parent project with modules but instead of a handful of separate projects with dependencies between them. In this case, I would suggest you do two things

  1. Change the versions in top level of your poms and in your to include -SNAPSHOT on the end. This forces maven to check for new versions of any dependency in a specified timeframe - daily by default. This behavior can by altered by specifically changing the updatePolicy for your repositories - you can have it check every single time if you wish. When it comes to tag and then build/release your projects, you'll want to remove the -SNAPSHOT qualifier for the release, and then re-add it back in after incrementing your version number to support your next development cycle.
  2. In your CI server, you can force projects to build in succession. Since it looks like you switched to Hudson, it should involve setting up build trigger based on the completion of another project just like you'd like add a trigger for scm polling.
最好是你 2024-08-22 04:23:56

不幸的是,我对巡航控制了解不够,无法直接回答您的问题。

不过,我在 Hudson 方面获得了积极的体验。 Hudson 被广泛用作 CI 服务器,是免费的,并且具有出色的 Maven 集成,并且可以完美处理您所描述的内容。

Unfortunately I don't know enough about cruise control to directly answer your question.

However I have had positive experience with Hudson. Hudson is widely used as a CI server, is free, and has excellent Maven integration plus handles what you describe perfectly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文