Archive for April, 2010

Updated Apache Tomcat Web Application Maven Archetypes via MuleSoft

April 29th, 2010

MuleSoft Tomcat Web App Maven Archetypes

I’m pleased to announce that MuleSoft and I have collaborated to freshen the world’s two most commonly used Maven Web Application Archetypes, the maven-archetype-webapp and the wicket-archetype-quickstart.

The Motivations

These two archetypes had fallen out of date, both in terms of using the new Archetype 2.0 style metadata, as well as in the dependencies on the third-party libraries such as JUnit. Due to limited volunteer developer time, when the Maven Archetype developers moved from the 1.0 to the 2.0 branch many of the existing archetypes did not successfully make the transition. Thus, the public was having to make do by using old versions of these archetypes.

The Update

Given MuleSoft’s and my keen interest in the Apache Tomcat ecosystem, including the enterprise-strength Tcat product, we set out to bring these two aging archetypes up to date. We found that easiest to do under the very open MuleForge repository & GitHub source code hosting for the near term, but we will be submitting a patch to get these improvements back into the core archetypes at Apache too.

Contributing back to community

A week into the effort, the “update” turned into a complete “rewrite” of the archetypes to reap all the benefits of the Maven Archetype Plugin’s version 2.0 features.

The metadata has dramatically changed between the Maven Archetype 1.0 and 2.0 versions of the plugin. Previously, the file named archetype.xml lived in the src/main/resources/META-INF/ directory, then it was relocated to src/main/resources/META-INF/maven, and finally, in full modern 2.0 form, has been additionally renamed to src/main/resources/META-INF/maven/archetype-metadata.xml.

Similarly, variables inside source files were updated to use the ${} notation, with legacy elements like $package updated to ${package}.

The poms for the archetypes were updated from the old archetype plugin type to use the new 2.0 lifecycle extensions

The resultant archetype code is hosted at GitHub for easy viewing, consumption, technical review and forking. We’d love to get your input and improvements!

These two archetypes now represent the most pristine use of the Maven Archetype Plugin v2.0 format.

Integration Tests

We didn’t want to stop at just updating the archetypes though. We wanted to make them better. So one of the most obvious ways to do that was through adding integration tests. I can’t tell you how often I get asked for a good example of leveraging the Maven pre-integration-test and post-integration-test lifecycle events. Up until now, I’ve been relatively empty handed to respond to this request, but finally we have some reference examples.

These lifecycles are now bound to the redeployment and undeployment of the web application artifact (WAR) and the execution of a JWebUnit integration test that exercises and validates the home page on each of the JSP and Wicket flavors of web application.

Instructions for Use

We’ve built a wiki page showcasing the usage of this archetype which we also invite you to review and improve. In short, you can inform Maven of the new archetype catalog via a quick execution of:

mvn archetype:generate -DarchetypeCatalog=http://dist.muleforge.org/maven2/

Lastly, for those of you that prefer a video walkthrough of the usage of these two archetypes, check out our screencast demo that takes you from start to finish of working with these valuable new tools in the Maven, Tomcat, Tcat, and web application development ecosystems.

Future Goals

Like all good developers, we are always looking towards the next iteration, just as the current ones are drawing to successful close. In the next release of these archetypes, or perhaps in supplemental sibling instances, we’re exploring:

  1. A zero-footprint, embedded Tcat installation that can be retrieved from a Maven repository.
  2. Profiles to allow for the integration tests to be selectively executed in a local or embedded Tomcat or Tcat installation, possibly auto-detected to activate the proper profile.
  3. Support for Maven provisioning of completed artifacts into Tcat server groups.

OSS Thanks

In closing, we want to thank the Tomcat community for founding such a great product and the Maven community for planting the seeds of these new archetypes. Java web application development is at its current fevered pitch, thanks, in large part, to these excellent tools and their communities.

A Set of Exciting Conferences

April 4th, 2010

I’m enjoying the privilege of being invited to several large conferences across the globe in 2010. Let me give you a brief overview of these exciting just-attended and upcoming venues…

Scandinavian Developer Conference
Scandinavian Developer Conference

I just wrapped up giving my well heeled Open Source Debugging for Java talk to the wonderful folks at the 2010 Scandinavian Developer Conference in Göteborg, Sweden. Tomas and Lennart were the most wonderful conference hosts and the speaker dinner was world class. The conference was around 700 strong this year, which broke through expectations of growth from 2009. That showcases what a polished event Iptor hosts.

Many stateside colleagues joined me on this trip, including Tim Berglund, Paul Rayner, and Nate Scutta.


Matthew McCullough at GIDS

Great Indian Developer Summit

Next, I’m looking forward to the Great Indian Developer’s Summit in just a few short days from now. I’ll be speaking on a range of topics from iPhone Development for Java Programmers all the way to Dividing and Conquering large datasets with Hadoop. I’ve already been impressed by the helpfulness of the Saltmarch hosts, Usha Karen and Dilip Thomas.


Epicenter, The Irish Software Show

Epicenter

In June, I’ve been invited to the green landscape of Dublin, Ireland to present at Epicenter. I’ll be speaking on iPhone development for Java Programmers once again (a topic I’m passionate and knowledgeable about) in addition to Encryption on the JVM.


UberConf

UberConf

Just one day after returning from Epicenter, I’ll be speaking for four days in my hometown of Denver, Colorado at the newly minted UberConf. It will be a weekday show with a very unique pre-conference workshop (boot camp) on iPad Development for Java Developers. Ben Ellingson will be co-teaching this class with me.

There will be over 100 sessions at this unique conference, which is scale-tipping for an NFJS branded event. There are even registration levels that are all-inclusive, which works great for some corporately sponsored attendees. These unique (and quite successful) packages bundle travel, hotel, meals, registration, and an iPad. You’ll know your exact costs before you even take one step towards an airport.


No Fluff Just Stuff Series

No Fluff Just Stuff Series

And lastly, I’ll continue to present at my favorite recurring conference series, the No Fluff Just Stuff tour. There are at least 15 more stops on the tour this year and I hope to hit most of them. I’m looking forward to meeting up with a lot of the audience members that I had delicious breakfasts, lunches and dinners with in 2009 in the cities where the tour visits.

DOSUG Ignite Talks, Speaker Videos

April 4th, 2010

The Denver Open Source Users Group held an O’Reilly Ignite night in February. We are thankful for Paul Rayner’s volunteering to run the video camera. I’ve just begun stitching the videos together with the animated slides, which turns out to be no easy task. Thank goodness for ScreenFlow. I can’t imagine how hard it would be to assemble a composite video and align the timing without this amazing product. Tom O’Brien, Paul Rayner and Tim Berglund are all now onboard with this amazing and award winning piece of software.

The result of the first stitch of my PresentationPatterns.com talk, entitled “Information Alchemy for Better Presentations” can now be seen on YouTube in HD.