Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Context

The actual documentation mechanism takes the Javadoc description of a MOJO to generate the plugin reports. The main issue is that the documentation is only in one language.

Here is a simple javadoc header for MOJO:

Code Block
titleMyMojo.java
borderStylesolid
package org.apache.maven.plugin.new;

/**
 * Generates documentation for this MOJO.
 *
 * @goal myGoal
 * @phase generate-sources
 */
public class MyMojo
    extends AbstractMojo {}

Solution

We propose to add a @i18n tag to handle the internationalization. The default language will be the javadoc description, other languages should be handle by the @i18n tag.
The bundles names will be based on the package/class and located in /src/main/resources/

Code Block
titleMyMojo.java
borderStylesolid
package org.apache.maven.plugin.new;

/**
 * Generates documentation for this MOJO.
 *
 * @i18n key="myMojo.description"
 * @goal myGoal
 * @phase generate-sources
 */
public class MyMojo
    extends AbstractMojo {}
Code Block
titleMyMojo_fr.properties
borderStylesolid
myMojo.description=Génére de la documentation pour ce MOJO.