Development Guidelines

All plugins in the Mojo project should follow these guidelines although they might not always apply.

  • Use the package org.codehaus.mojo.<plugin>, e.g.: org.codehaus.mojo.jpox.
  • Name the mojos like this: FooMojo. This mojo should be available as foo inside a plugin configuration in Maven.
  • Use the Maven code style when formatting your code.

Licensing

We accept any plugins that follow Codehaus's rules for licensing. We recommend that you use Codehaus's recommended license which is the MIT license. This license is usable for both ASL and GPL covered software. For other acceptable licenses please read the Codehaus license overview.

Make sure that you include the license in a file called LICENSE.txt in the root of your project and that all files include the license at the top of the file.

Mojo Parents

Released plugins should derive from the Mojo parent:

<project>
  <parent>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>mojo-parent</artifactId>
    <version>18</version>
  </parent>
  ...
</project>

Sandbox (new) plugins should derive from the Mojo sandbox parent:

<project>
  <parent>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>mojo-sandbox-parent</artifactId>
    <version>5-SNAPSHOT</version>
  </parent>
  ...
</project>

Plugin Site Template

Plugins should have a site that conforms to:

For Mojo Parent 16 and Newer

Mojo parent 16 introduces a common site.xml file that is included in the parent artifact. It is inherited by the projects that use this parent. This means that there are less things that you have to specify yourself. If you are using Mojo parent 16 or newer, place this in your plugin's src/site/site.xml:

<project>
  <body>
    <menu name="Overview">
      <item name="Introduction" href="index.html"/>
      <item name="Goals" href="plugin-info.html"/>
      <item name="Usage" href="usage.html"/>
      <item name="FAQ" href="faq.html"/>
    </menu>
    <menu name="Examples">
      <item name="description1" href="examples/example-one.html"/>
      <item name="description2" href="examples/example-two.html"/>
    </menu>
  </body>
</project>

Also make sure that the <name> element in your plugin's pom.xml contains this text:

  <name>XXXXX Maven Plugin</name>

This name is used in the title of the pages in the generated site.

For Mojo Parent 15 and Older

Place this in your plugin's src/site/site.xml for a starting point:

<project>
  <bannerLeft>
    <name>Mojo</name>
    <src>http://mojo.codehaus.org/images/mojo_logo.png</src>
    <href>http://mojo.codehaus.org</href>
  </bannerLeft>
  <bannerRight>
    <name>Codehaus</name>
    <src>http://mojo.codehaus.org/images/codehaus-small.png</src>
    <href>http://www.codehaus.org</href>
  </bannerRight>
  <body>
    <links>
      <item name="Mojo" href="http://mojo.codehaus.org"/>
      <item name="Maven" href="http://maven.apache.org/"/>
    </links>
    <menu name="Overview">
      <item name="Introduction" href="index.html"/>
      <item name="Goals" href="plugin-info.html"/>
      <item name="Usage" href="usage.html"/>
      <item name="FAQ" href="faq.html"/>
    </menu>
    <menu name="Examples">
      <item name="description1" href="examples/example-one.html"/>
      <item name="description2" href="examples/example-two.html"/>
    </menu>
    <menu ref="reports" />
  </body>
</project>