Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

Thursday, 28 August 2008

Running Nexus with launchd on OS X

I've finally got Nexus running for maven builds to help boost the speed downloading and checking repos etc.

This gave me the excuse to finally take a quick look at using launchd which is the preferred OS X way to run daemons and services. First look it appears cool and much nicer than rc/init.d/xinit.d et al.

Here's a really simple always-run nexus script, sonatype.nexus.plist. Just drop it into your ~/Library/LaunchAgents/ directory and you should be good to go.

From the command line you can then do this if you want to boot it up straight away - but it should restart on reboot (which I'll test out next time I've gotta reboot :)
launchctl start sonatype.nexus
I did try get clever and wait for port 8081 to be used before booting up nexus but couldn't get it to work properly so figured just starting it up on boot was easier :)

Update: BTW the script is available under the Apache License 2.0 if anyone wants to copy it or include it in any distro of Nexus

Thursday, 21 June 2007

LazyWeb: spawning maven builds via VMWare in your CI tool

We're using the cute Bamboo tool from those nice Atlassian chaps to build projects like ActiveMQ, Camel and ServiceMix. Its got some lovely eye candy and reporting stuff.

The problem is, lots of the test cases of SOA projects like ActiveMQ often end up hard coding a port number to do some networking tests. The ActiveMQ test suite is probably one of the worst offenders :). (Yes I know, one day all those test cases should be refactored to use zero to create dynamic ports etc).

So we kinda have to run all of the test cases in a single build queue to avoid the test cases conflicting with each other on ports.

It'd be great if rather than just running mvn clean install or whatever, we could boot up maven in a separate VMWare image, with its own private ports and so forth - so the build runs in a separate virtual box and can't conflict with other tests.

e.g. using vmware-mvn clean install

Even better then, would be the ability to run different kinds of vmware images of maven (java 1.4, 1.5, 1.6 etc, then windows, solaris, linux etc).
mvn-win-1.5 clean install
mvn-linux-1.6 clean install
etc

If the VMWare ninja could be wrapped up in a command line that looked like the mvn command, this featre would just drop into all the various maven-supporting CI tools (of which there is a fair few; Hudson, Continuum, TemCity, LuntBuild etc). So the caller of vmware-mvn would get the incremental output via stdout; and after the build, the build files would be synced with the caller, so from the CI tool's perspective its just like calling mvn.