Maven Alfresco Lifecycle to gather all Maven Alfresco components

Few Build Successful’s were more satifsactory then the one which you can see in the window below ๐Ÿ˜‰

Maven Alfresco Lifecycle build successful

Finally all the modules that I’ve been working together with the community, including AMP & Alfresco Extension Maven archetypes and the AMP plugin, under one single build, control and with a proper release process, called (almost obviously) Maven Alfresco Lifecycle featuring:

It was time to wrap up all this work (merging m2Alfresco, maven4Alfresco and other Maven Alfresco related activities) in a more usable and sustainable platform for growing it.

As usual, many thanks go to Mao that provided 1st class infrastructure support (and much more ๐Ÿ™‚ on the new Nexus Sourcesense repository.

And this being a double advantage, not only for the community but for the growing number of enterprise customers interested in working with Maven on Alfresco.
I would like now to grow it with features already present in some development branches and exciting new improvements like:

  • Alfresco Share archetype support (already in 3.x branches)
  • SURF / Spring tool suite integration (as Uzi shown us so to be so cool with the new spring-surf)
  • Update and improve the quality of the sample contexts to match the latest and greatest capabilities

As said, I see the interest of the community at large around the project is growing so in case you’re interested I suggest you to participate by joining the lists or opening issues.

So just give it a try…it’s two Maven commands away ๐Ÿ˜‰

Would love to hear your thoughts on how to improve the platform and grow it to the next (enterprise) level. Don’t forget to check out the 3.1.0-stripped branch, where a Maven Calm based version is hosted and there’s already a working Alfresco Share sample project.

Have fun!

Maven and Chemistry strike back … a Maven archetype as CMIS Labs and toolkit

CMIS is cool indeed, and especially working on it with Open Source tools like Alfresco, Maven and Chemistry can result in quite a bit of fun.

I’ve been working quite a lot lately on producing some sample and training material for the coming Alfresco meetups (tomorrow I’ll be presenting the CMIS Master classย  live from Madrid), and so I decided to mix and match the two things I can do best:

  • Using my beloved Apache Maven
  • Using the Chemistry AtomPub TCK (former Alfresco CMIS TCK) that we contributed to ASF to provide high level access to the CMIS ReST API

This effort, which I’ll probably heavily use in the next days Master Classes and training session, turned out to be quite productive as in a couple of days of work I was able to:

  • develop a Labs framework which wraps Chemistry TCK embedded CMISClient
  • provide an easy CMIS 0.62 application(s) scaffolding platform using a Maven multimodule project
  • produce and release a Maven archetype which is now hosted our partner Sourcesense repositories ( big thanks go to this folks for being always supportive with their Maven maven infrastructure) and can be used as CMIS launchpad / labs / toolkit

Trying it is very easy, due to Maven archetypes power, and you can have the full Labs toolkit downloaded and installed on your by just selecting ‘cmis-master-labs-archetype‘ in the options of the command below:

EDIT

mvn archetype:generate 
-DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
mvn archetype:generate 
-DarchetypeCatalog=http://repository.sourcesense.com/nexus/content/repositories/alfresco.public.releases/archetype-catalog.xml

mvn archetype:generate -DarchetypeRepository=http://repository.sourcesense.com/nexus/content/repositories/alfresco.public.snapshots -DarchetypeGroupId=org.alfresco.enablement.codecamps.cmis -DarchetypeArtifactId=cmis-master-labs-archetype -DarchetypeVersion=1.0

This will create a multiproject structure ready for use. You’ll just need to configure (in a single sourced fashion for the whole suite)ย  the CMIS endpoint properties in the main POM, by editing the following properties:

<!-- SINGLE POINT OF CONFIGURATION FOR CMIS ENDPOINT -->
<properties>
<!-- Configure here the CMIS endopoint For the whole suite -->
<cmisserviceurl>http://192.168.154.128:8080/alfresco/service/api/cmis</cmisserviceurl>
<cmisusername>admin</cmisusername>
<cmispassword>admin</cmispassword>
<cmistracerequests>true</cmistracerequests>
<cmisvalidateatom>true</cmisvalidateatom>
</properties>

All the nice tracing and validation features of the Chemistry TCK are exposed, once that you configured the POM to point to a proper CMIS 0.62 compliant server (e.g. Alfresco, and an Ubuntu Alfresco VM is available here for this purpose). Specifically the toolkit offers 3 Maven submodules

  • cmis-support –> Support JAR which wraps Chemistry TCK CMISClient
  • cmis-query-webapp –> Very basic SpringMVC webapp querying a CMIS repository and showing results/entries
  • cmis-lab-atompub-binding –> Learning lab on how to import data in Alfresco (complete class in the solution folders)

and a lab-solutions folder.

Using it is pretty straighforward. A simple

mvn install

will test the support against the provided configuration, while entering the cmis-query-webapp folder and running

mvn jetty:run-exploded

will result in the (quite ugly) but functional CMIS Query interface you can see below:

CMIS Query Webapp

using a simple three tiered architecture like the one that follows:

CMIS Query Webapp architecture

Lastly entering the lab-atompub-binding folder and running

mvn test

will run the sample JUnit empty test for the data import lab. Solution (real Test class) is to be found in the labs-solutionsย  folder.

It’s a beginning but I believe it’s a very nice tool to overcome the somehow still steep learning curve around CMIS, so I warmly suggest you start installing the VM and the archetype and play around with it, and even use it as start for your integration/contribution projects. Especially if you are going to attend Alfresco meetups this month. I’ll surely post the Labs slides later this month, so stay posted!

EDIT

The CMIS 1.0 Public Review compliant toolkit (working against Chemistry AtomPub TCK Trunk 1.0) is available on the Sourcesense repository and it’s added to the remote catalo mentioned in the previous command.

As a side note, at the moment this toolkit provide support for CMIS 0.62 while http://cmis.alfresco.com is Alfresco supporting CMIS 0.70: I’m planning to update the archetype (just a mere Maven dependency ๐Ÿ™‚ ) to use the HEAD version of Chemistry TCK that is supporting 0.70.

Feedback welcome as usual!

Hope this really helps ๐Ÿ™‚

A Maven based CMIS Tck to contribute in Apache Chemistry

My first real involvement in Chemistry definitely deserves a first post on the subject ๐Ÿ˜‰

Lately I’ve been involved into refactoring the Alfresco CMIS Test Harness into an external Tck (Test Compatibility Kit) module to contribute to the Apache Chemistry. At the moment it’s mostly focused on the AtomPub part (including an Apache Adbera extension), but being based on Apache Maven standards should be fairly easy to scale out to WebServices binding testing.

This would be this first real contribution from Alfresco to the Chemistry project, where me and David Caruana have the luck of being involved as committers. At the moment the code for the will-be-called chemistry-atompub-tck is still hosted under the Alfresco contrib SVN space as still to be completed, but already offering quite some nice functionalities to test the compatibility of your server to the CMIS 0.6.2 standard.

The code (which was already in Alfresco and kept up to date to the CMIS standard directly by David) is now almost ready for contribution as it’s completely decoupled from Alfresco and uses a standard Maven build process (Junit + Surefire) to run compatibility tests against an existing (and running) CMIS server.

So, running a plain :

mvn test

will run all Junit tests against the specified serviceUrl with specified the username and password, using Maven POM properties as configuration mechanism. Additional configuration can be done in the POM to trace HTTP request/response conversation (useful for debugging purposes), and to configure some behaviors of the HTTP client.

In addition to that, due to the mighty Maven power a small addition to the previous command:

mvn test site:run

will allow you to point to anembedded Jetty server which publishes the test reports and shows errors and exceptions (amongst all the other nice Maven site features).

The idea at the base of this contribution is that this TCK can be used to test virtually any CMIS implementation and Maven profiles provide us a nice way to aggregate the full test fixture and publish the result in a nicely aggregated fashion. In fact, I started defining a profile called ‘alfresco’ which once run with:

mvn test -Palfresco

will configure the TCK to run against an Alfresco provided CMIS reference URL (or to do any Alfresco specific pre-requisite steps, like downloading it, installing a custom model and run it in Jetty for self contained testing).

In the same way I’d like all the other open source vendors involved in Chemistry to maintain their own profile which will serve as community reference for the CMIS readiness of a specific platform. Likewise we could setup ‘sharepoint’ or ‘documentum’ profiles to test existing public instances of those CMIS implementors, to always be up to date with their state of the art.

This will, of course, make much more sense once integrated in Chemistry but it’s already fully functional against the CMIS 0.6.2 standard and might be worth a try already. And if you feel to participate to the testing game, why don’t you make a CMIS server instance available and contribute the few lines of POM configuration to the project, filing a nice and easy JIRA issue?

Too much of a salesguy ? ๐Ÿ™‚

Launching Calm – an opensource answer to Application Lifecycle Management

ย It’s still at its early stages but it’s definitely collecting already lots of interest and potential use cases.

Maven Calm is an Apache Maven based attempt to provide a simple and collaborative implementation to the problems of ALM (Application Lifecycle Management), which is based on a simple rationale developed in 3+ years of complex architectures development on Maven:

“All best practices can be externalized, in a cross technology and cross organization fashion, using Maven project inheritance capabilities”

As Mau explains in his wonderful Maven Calm tutorial, simply by the means of using Calm as parent POM and setting some properties, you have access to a number of pre-configured behaviors of your build, neatly bound to lifecycle phases.

Hopefully this list is meant to grow pretty soon, but at the moment Maven Calm support ALM processes like:

  • Application Packaging and Deployment
  • Release, distribution and change management
  • User and developer documentation site publishing
  • Continuous Unit, integration and regression testing
  • Add your own best practice and avoid re-writing it per project/company!

Calm is open source and hosted on Google Code, so if you want to know more you can find all the info by joining our Google Group ๐Ÿ˜‰

The infinite tail of TODO

How come writing is always the last thing?
Before it was blogging, now fashion says we must micro-blog, and we even don’t have time to spend a few words on what we do. Effective as business, but blogging gave us a bit of writers pride, isn’t it? But it goes much earlier than that…the vast majority of software projects is developed almost until the end without any piece of seriously meaningful documentation.

Ok, ok, stop!

I was just finding lame philosophical excuses for not having blogged anything in this period of my life, such dense of changes in many aspects of my life and career. And this blog post keep staying in the infinite backlog of my TODOs.

May you live in interesting times

seems to run a famous Chinese or supposed to be Chinese curse, which I actually heard for the first at the Alfresco Rome’s meetup during my new CTO – John Newton – presentation, but that reflects the current status of my life, career and more in general world there days. Read more The infinite tail of TODO

Geek and Vain

It’s probably my first real recognition in open source matters. More soon will come, as I’m really putting my heart in the cause.
It was a nice surprise in fact to get to see my big face on Alfresco’s wiki home page, having been nominated January’s contributor of the month for the work on Alfresco and the Maven Archetypes.

Even if, I guess, the photo I sent the Alfresco guys reflects my vain nature ๐Ÿ˜‰

Good stuff, especially as I’m trying to release the 3.0 version of the archetypes in a matter of days.ย  Stay posted on 3.0.0 branch and on Sourcesense‘s repo. And why not contribute? ๐Ÿ™‚

God bless Open Source

Yes, it’s just yet another success story.

But still worth mentioning isn’t it? Especially when it happens right to you and right in one of the toughest period of my entire career.

So to keep it short: I’m working together with Marijn on some fully fledged complex Alfresco workflow, working on 3.0 but still on the “old” Alfresco web client (now renamed to Repository Explorer ).
Apart from Alfresco a bit odd JBPM Javascript implementation, we could get quite close to the fully working solution, but now that users are a bit struggling with the usability of the web client (and some lack of training) we are a bit delayed and trying to prioritize some issues.

One big requirement that has been left out was the possibility of displaying the task history of a workflow on the document details page. To be clear, Alfresco allows showing documents associated to a workflow, but the reverse association is not displayed and a document has no means of showing the task history that a specific document has undergone to.

About to drop this requirement, while googling around I came across this genius post, in which Marc de Kwant describes and shares the code of exactly this feature. Ok, I understand it’s a quite obvious requirement, especially in enterprise controlled documents contexts, but I mean, look at the picture, it’s exactly what I needed ๐Ÿ˜‰Alfresco Task Historyย Panel

That is extremely cool, and will allow to implement the feature in a matter of minutes.

Makes me wanna contribute to the project, just to give all my kudos to his great work (still have to try it actually, but appreciate the effort ๐Ÿ˜‰ ).

The code is hosted here and if I look better at some comments on the blog post , seems that the gap of poor packaging of this feature (just a bunch of files dropped there) can be easily bridged with another success story, a one shot execution of my Maven AMP archetype. Guess it can make a really nice Forge contribution as such. Anyone interested to try it out?

I especially love when open source achievements come together in a product, which is typically more than double valued than the original addendums. That’s why I probably will always like, enjoy, be interested in being an open source integration pioneer.