Cover by Srirangan

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

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 ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required