Apache Maven Create a Maven Plugin

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!


Maven allows you to implement and use custom plugins. These plugins allow additional behaviour to be bound to any phase of the Maven lifecycle.

Each Maven goal is created by implementing a MOJO (Maven Ordinary Java Object): a Java class implemented with annotations that describes how to invoke it.

The goal prefix of a plugin is derived from its artifact name. An artifact hello-world-plugin creates a goal prefix hello-world. The hello goal can then be run with mvn hello-world:hello.


A Maven plugin is a JAR containing a maven/plugins.xml that describes the plugin metadata. This file is generated by the maven-plugin-plugin.

Got any Apache Maven Question?