Tuesday, February 07, 2006

Maven 2 Plugin Goal Quick Notes

My previous Maven plugin examples had only one goal, but mavenites know that plugins
typically have many separate goals. For example, see the
War Plugin Goals.


Each goal correpsonds to a separate piece of Java code. The source is
here


You will notice each Mojo has a separate "@goal" in the top level comments, above the class definition.

Note that all of these classes correspond to the same plugin. Apparently Maven will inspect the contents of the plugin's jar to find the class with the appropriate @go definition and load it.

No comments: