Friday, March 31, 2017

Pluging

Pluging


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. Its 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 plugins goals and properties. The output is the same information you can get by browsing the plugins 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 users 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.


Available link for download