Table of Contents | ||
---|---|---|
|
This page will take a stab to discuss "best practices" for building Maven Plugins. This page assumes that reader know the general "best practices" for Java Projects (as Maven Plugins are basically Java projects).
Incoming Breaking Changes
Maven Project have no resources to cover "backward compatilibty" across two major versions, hence following breaking changes will happen in Maven 4.0.0 and it's "precursor" Maven 3.9.0:
- The
org.codehaus.plexus:plexus-utils
artifact is not anymore "auto injected" (auto provided) to plugins classpath.
Minimal Set Of Best Practices
Maven Plugins are meant to be invoked by and run within Maven. Hence, one can draw a parallel between them and, for example, Java Servlets, where Servlet Container "provides" some dependencies to implementations. In this aspect: Maven is also a Container, container for Maven Plugins. Maven provides to plugins the "Maven API" classloader as parent, but to build a plugin, you still need to declare some depedencies.
...
Then you can enlist your other (non-Maven) dependencies as well.
Testing Maven Plugins
TBD