Friday Oct 26, 2007

The now unsurpassed Mark White has written a fantastic blog entry about component loggers in open esb that deserves a gander.  It's long, but not rambling like my entries and has lots of screenshots... really good stuff, very informative.  If I can avoid distractions today, I'll hopefully post an entry on the i18n utility I recently added to CRL.  But read Mark's entry in the meantime...

Enjoy your weekend!
 

Friday Oct 19, 2007

When we switched to Maven, I was eager to see how the vaunted project managing build system would change things.  Let's just say I've not been overwhelmed.  Don't get me wrong: Maven does some nifty things, but I love me some Ant so losing much of the flexibility it provides was unthrilling.  However, the i18n utility (to which I referred in a previous post) has an Ant task which generates the i18n bundle, which in turn had to be integrated into the build (the task, not the bundle).  There's a forthcoming post about the i18n utility itself, possibly two if I split up the analysis of the code from the integration of the i18n Ant task.  A useful explanation of Maven's inner machinations this is not; this post is just about how to insert Ant tasks into a Maven POM.

Basically, it looks like this:

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
    <executions>
     <execution>
         <id>${project.artifactId}-plugin-description</id>
            <phase>process-classes</phase>
            <goals><goal>run</goal></goals>
            <configuration>
             <tasks>
<!-- ADD YOUR ANT TASKS HERE -->
                </tasks>
            </configuration>
        </execution>
    </executions>
</plugin>

By adding a plugin instance (under /project/build/plugins in the pom.xml), Maven knows your project wants to do some work.  Here's a rundown of the elements in the example above:

<id>
A descriptive name for what the plugin is doing.  For example, the plugin which incorporates the i18n Ant task is named ${project.artifactId}-generate-i18n-bundle
<phase>
This is the important one: it tells Maven when to execute this plugin (i.e. the Ant tasks).  Make sure you use a valid Build Lifecycle Phase...
<goals><goal>
There's only one valid goal for this plugin: "run".  Just copy the above example.
<configuration><tasks>
As the comment above indicates, this is where your Ant tasks are placed.

And that's it!  Now that you know how to bypass Maven and customize your projects, try to resist the temptation.  When I initially integrated the Ant task, the generated bundle was written to the source directory.  This is a big no-no, as no build step is allowed to overwrite source-managed files.  So use this knowledge judiciously...otherwise, I'll be blamed and it'll be all your fault!  :-D  Enjoy the weekend!

Wednesday Feb 21, 2007

It's been in progress for a while, but the move to open source has been exciting for me.  As part of SeeBeyond, a publicly traded company, open sourcing our code base would not have helped the stock much.  As part of Sun, it's becoming a whole different story.  (Mind you, I'm referring to our integration software - CAPS and OpenESB - in which I'm involved.  Other Sun technologies have been out there for some time, of course, but I digress.)  We want to get our stuff out there, we want to get involved with the community of developers, and perhaps most importantly involve the community with us.  There's been some confusion and a lot of questions, but fundamentally changing the way you do business can have that effect.  But it's been less of an adjustment for me because I was primed years ago for the open source world.

A great mentor at a previous job recommended "The Cathedral and the Bazaar" by Eric S. Raymond.  This book changed my entire perception of engineering software.  Only a few years into my career at the time, I'd not yet realized that the engineer who was passionate about software was anything but a minority.  In a nutshell, it describes two basic development styles represented by the Cathedral (highly structured, internal, private) and the Bazaar (chaotic mass of individuals, out in the open, for everyone).  It's an interesting juxtaposition and provides myriad insights into the power of the masses, so to speak.  To anyone who's not read it, I highly recommend it. 

As a result, for years I've wanted to get more involved in open source, but couldn't find any project that generated enough personal interest to start sacrificing more of my weekends than I already do.  But now the projects in which I'm involved are migrating to Open JBI Components, definitively making me more a part of the bazaar and less of the cathedral.  I've been feeling as if, to an extent, I've been working in a vacuum, hidden from those who actually use the software I write.  But now, to get out into the community and have the opportunity to solicit feedback about my components is exciting.  I'm really looking forward to continuing the transition to open source and, if you're reading this blog, I'm gonna try and drag you along with me.  Consider yourself warned!

And now for some blatant cross-promotion.  These are a few blogs from people with whom I've had the pleasure of working and are definitely worth a read:

  • Andi Egloff - the JBI component guru I roped into helping with CRL, providing invaluable architectural advice.
  • Chris Oliver - check out the Java scripting language he wrote: F3, or Form Follows Function.  From the perspective of developing GUI, it's amazing.  From a language standpoint, it incorporates features from a dozen or so (I think?) other languages; just wow.
  • Kevin Schmidt - great product manager who patiently answered a lot of dumb questions when I was still figuring out the Java Collaboration Editor (something to which I would LOVE to provide a link)
  • Mark White - ok, so I haven't actually worked directly with Mark, but I've met him and am learning a lot about motorcycles (to him what the NBA is to me)

There'll be a post soon introducing the Common Runtime Library (CRL, pronounced 'coral'), something high-level to introduce the intent and goals of the module.  Until then...

This blog copyright 2009 by kevansplace