在 jenkins 构建服务器上使用 ant 的良好替代方案
嘿,那里。我有许多使用 Apache ant` 构建的软件项目(也包括 iOS 和 OSX)。
虽然我很喜欢 Ant,但它通常过于冗长,而且一些本应简单的事情却非常棘手,或者我必须将 shell 脚本与 ant 一起使用。
有没有一个好的替代方案,它可扩展、易于使用并且应该在我的詹金斯构建服务器上运行良好。
感谢您的意见。
Hy there. I have a number of software projects (also iOS and OSX) which I build with Apache ant`.
Although I quite like Ant it is often too verbose and some things which should be easy are quite tricky or I have to use shell scripts along with ant.
Is there a good alternative for which is extensible, easy to use and should work well on my jenkins build server.
Thanks for your input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
看看 Gradle - 它与 Ant 有很大不同,可能需要一些时间才能理解,但是我认为这将成为构建系统的新标准。一件好事是它在底层具有完整的 Ant 支持,因此您可以轻松地运行现有的 Ant 构建,然后将它们移植到 Gradle。
Have a look at Gradle - it's quite different from Ant and may take a little while to get your head around, but I think it's going to be the new standard for build systems. One nice thing is that it has full Ant support under the hood, so you can easily get your existing Ant builds running and then port them to Gradle.
Gareth 对 Gradle 的回答很好。但一定要看看你正在做的事情对 Ant 来说是困难的。根据我的经验,相当一部分时间是“非构建”的东西。也许将 Ant 留给纯粹的构建内容,并使用替代工具来部署或测试隐藏在其中的内容。
Gareth's answer of Gradle is a good one. But do take a look at what you are doing that is hard with Ant. In my experience, a fair portion of the time its "non-build" stuff. Perhaps leave Ant for the pure build stuff, and use an alternate tool for and deploy or test stuff that's snuck in there.
虽然 gradle 看起来很有前途,但我决定使用 Rake 代替。
我应该说这是一个有偏见的决定,因为我已经在构建设置中的其他部分使用了 ruby。我发现了一篇很好的 Martin Fowler 的文章
另一点是,通过进行 OSX 开发,平台独立性 - Ant(或 Gradle)的方面对我来说没有那么大的分量。
Although gradle looks very promising I decided to use Rake instead.
I should say that this is a biased decision since I am already using ruby for other parts in my build setup. I found a good Article by Martin Fowler
Another point is that by doing OSX development the platform-independence-aspect of Ant (or Gradle) does not have such a big weight for me.
顺便说一句,Besi 的 Rake 答案:
JRuby 的 Rake+Ant 集成似乎是一个非常强大的组合:
http://www.engineyard.com/blog/2010/rake-and-ant-together-a-pick-it-n-stick-it-approach
一大优点是,它完全支持与 Ant 集成,允许逐步迁移..恕我直言,这对于大型现有项目来说是唯一可行的策略。
Gradle 看起来很相似,虽然看起来不错;我认为学习 Rake 可能是一项更好的投资,因为它在 Java 之外更通用。
(我正在认真考虑的另一件事是 BuildR http://buildr.apache.org,但 Jenkins 确实如此尚未明确支持它,因此必须使用脚本化构建步骤,这似乎不太可取:BuildR 插件)。
BTW Besi's Rake answer:
JRuby's Rake+Ant integration seems like a really powerful combo:
http://www.engineyard.com/blog/2010/rake-and-ant-together-a-pick-it-n-stick-it-approach
One big advantange there, it fully supports integration with Ant, allowing step-by-step migration.. which IMHO is only viable strategy for large, existing projects.
Gradle seems similar and while it looks good; I think learning Rake could be a better investment as it's more universal outside of Java.
(The other thing I'm seriously considering is BuildR http://buildr.apache.org, but Jenkins doens't explicitly support it yet, so have to use scripted build steps, which seems less preferable. TODO: a BuildR plugin).