How you list the available goals for a maven plugin

I’ve been attending an excellent lab by Sune Simonsen which was about how to create a Javascript twitter client.

The lab utilizes the maven-lab-plugin, which can be used to create step-by-step labs using Maven.

During the lab, i wanted to know which step I was at and I figured that there should be a goal for that. To list the available goals for a maven plugin you can use the goal help:describe like this:

  $ maven help:describe -DgroupId=com.jayway.maven.plugins.lab -DartifactId=maven-lab-plugin

This will give you an output like:

Name: maven-lab-plugin Maven Mojo
Description: Maven plugin used to create labs that provide more code once a
  step has been completed. Labs are a useful way to learn new technologies,
  frameworks and tools.
Group Id: com.jayway.maven.plugins.lab
Artifact Id: maven-lab-plugin
Version: 1.0.0.RELEASE
Goal Prefix: lab

This plugin has 7 goals:

lab:create
  Description: Goal to chunkify

lab:currentStep
  Description: Get the current step no

lab:findMax
  Description: Goal to find the max version

lab:init
  Description: Goal to create and initialize a lab.

lab:next
  Description: Change to next step

lab:reset
  Description: Goal to create and initialize a lab.

lab:setStep
  Description: Change version to versionNo

For more information, run 'mvn help:describe [...] -Ddetail'

This Post Has One Comment

Leave a Reply

Close Menu