Recent Posts

RSS Feeds

Alfresco on OS X - ImageMagic and OpenOffice

Alfreso is a fantastic ECM solution that has some amazing features and some great momentum. It has been more than a year since I've used Alfresco and man have they gotten some cool stuff done.

I spent the last couple of days getting certified to teach a couple of Aflresco's classes. I used my mac (running leopard) and I figured I'd post a bit about what I did to get all the features up and running. Alfresco is able to use OpenOffice and Image Magick to do some cool stuff like transform any word doc to PDF or and GIF to PNG etc. Problem is the Alfresco site is short on detail about how to make all that goodness work on the mac.

Being the stubborn guy that I am I would not leave well enough alone and run it on some other OS. It took me a couple of hours but I got everything working. Here are the details...

Grab Open Office from here. I got the aqua interface cause I don't really care about the UI anyway. Install by copying it to your Applications folder. I renamed the app to OpenOffice.app (got rid of spaces) although I'm not sure that is necessary it ended up that way after all the experimentation and I've not had a chance to go back and check if it would work with a space (seemed at the time like something that Alfresco was using was not properly escaping spaces).

Now that you have the OO install done its time to teach Alfresco about it. In your alfresco install (the one that includes tomcat) there is an extensions folder (tomcat/shared/classes/alfresco/extension). Go there and add a folder called 'bootstrap'. Then in there create an XML file called openoffice-startup-context.xml. I've included mine here so you don't have to set it up from scratch. Basically this file tells Alfresco how to startup openoffice in headless mode so that it can be used to do doc transforms.

Install Image Magick with mac ports via a command line that looks basically like this sudo port install ImageMagick. If you are stubborn and you don't want to use Mac Ports the Image Magick community has a binary distro for you here. I used the mac ports build instead of the binary distro so your millage might vary if you use the binary.

That is it, now when you restart Alfresco it will be able to do the document conversion and image conversion. If you are looking for an ECM take a look, its really cool stuff.

Permalink     No Comments

Maven - Choose Your Pain (Re: mostly hate)

So I generally feel that using maven or ant or make or shell scripts, building is a pain in the neck and what ever way you choose you will have pain. You get used to the pain of one kind or another and sort of grow to like that sort of pain and you forget that you ever lived without it. And at times you even start to defend the kind of pain that you like as pleasure. I'm having one of those moments after reading this.

Agreed maven has bugs, agreed maven has some doc problems, but...

Point 1 - the maven release plugin has its faults to be sure but more or less it works as advertised and if you are following the 'typical' path of using your SCM then the plugin even does a very nice job of keeping tags and such for you.

Point 2 - you can specify the path to the parent pom if you don't have it in the default location (e.g. ../pom.xml) in your parent descriptor (look for relativePath).

Point 3 - Agreed this is really irritating (esp the silent failures) but I've not had much trouble with Checkstyle or PMD on my 'very big' multi-module project. More detail would probably turn up some links to fix whatever issues are being experienced.

Point 4 - We use the assembly plugin with great success on Crank. Geronimo uses it as well. I could not tell what the actual problem was from the description given but I'll bet again there are ways to do that.

The 4 specific pain points I think are relatively easy to work through. The other 50+ things who knows. On my team we were tempted to write a custom plugin but we were able to make things work without it and were much better off in the long run IMO. Not that writing a custom plugin is bad, but in most of the cases on IT projects that I've seen folks writing a plugin its because they want to do something counter to the way maven expects. Such a plugin will be nothing but pain long term.

All that said, I feel his pain. I've been using maven for 2+ years and its only the last few months that I feel competent to make a big project really work. I'm not sure if that is completely a lack of docs or problems with maven. But I've gotten used to the pain of maven and I've really started to dislike the pain that I received from Ant (perhaps 2.0 will be worth a look when its done).

Permalink     5 Comments