|
|
||
Fabrizio Giudici's BlogSetting up NetBeans-based projects with a Continuous Integration serverPosted by fabriziogiudici on November 17, 2006 at 05:04 PM | Comments (9)Continuous Integration (CI) servers are facilities able to monitor changes in a source repository (e.g. CVS or Subversion) and schedule a new build automatically, in order to verify if the new committed code broke the stability of the system. They are installed on remote servers and usually don't run on programmers' computers - so apparently a problem arises if we're thinking of projects developed with the NetBeans IDE. As most CI products can be easily configured by just pointing them to a I've been recently able to setup some projects of mine by using Hudson, a simple but effective CI product that is getting increasing attention by users (in any case most of what I'm saying should apply to other products as well). Basically things are different according to the following project profiles (which I've experimented):
Dealing with projects of type 1 is straightforward, as NetBeans-generated Dealing with projects of type 2 is slightly more complex, as your projects needs some extra-JRE libraries in the classpath (e.g. if you used Matisse, you need The first thing to do is to store in the server a working NetBeans installation. As NetBeans can't be installed text-only, the only feasible solution is to install the GUI on another computer, then zip the installed files and unpack them on the server. If you need to upgrade the NetBeans GUI with the latest patches or to install some extra plugin, do it before creating the .zip, as manually patching an installation is tricky. As the NetBeans file setup is the same for each operating system, you don't need to zip the file on the same platform as your target - for instance, I was able to .zip the files on my MacBook Pro and have them working on a remote Linux box. This was easy. The second step is to setup a user profile, that is the settings that are usually stored into a directory named
It's to be pointed out that the above steps have to be performed once for all, when you first create your enviroment. The final step is to fix something inside your project workspace. Go to the user.properties.file=/home/tomcat/HudsonWorkspace/.netbeans/5.5/build.properties You got it, you must point to the For projects of type 3 (OpenIDE suites), it's pretty much the same; the only difference is that the file you have to create in For projects of type 4 (Compute Server plugin)... things should be the same, but at the moment I still have a compilation problem. :-) I'll post a follow-up when I fix it. TIP: in case you have a project which uses its own libraries, or a group of projects that reference each other, there's a thing you should check (and eventually fix) in order to have everything working. Cross-references are usually stored in the project.EditableImage=../EditableImage file.reference.jai_core.jar=../lib/jai-1_1_3/lib/jai_core.jar reference EditableImage and project.EditableImage=/Users/fritz/Projects/Mistral/EditableImage file.reference.jai_core.jar=/Users/fritz/Projects/Mistral/lib/jai-1_1_3/lib/jai_core.jar Before setting up your projects with your favourite CI facility, check these out, as it can't work on the CI server: first, because That's all. It might sound complex, but once you've gone through for the first time, it's easier to repeat for other projects. And having a CI that works for you, checking out broken commits and createing nightly builds, is well worth while the effort! PS Other tips about NetBeans + Hudson on the Tor Norbye's blog. Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|