Herve Boutemy created MSHARED-347:
-------------------------------------

             Summary: use plugin-tools java 5 annotations to avoid fields 
copy/paste when implementing
                 Key: MSHARED-347
                 URL: https://jira.codehaus.org/browse/MSHARED-347
             Project: Maven Shared Components
          Issue Type: New Feature
          Components: maven-reporting-impl
    Affects Versions: maven-reporting-impl-2.2
            Reporter: Herve Boutemy
            Priority: Critical


with plugin-tools java 5 annotations, fields can be created with annotations in 
maven-reporting-impl AbstractMavenReport class and detected by Mojo extending 
the abstract class

this will remove some copy/pasted code:
{code:java}    /**
     * The output directory for the report. Note that this parameter is only 
evaluated if the goal is run directly from
     * the command line. If the goal is run indirectly as part of a site 
generation, the output directory configured in
     * the Maven Site Plugin is used instead.
     *
     * @parameter default-value="${project.reporting.outputDirectory}"
     * @required
     */
    protected File outputDirectory;

    /**
     * The Maven Project.
     *
     * @parameter default-value="${project}"
     * @required
     * @readonly
     */
    protected MavenProject project;

    /**
     * Doxia Site Renderer component.
     *
     * @component
     */
    protected Renderer siteRenderer;

    @Override
    protected String getOutputDirectory()
    {
        return outputDirectory.getAbsolutePath();
    }

    @Override
    protected MavenProject getProject()
    {
        return project;
    }

    @Override
    protected Renderer getSiteRenderer()
    {
        return siteRenderer;
    }{code}

and even add encoding support



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to