Tim Shadel Sharing your plugin

Overview

You've just created a killer Maven plugin. Now what?!

Plugin Maintenance

Where should plugins live? Who can update them? Does it really make a difference?

Can you put my plugin in the Maven distribution?

The main Maven distribution includes many plugins, but the growing trend is to as plugin owners to host the plugins themselves (What do you mean, host?). Why? There are many advantages for the plugin owners, the users, and the Maven team.

Plugin owners are the best maintainers

Since only Maven committers may update the maven-plugins repository, changes you make to your plugin will take a while to make it into a Maven distribution. Each plugin needs a committer willing to maintain it, and that plugin is not the only piece of Maven the committer works on.

Plugin owners are in a much better position to maintain the plugin. They originally wrote the plugin. They have a vested interest in seeing it succeed. If they host the plugin themselves, then updates can be incorporated quickly, and users get the benefits of updated software quicker.

This benefit is often maximized when a team that writes a library, like the StatCvs group, also creates the Maven plugin. As the library changes, the plugin may be updated to keep in sync. In fact, the Cactus and StatCvs plugins were among the first to voluntarily remove their plugins from the Maven distribution and be hosted with their respective libraries.

Publishing Your Plugin

Step 1. How do I host my Maven plugin?

To "host" a Maven plugin, you require only two things:

There are a variety of options available for each need. Your source code may simply be kept on your hard drive, using a local installation of a version control tool like CVS or Subversion (you do use version control, don't you?). If you'd like to share your plugin source with others, you can request a new project at a service like SourceForge or Java.Net, or request to join an existing project like the Maven-Plugins project on SourceForge.

If you're creating a plugin for an existing open-source (or even closed-source) library, the ideal situation is to approach the library maintainers about hosting your plugin source and site. That way the plugin source is close to the people most likely to care about its success, and ensure it works well far into the future. The plugin site is located close to the already well-known library site. In the end, this cooperation means a better chance at happy users, and up-to-date plugins for everyone.

Step 2. OK. My plugin has a host, how can I put it on ibiblio.org?

Please see the instructions for uploading a resource to ibiblio.org.

NOTE: If your plugin requires resources (JAR files) that are not already at ibilio.org, you may need to make several separate upload requests.

Step 3. My upload request was granted, but no one knows my plugin exists!

There are two ways to let your potential users know about your plugin. The first is through sending an announcement to the maven-user mailing list. Here's a few pointers on how to go about it.

The second way to publicize your plugin is on the Maven site itself. The Maven project currently maintains a list of other sites that host plugins. The best way to get your link on this page is to get the Maven source, and submit a patch to the list file itself. Here are the steps in a bit more detail.

Step 4. So now that they found my plugin, how do users install it?

Here's the general idea

maven plugin:download -DartifactId=[plugin-name] -DgroupId=[plugin-group] -Dversion=[plugin-version]

For example:

maven plugin:download -DartifactId=maven-statcvs-plugin -DgroupId=statcvs -Dversion=2.4

Related Links

Official Maven Documentation

Documentation maintained by Maven committers.

  • Developer Guide: Start here. This provides the most clear and comprehensive start to writing Maven plugins.
  • Releasing Plugins: Maven documentaion for contributors modifying a Maven plugin Look for ways to have your own project follow similar standards.
  • Plugins: Lists sites that host Maven plugins.
  • Repository Upload Instructions: How to request your resources be uploaded to ibilio.org. A must read. Watch it for updates, and carefully follow the most recent instructions to give your resource the best chance of quick processing.
  • FAQ: Read it. Use it. Love it. Live it.

Maven Wiki

These links include collected documentation about Maven, contributed from a variety of sources.

  • A first and second part of a tutorial for making a minimal Maven plugin.
  • PluginCreation: A more conprehensive contributed tutorial for creating your own plugin.
  • PluginModificationGuidelines and ReleasingPlugins: Contributed discussion of what Maven contributors or developers do when modifying a Maven plugin in Maven CVS. Many things are duplicates of official docs now. Look for ways to have your own project follow similar standards.
  • PluginOwners: Beginnings of a list linking plugins and principal maintainers

Mailing List Threads

Discussion that occured on the Maven mailing lists.

  • StatCvs Maintainership: A discussion, initiated by the StatCvs group, about the benefits of moving maintainership of the StatCvs plugin from the Maven team to the StatCvs team
  • StatCvs Plugin Announcement: Example of how to properly announce releases of your plugin.