Skip to content

[MSHARED-347] use plugin-tools java 5 annotations to avoid fields copy/paste when implementing #100

Description

@jira-importer

Hervé Boutemy opened MSHARED-347 and commented

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:

    /**
     * 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;
    }

and even add encoding support


Affects: maven-reporting-impl-2.2

Issue Links:

  • MSHARED-348 support reporting encoding configuration when used as goal
    ("is depended upon by")

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpriority:criticalCrashes, loss of data, severe memory leak

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions