Spice up your JavaFX project with maven

Click here to download:
MavenFX.zip (7 KB)

JavaFX is a promising technology for nice Rich Internet Applications (RIA). However this is a quiet recent product (it was introduced by Sun at JavaOne, May 2007) and still lacks at integration with continuous development environments like hudson. Continuous integration is great because it reduces the gap between the development process and the release phase. With continuous integration, the work made by the developers is continuously compiled and tested against unit tests. This helps detecting many problems very early and simplifies the whole development process.

Hudson is an integration server that works very nicely with maven projects. So the first step to integrate a JavaFX project into our continuous integration environment was to "mavenize" the project. Jfrog has developed a javafx plugin for maven that integrates the compilation of the javafx sources into the maven lifecycle. Moreover it can generate a jnlp to launch the project. 

However, this plugin is by default configured to work with artifactory. For some reasons you might want to use it without artifactory, and that's possible. Just checkout the attached project to see how to configure it. Since artifactory takes care of some jnlp deployment issues, some additionnal plugins are required in this case: the dependency-plugin will copy the dependencies at the codebase directory of the jnlp and the jar-signer plugin will sign these jars.

At this step your project is fully integrated in the maven world. The last step is to deploy automatically the jnlp and required jars on a server to test your project. This can be achieved with the wagon plugin and its ftp extension (see attached project for an example of configuration). Then hudson can automatically deploy your application after each build by calling the mvn:deploy target. Enjoy!

Note: in the attached project, we use profiles (see profiles.xml) to configure the project dynamically whether this is intended to be run locally or deployed on a remote server. The "dev" profile allow you to run the project locally (using mvn clean package jfrog-javafx:excute) and the "prod" profile if for deployment (mvn -P-dev,prod deploy)

John hudson and continuous integration

Capture

We were thinking about a solution to keep up our google chatroom up even we all get disconnected. We were thinking about a bot when I remembered about a jabber plugin for hudson - actually, if we use a bot on the chatroom, why not hudson?

So we installed the plugin and after some configuration (make sure you configured it both in the global hudson configuration and in the project configuration, since it is not activated by default), we finally welcomed John Hudson as new colleague in our chatroom. This way we get informed of various events (build start, build failed,...fully configurable) directly in the chatroom.
And you know the best? We can even control hudson from jabber using simple commands such as !build myproject 
Simple and amazing. Continuous integration is great!