10/1/2016 - 2:51 PM

Basics Maven

group id

  • group id identifies project accross all projects hence it should be unique, ususally it is the package name like org.apache.maven,
  • for multimodule project you will append to parents group id, org.apache.maven(parent) org.apache

artifact id

  • artifact id is the name of the jar. like ictralcms or ecgs. If this is your jar you can create your name


  • major.minor.revision like 2.0.1

maven plugin

  • for creating a maven plugin we need to creare a mojo (maven old java object)
  • a majo is equivalent of a maven goal, which extends functionality that is not already found in maven
  • a maven plugin is nothing but a mojo (a java class which extends AbstractMojo)
  • this maven project with the mojo will have a pom and hence will be an artifact
  • simply include this artifact in the build plugins sectio of the pom you want this plugin into and execute it as
    • mvn groupId:artifactId:version:goal
  • if we follow above patern eg will be mvn sample.plugin:hello-maven-plugin:sayhi
  • if above is followed maven creates a shorthand for the plugin as ${prefix}-maven-plugin
  • so then we can now refer to this plugin as mvn hello:sayhi


  • build.gradle is the equivalent of pom.xml