如何使用 Hudson 构建 Play 项目?
我有一个使用 Play 框架的项目,公司标准是所有项目都应由 Hudson 构建。但是,我不知道如何执行此操作,因为 Hudson 不遵循任何 Java 标准,并且需要在其运行的计算机上安装框架。我尝试使用 Maven 构建该项目(如果我成功做到了这一点,将其添加到 Hudson 应该非常简单),但我未能使其正常工作。我尝试了 Play Maven 模块,但 Maven 声称它找不到列出的外部存储库( http://nexus.infin-it.fr/content/groups/public )。这可能是因为我位于防火墙后面。我还尝试了此处列出的食谱,但是本地maven构建失败,因为找不到org.playframework:play:1.1:jar
。
有人这样做过并且可以提供操作方法吗?
I have a project that's using the Play framework, and the corporate standard is that all projects should be built by Hudson. However, I cannot find out how to do this, as Hudson does not follow any Java standards, and requires the framework installed at the computer it runs on. I have tried to build the project with Maven (if I had managed this, adding it to Hudson should be quite simple), but I have failed to make it work. I tried the Play Maven module, but Maven claims it does not find the external repo that is listed (http://nexus.infin-it.fr/content/groups/public). This might be because I am behind a firewall. I also tried the recipe listed here, but the local maven build fails because it is unable to find org.playframework:play:1.1:jar
.
Has anyone done this and can provide a howto?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以在我写的这个页面上找到一些帮助:
http://blog.infin- it.fr/2010/12/15/play-framework-integration-continue-retour-dexperience/
即使是法语,我也把我的 Ant 东西和我写的 Play 的 pom 放上去。
在工作中,我们设法将 Play 应用程序与 Bamboo 集成。
我的文件应该不难。
You can find some help on this page I wrote :
http://blog.infin-it.fr/2010/12/15/play-framework-integration-continue-retour-dexperience/
Even if it's in French, I put my Ant stuff and the Play's pom I wrote.
At work we managed to integrate our Play applications with Bamboo.
It should not be difficult with my files.
只是查看了您链接的存储库(http://nexus.infin-it.fr/content/groups/public)。你猜怎么着,我找到了 play-1.1.jar。但是,工件 ID 是:org.play:play:1.1:jar 而不是 org.playframework
Just looked at the repository, that you linked (http://nexus.infin-it.fr/content/groups/public). And guess what, I found the play-1.1.jar. However, the artifact ID is: org.play:play:1.1:jar and not org.playframework
理论上,您可以将完整的 Play zip 放在构建中或存储库中,然后使用 Hudson 启动 Ant 脚本,将 Play 下载到 Hudson 代理,解压缩,然后在其上运行命令。它有点笨重,但应该可以工作。
In theory, you could put the full Play zip on your build or in in your repository, and then use Hudson to kick off an Ant script to download Play to the Hudson agent, unzip it, and then run commands on it. It's a little clunky, but it should work.
无需在 Hudson 服务器上安装 Play 框架即可完成此操作,但它相当复杂:
如果您的项目很简单(没有模块依赖项),此 pom 允许您使用 Maven 构建 play 项目 java 源。
如果您的项目有模块依赖项,则必须在 pom 依赖项中添加依赖项 jar。
为此,如果模块没有打包的 jar,则必须从模块创建 jar 文件(例如,获取 CRUD 模块的“CRUD”类)。
It can be done without installing the Play framework on the Hudson server, but it is quite complicated:
If your project is simple (no module dependencies), this pom allows you to build the play project java sources using Maven.
If your project has module dependencies, you will have to add the dependencies jar in your pom dependencies.
To do that, you will have to create jar files from the modules if they don't have packaged jars (to get the "CRUD" class of the CRUD module for example).