Package scala_maven

Class ScalaDocMojo

  • 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 Detail

      • windowtitle

        @Parameter(property="windowtitle",
                   defaultValue="${project.name} ${project.version} API")
        protected java.lang.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 java.lang.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 java.lang.String charset
        Charset for cross-platform viewing of generated documentation. [scaladoc, vscaladoc]
      • doctitle

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

        @Parameter(property="footer")
        protected java.lang.String footer
        Include footer text for each page. [scaladoc, vscaladoc]
      • header

        @Parameter(property="header")
        protected java.lang.String header
        Include header text for each page [scaladoc, 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 java.io.File stylesheetfile
        File to change style of the generated documentation [scaladoc, vscaladoc]
      • top

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

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

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

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

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

        @Parameter(property="maven.scaladoc.className")
        protected java.lang.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 java.lang.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 java.io.File sourceDir
        The directory which contains scala/java source files
      • _sourceFiles

        private java.util.List<java.io.File> _sourceFiles
    • Constructor Detail

      • ScalaDocMojo

        public ScalaDocMojo()
    • Method Detail

      • getSourceDirectories

        protected java.util.List<java.io.File> getSourceDirectories()
                                                             throws java.lang.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:
        java.lang.Exception
      • canGenerateReport

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

        private java.util.List<java.io.File> findSourceFiles()
        Returns:
        Throws:
        java.lang.Exception
      • canAggregate

        private boolean canAggregate()
      • isExternalReport

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

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

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

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

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

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

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

        public void doExecute()
                       throws java.lang.Exception
        Specified by:
        doExecute in class ScalaMojoSupport
        Throws:
        java.lang.Exception
      • generate

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

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

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

        private java.lang.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