Wednesday, August 27, 2008

Nexus == easy

I must admit, the Maven setup at work has me a bit spoiled. Direct LAN access to a bunch of Maven mirrors makes for some pretty fast builds. Problem is, when I go off site I have to suffer through slow builds again...

Thanks to Bruce I now have wicked fast builds off site too!! A local instance of Nexus is the answer. Seriously, go take a look at the steps Bruce posted. It took me like 30 minutes to setup and add about twenty mirrors - now thats freakin' easy.

Heres the best part (I'm building Apache Camel here with a clean local repo):

No mirroring
[INFO] Total time: 31 minutes 18 seconds

Custom internal mirrors
[INFO] Total time: 7 minutes 52 seconds

Nexus mirroring
[INFO] Total time: 3 minutes 3 seconds

Anyway, bottom line is that I'm impressed. Great work Maven guys!

Tuesday, August 26, 2008

Eclipse Templates for Apache Camel

If you didn't know already, Eclipse allows you to define custom templates for commonly used code snippets. Its a very neat feature for those of us who are memory challenged or don't like typing things twice!

I think that Apache Camel users could really benefit from having predefined templates for doing Camel routing. I also hear a lot of requests like "I have this Java DSL route, how do I do this in the Spring XML DSL?" so having both Java and XML templates for the same thing is essential.

You can find the templates I did up here & here. To import these browse to the template screens defined at:

Window -> Preferences -> Java -> Editor -> Templates
and
Window -> Preferences -> Web and XML -> XML Files -> Templates.

Once imported, you can type Ctrl + Space and then type 'camel' to search for the camel templates. You should see something like this in the Java and XML editors:


When you select, say a Content Based Router, you'll get a route something like this in the Java and XML editors:



The formatting was a bit wonky for these Eclipse templates so you might want to pretty up your routes before showing anyone else :)

Let me know what you think!