Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-347

use plugin-tools java 5 annotations to avoid fields copy/paste when implementing

    XMLWordPrintableJSON

    Details

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hboutemy Herve Boutemy
                Reporter:
                hboutemy Herve Boutemy
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: