Class ServiceDocGenReport

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.servicedocgen.ServiceDocGenReport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport

@Mojo(name="generate", defaultPhase=PREPARE_PACKAGE, requiresProject=true, requiresDirectInvocation=false, executionStrategy="once-per-session", requiresDependencyResolution=COMPILE_PLUS_RUNTIME, requiresDependencyCollection=COMPILE_PLUS_RUNTIME) public class ServiceDocGenReport extends org.apache.maven.plugin.AbstractMojo implements org.apache.maven.reporting.MavenReport
Maven Plugin to automatically generate documentation for services of the current project.
  1. Scans the current projects source code for (JAX-RS annotated) services that match the RegEx configured by classnameRegex.
  2. Analyzes the services from source-code (extract JavaDoc, etc.) and byte-code (resolve generic parameters, etc.) and create intermediate meta-data as ServicesDescriptor.
  3. Generates documentation from the collected meta-data (by default as HTML from a velocity template shipped with this plugin but can be overridden via configuration parameters).
scan and analyze services from the current project via source-code and byte-code analysis. Creates
Author:
hohwille
  • Field Details

    • outputDirectory

      @Parameter(defaultValue="${project.reporting.outputDirectory}", readonly=true, required=true) protected File outputDirectory
  • Constructor Details

    • ServiceDocGenReport

      public ServiceDocGenReport()
  • Method Details

    • getOutputName

      public String getOutputName()
      Specified by:
      getOutputName in interface org.apache.maven.reporting.MavenReport
    • getBundle

      protected ResourceBundle getBundle(Locale locale)
    • getName

      public String getName(Locale locale)
      Specified by:
      getName in interface org.apache.maven.reporting.MavenReport
    • getDescription

      public String getDescription(Locale locale)
      Specified by:
      getDescription in interface org.apache.maven.reporting.MavenReport
    • isExternalReport

      public boolean isExternalReport()
      Specified by:
      isExternalReport in interface org.apache.maven.reporting.MavenReport
    • getOutputDirectoryPath

      protected String getOutputDirectoryPath()
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • canGenerateReport

      public boolean canGenerateReport()
      Specified by:
      canGenerateReport in interface org.apache.maven.reporting.MavenReport
    • generate

      public void generate(org.apache.maven.doxia.sink.Sink sink, Locale locale) throws org.apache.maven.reporting.MavenReportException

      The documentation is an external report: it is written to its own files, not to the sink.

      Specified by:
      generate in interface org.apache.maven.reporting.MavenReport
      Throws:
      org.apache.maven.reporting.MavenReportException
    • getCategoryName

      public String getCategoryName()
      Specified by:
      getCategoryName in interface org.apache.maven.reporting.MavenReport
    • setReportOutputDirectory

      public void setReportOutputDirectory(File reportOutputDirectory)
      Specified by:
      setReportOutputDirectory in interface org.apache.maven.reporting.MavenReport
    • getReportOutputDirectory

      public File getReportOutputDirectory()
      Specified by:
      getReportOutputDirectory in interface org.apache.maven.reporting.MavenReport