Package scala_maven

Class ScalaDocMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport
Direct Known Subclasses:
ScalaDocJarMojo

@Mojo(name="doc", requiresDependencyResolution=COMPILE) @Execute(phase=GENERATE_RESOURCES) public class ScalaDocMojo extends ScalaSourceMojoSupport implements org.apache.maven.reporting.MavenReport
Produces Scala API documentation.
  • Field Details

    • windowtitle

      @Parameter(property="windowtitle", defaultValue="${project.name} ${project.version} API") protected String windowtitle
      Specify window title of generated HTML documentation. [scaladoc, vscaladoc]
    • bottom

      @Parameter(property="bottom", defaultValue="Copyright (c) {inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.") protected String bottom
      Specifies the text to be placed at the bottom of each output file. If you want to use html you have to put it in a CDATA section, eg. <![CDATA[Copyright 2005, <a href="http://www.mycompany.com">MyCompany, Inc.<a>]]> [scaladoc, vscaladoc]
    • charset

      @Parameter(property="charset", defaultValue="ISO-8859-1") protected String charset
      Charset for cross-platform viewing of generated documentation. [scaladoc, vscaladoc]
    • doctitle

      @Parameter(property="doctitle", defaultValue="${project.name} ${project.version} API") protected String doctitle
      Include title for the overview page. [scaladoc, scaladoc2, vscaladoc]
    • linksource

      @Parameter(property="linksource", defaultValue="true") protected boolean linksource
      Generate source in HTML [scaladoc, vscaladoc]
    • nocomment

      @Parameter(property="nocomment", defaultValue="false") protected boolean nocomment
      Suppress description and tags, generate only declarations [scaladoc, vscaladoc]
    • stylesheetfile

      @Parameter(property="stylesheetfile") protected File stylesheetfile
      File to change style of the generated documentation [scaladoc, vscaladoc]
    • top

      @Parameter(property="top") protected String top
      Include top text for each page [scaladoc, vscaladoc]
    • outputDirectory

      @Parameter(defaultValue="scaladocs", required=true) protected String outputDirectory
      Specifies the destination directory where scalaDoc saves the generated HTML files.
    • reportOutputDirectory

      @Parameter(defaultValue="${project.reporting.outputDirectory}/scaladocs", required=true) protected File reportOutputDirectory
      Specifies the destination directory where javadoc saves the generated HTML files.
    • name

      @Parameter(property="name", defaultValue="ScalaDocs") private String name
      The name of the Scaladoc report.
      Since:
      2.1
    • description

      @Parameter(property="description", defaultValue="ScalaDoc API documentation.") private String description
      The description of the Scaladoc report.
      Since:
      2.1
    • scaladocClassName

      @Parameter(property="maven.scaladoc.className") protected String scaladocClassName
      className (FQN) of the main scaladoc to use, if not define, the the scalaClassName is used
    • vscaladocVersion

      @Parameter(property="maven.scaladoc.vscaladocVersion") protected String vscaladocVersion
      If you want to use vscaladoc to generate api instead of regular scaladoc, set the version of vscaladoc you want to use.
    • forceAggregate

      @Parameter(property="forceAggregate", defaultValue="false") protected boolean forceAggregate
      To allow running aggregation only from command line use "-DforceAggregate=true" (avoid using in pom.xml). [scaladoc, vscaladoc]
    • aggregateDirectOnly

      @Parameter(property="maven.scaladoc.aggregateDirectOnly", defaultValue="true") protected boolean aggregateDirectOnly
      If you want to aggregate only direct sub modules.
    • sourceDir

      @Parameter(defaultValue="${project.build.sourceDirectory}/../scala") protected File sourceDir
      The directory which contains scala/java source files
    • _sourceFiles

      private List<File> _sourceFiles
  • Constructor Details

    • ScalaDocMojo

      public ScalaDocMojo()
  • Method Details

    • getSourceDirectories

      protected List<File> getSourceDirectories() throws Exception
      Description copied from class: ScalaSourceMojoSupport
      Retrieves the list of *all* root source directories. We need to pass all .java and .scala files into the scala compiler
      Specified by:
      getSourceDirectories in class ScalaSourceMojoSupport
      Throws:
      Exception
    • canGenerateReport

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

      private List<File> findSourceFiles()
      Returns:
      Throws:
      Exception
    • canAggregate

      private boolean canAggregate()
    • isExternalReport

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

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

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

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

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

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

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

      public void doExecute() throws Exception
      Specified by:
      doExecute in class ScalaMojoSupport
      Throws:
      Exception
    • getScalaCommand

      protected JavaMainCaller getScalaCommand() throws Exception
      Overrides:
      getScalaCommand in class ScalaMojoSupport
      Throws:
      Exception
    • generate

      public void generate(org.apache.maven.doxia.sink.Sink sink, Locale locale) throws org.apache.maven.reporting.MavenReportException
      Specified by:
      generate in interface org.apache.maven.reporting.MavenReport
      Throws:
      org.apache.maven.reporting.MavenReportException
    • generate

      public void generate(org.codehaus.doxia.sink.Sink sink, Locale locale) throws org.apache.maven.reporting.MavenReportException
      Throws:
      org.apache.maven.reporting.MavenReportException
    • tryAggregateUpper

      protected void tryAggregateUpper(org.apache.maven.project.MavenProject prj) throws Exception
      Throws:
      Exception
    • aggregate

      protected void aggregate(org.apache.maven.project.MavenProject parent) throws Exception
      Throws:
      Exception
    • getBottomText

      private String getBottomText()
      Method that sets the bottom text that will be displayed on the bottom of the javadocs.
      Returns:
      a String that contains the text that will be displayed at the bottom of the javadoc