[HOWTO] Build your JAR Alfresco Share Dashlet with Maven in 3 minutes

Two months without a post, and I come back again with Maven and Alfresco? Well, no news as the Maven Alfresco Community keeps growing..

So following the exciting news on Spring Surf and Share announced by Kev on trunk, for which since Alfresco 3.3 (now in trunk) we can now build Alfresco Share Extensions as plain old JARs, I decided to complete the Maven Alfresco Lifecycle with another archetype, providing a simple way and sample code allowing to build Maven2 Alfresco Share Extensions in minutes.

I’m sure this is going to interest the Alfresco community, same as it’s Ant counterpart build script which Will’s recently produced to accomplish the same task. The more, the merrier isn’t it? The big difference between that approach and the one we’re presenting is only that Maven enforce a standard project layout so it was fairly easy to put stuff to be packaged in the proper place.

This also comes as a very natural complement to the Maven Alfresco Share Extension Archetype (managing WAR customized builds for Share) for now it’s possible to build a Share WAR and have it depend on Share JAR modules. Great kudos go to colleague and mate Will Abson and Alfresco Engineers for having produced and nurtured the Site Tags Dashlet which is included in this archetype and that you can install following the next steps in a couple of minutes.

Couple of pre-requisites for running this:

  • Alfresco Repository WAR 3.3 (TRUNK) already running on Tomcat. You can build this from trunk and run it in your tomcat instance, or find it deployed in the Maven Alfresco Community Repository
  • Tomcat Manager already installed and using credentials “admin” with no password (config in conf/tomcat-users.xml)
  •  (optionally) m2Eclipse eclipse plugin to import Maven project (not needed but cool 🙂 )

Ready, set, go: Read more [HOWTO] Build your JAR Alfresco Share Dashlet with Maven in 3 minutes