Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I build a Play project with Hudson?

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?

like image 810
mranders Avatar asked Dec 29 '10 14:12

mranders


3 Answers

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

like image 55
Benoit Courtine Avatar answered Nov 18 '22 18:11

Benoit Courtine


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.

like image 2
Jean-Philippe Briend Avatar answered Nov 18 '22 18:11

Jean-Philippe Briend


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

like image 1
Peter Schuetze Avatar answered Nov 18 '22 19:11

Peter Schuetze