O'Reilly logo

Apache Maven 3 Cookbook by Srirangan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making your Java Maven plugin useful

This recipe is a continuation of the preceding recipe in which we saw how to create an Apache Maven plugin in Java.

We ran an archetype:generate, a Maven command to create a Maven plugin project and modified the MyMojo.java source and the POM file. We then built, installed, and executed the plugin from the command line.

However, in a real-world scenario, in addition to what we explored in the preceding recipe, your plugin may need:

  • Support for multiple goals
  • External configuration
  • Short commands
  • Execution in build phase

In this recipe, we take this to its logical conclusion. We have a fully-functional plugin and will understand how to tweak, reconfigure, and enhance it further.

Getting ready

A prerequisite for the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required