Start snapshot and rc builds of Lucee in CommandBox

I mentioned this in passing in another thread but figured I would document it here. You’ve probably noticed that Ortus adds stable builds of Lucee to ForgeBox when they release so you can start CommandBox servers like so:

server start cfengine=lucee@5.2.6

However, I don’t add snapshot or rc builds to ForgeBox. I could, but we’ve never gotten around to fully automating it and I’m not sure if I want the clutter in ForgeBox. However, if you want to do some testing on a specific snapshot build of Lucee and you want to use CommandBox to do it and you don’t want to have to start the next closes version and then update via the admin, there is actually a nice little trick for you.

The cfengine parameter to the server start can point to any valid CommandBox endpoint that resolves to a package (zip) containing a CF engine war. Valid CommandBox endpoints are ForgeBox, HTTP, Git, File, Directory, etc. Couple this with a relatively new URL Micha added to the Lucee update server that will auto-generate a CommandBox CF engine on the fly for whatever version of Lucee you want. The URL looks like this:

http://update.lucee.org/rest/update/provider/forgebox/5.2.7.61-RC

You just swap out the exact version you want. So, how do you point CommandBox at that URL for it to grab the CF engine? Easy:

start cfengine=http://update.lucee.org/rest/update/provider/forgebox/5.2.7.61-RC

That will download the CFEngine on the fly from the Lucee update provider for whatever version you’ve asked for. Subsequent starts of the same server won’t download again since the war is already expanded to your hard disk. With this trick you can easily test Lucee snapshot and rc builds using CommandBox (which skips installers and manual downloads) even if those versions haven’t been added to ForgeBox yet. Happy testing!

2 Likes

nice! if only that http url was https!

Oh, awesome! I was trying to figure out how to run 5.2.9.40-SNAPSHOT locally (to match something in production). This worked like a charm.