Sunday, July 15, 2007


What is pluging: knowledge gained while learning/using maven2 plugins? I call it this because my fingers always put an extra 'g' on the end when I type the word plugin. To me pluging is fun. It's like reading a keyboard shortcut list for an IDE; you can just feel yourself being more productive. So while reading "Maven: The Definitive Guide" I naturally felt excited to learn more about maven2.

Currently I am only on the second chapter and the author points out an uncommon plugin (uncommon to me anyways) that seems pretty handy. Check out the help plugin and run this goal: mvn help:describe -Dplugin=jar -Dfull. The describe goal prints out the plugin's goals and properties. The output is the same information you can get by browsing the plugin's home page. If the information is too much, the help plugin also supports an output property: mvn help:describe -Dplugin=jar -Dfull -Doutput=jar.goals. Nothing super fancy but saves you the step of googling for the plugins site and also gives you the opportunity to explore possible options.

I would also highly recommend viewing the other maven2 plugins. Some of the plugins I would like to get to know are:

  1. maven-pmd-plugin - code analysis tool like findbugs.

  2. maven-assembly-plugin - creates source and binary distributions and much more.

  3. maven-enforcer-plugin - validates the user's environment. Comes in handy when you require that your project builds with a certain version of maven or jdk.

  4. maven-one-plugin - bridges maven1 and maven2. Would come in handy since I work on maven1 and maven2 projects.

  5. maven-release-plugin - helps in releasing a project: tagging, branching, updating the POM, etc.