Package scala_maven
Class ScalaDocMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- scala_maven.ScalaMojoSupport
-
- scala_maven.ScalaSourceMojoSupport
-
- scala_maven.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 Summary
Fields Modifier and Type Field Description private java.util.List<java.io.File>
_sourceFiles
protected boolean
aggregateDirectOnly
If you want to aggregate only direct sub modules.protected java.lang.String
bottom
Specifies the text to be placed at the bottom of each output file.protected java.lang.String
charset
Charset for cross-platform viewing of generated documentation.private java.lang.String
description
The description of the Scaladoc report.protected java.lang.String
doctitle
Include title for the overview page.protected java.lang.String
footer
Include footer text for each page.protected boolean
forceAggregate
To allow running aggregation only from command line use "-DforceAggregate=true" (avoid using in pom.xml).protected java.lang.String
header
Include header text for each page [scaladoc, vscaladoc]protected boolean
linksource
Generate source in HTML [scaladoc, vscaladoc]private java.lang.String
name
The name of the Scaladoc report.protected boolean
nocomment
Suppress description and tags, generate only declarations [scaladoc, vscaladoc]protected java.lang.String
outputDirectory
Specifies the destination directory where scalaDoc saves the generated HTML files.protected java.io.File
reportOutputDirectory
Specifies the destination directory where javadoc saves the generated HTML files.protected java.lang.String
scaladocClassName
className (FQN) of the main scaladoc to use, if not define, the the scalaClassName is usedprotected java.io.File
sourceDir
The directory which contains scala/java source filesprotected java.io.File
stylesheetfile
File to change style of the generated documentation [scaladoc, vscaladoc]protected java.lang.String
top
Include top text for each page [scaladoc, vscaladoc]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.protected java.lang.String
windowtitle
Specify window title of generated HTML documentation.-
Fields inherited from class scala_maven.ScalaSourceMojoSupport
excludes, includes, sendJavaToScalac
-
Fields inherited from class scala_maven.ScalaMojoSupport
addJavacArgs, addScalacArgs, args, checkMultipleScalaVersions, compilerPlugins, dependencies, displayCmd, encoding, factory, failOnMultipleScalaVersions, forceUseArgFile, fork, JAR, javacArgs, javacGenerateDebugSymbols, jvmArgs, localRepo, mavenProjectBuilder, POM, project, reactorProjects, remoteRepos, resolver, SCALA_COMPILER_ARTIFACTID, SCALA_LIBRARY_ARTIFACTID, scalaClassName, session, source, target, toolchainManager, useCanonicalPath
-
-
Constructor Summary
Constructors Constructor Description ScalaDocMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
aggregate(org.apache.maven.project.MavenProject parent)
private boolean
canAggregate()
boolean
canGenerateReport()
void
doExecute()
private java.util.List<java.io.File>
findSourceFiles()
void
generate(org.apache.maven.doxia.sink.Sink sink, java.util.Locale locale)
private java.lang.String
getBottomText()
Method that sets the bottom text that will be displayed on the bottom of the javadocs.java.lang.String
getCategoryName()
java.lang.String
getDescription(java.util.Locale locale)
java.lang.String
getName(java.util.Locale locale)
java.lang.String
getOutputName()
java.io.File
getReportOutputDirectory()
protected JavaMainCaller
getScalaCommand()
protected java.util.List<java.io.File>
getSourceDirectories()
Retrieves the list of *all* root source directories.boolean
isExternalReport()
void
setReportOutputDirectory(java.io.File v)
protected void
tryAggregateUpper(org.apache.maven.project.MavenProject prj)
-
Methods inherited from class scala_maven.ScalaSourceMojoSupport
findSourceWithFilters, findSourceWithFilters, initFilters, normalize
-
Methods inherited from class scala_maven.ScalaMojoSupport
addCompilerPluginOptions, addCompilerToClasspath, addLibraryToClasspath, addToClasspath, addToClasspath, addToClasspath, addToClasspath, checkScalaVersion, execute, findScalaVersion, findVersionFromDependencies, findVersionFromPluginArtifacts, getAllDependencies, getArtifactJar, getArtifactJar, getCompilerDependencies, getCompilerJar, getCompilerPluginOptions, getDependencies, getEmptyScalaCommand, getEmptyScalaCommand, getJavacOptions, getLibraryJar, getPluginArtifactJar, getPluginArtifactJar, getScalaCommand, getScalaOptions, getScalaOrganization, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts, resolveDependencyArtifacts, scalaCompilerArtifact
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
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
-
-
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 classScalaSourceMojoSupport
- Throws:
java.lang.Exception
-
canGenerateReport
public boolean canGenerateReport()
- Specified by:
canGenerateReport
in interfaceorg.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 interfaceorg.apache.maven.reporting.MavenReport
-
getCategoryName
public java.lang.String getCategoryName()
- Specified by:
getCategoryName
in interfaceorg.apache.maven.reporting.MavenReport
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
- Specified by:
getDescription
in interfaceorg.apache.maven.reporting.MavenReport
-
getName
public java.lang.String getName(java.util.Locale locale)
- Specified by:
getName
in interfaceorg.apache.maven.reporting.MavenReport
-
getOutputName
public java.lang.String getOutputName()
- Specified by:
getOutputName
in interfaceorg.apache.maven.reporting.MavenReport
-
getReportOutputDirectory
public java.io.File getReportOutputDirectory()
- Specified by:
getReportOutputDirectory
in interfaceorg.apache.maven.reporting.MavenReport
-
setReportOutputDirectory
public void setReportOutputDirectory(java.io.File v)
- Specified by:
setReportOutputDirectory
in interfaceorg.apache.maven.reporting.MavenReport
-
doExecute
public void doExecute() throws java.lang.Exception
- Specified by:
doExecute
in classScalaMojoSupport
- Throws:
java.lang.Exception
-
getScalaCommand
protected JavaMainCaller getScalaCommand() throws java.lang.Exception
- Overrides:
getScalaCommand
in classScalaMojoSupport
- 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 interfaceorg.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
-
-