如何使用 Hudson 构建 Play 项目?

发布于 2024-10-09 14:05:25 字数 655 浏览 1 评论 0原文

我有一个使用 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 技术交流群。

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

发布评论

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

评论(4

无妨# 2024-10-16 14:05:26

您可以在我写的这个页面上找到一些帮助:
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.

月亮邮递员 2024-10-16 14:05:26

只是查看了您链接的存储库(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

睫毛上残留的泪 2024-10-16 14:05:26

理论上,您可以将完整的 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.

被你宠の有点坏 2024-10-16 14:05:25

无需在 Hudson 服务器上安装 Play 框架即可完成此操作,但它相当复杂:

  1. 将 play 库(play.jar 及其依赖项)放入 Maven 存储库中
  2. 为您的项目创建一个 pom.xml,配置为:
    • 这些库作为依赖项
    • 您的项目特定依赖项(项目 lib 目录)
    • 项目的 java 源文件夹(在 maven-compiler-plugin 中):“app

如果您的项目很简单(没有模块依赖项),此 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:

  1. Put the play libraries (play.jar and its dependencies) in a Maven repository
  2. Create a pom.xml for your project, configured with:
    • theses libraries as dependencies
    • your project specific dependencies (project lib directory)
    • the java sources folder of your project (in the maven-compiler-plugin): "app"

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).

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