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 protected boolean
aggregateDirectOnly
If you want to aggregate only direct sub modules.protected String
bottom
Specifies the text to be placed at the bottom of each output file.protected String
charset
Charset for cross-platform viewing of generated documentation.protected String
doctitle
Include title for the overview page.protected 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 String
header
Include header text for each page [scaladoc, vscaladoc]protected boolean
linksource
Generate source in HTML [scaladoc, vscaladoc]protected boolean
nocomment
Suppress description and tags, generate only declarations [scaladoc, vscaladoc]protected String
outputDirectory
Specifies the destination directory where scalaDoc saves the generated HTML files.protected File
reportOutputDirectory
Specifies the destination directory where javadoc saves the generated HTML files.protected String
scaladocClassName
className (FQN) of the main scaladoc to use, if not define, the the scalaClassName is usedprotected File
sourceDir
The directory which contains scala/java source filesprotected File
stylesheetfile
File to change style of the generated documentation [scaladoc, vscaladoc]protected String
top
Include top text for each page [scaladoc, vscaladoc]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.protected 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)
boolean
canGenerateReport()
void
doExecute()
void
generate(org.codehaus.doxia.sink.Sink sink, Locale locale)
String
getCategoryName()
String
getDescription(Locale locale)
String
getName(Locale locale)
String
getOutputName()
File
getReportOutputDirectory()
protected JavaMainCaller
getScalaCommand()
protected List<File>
getSourceDirectories()
Retrieves the list of *all* root source directories.boolean
isExternalReport()
void
setReportOutputDirectory(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
-
-
-
-
Field Detail
-
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]
-
footer
@Parameter(property="footer") protected String footer
Include footer text for each page. [scaladoc, vscaladoc]
-
header
@Parameter(property="header") protected 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 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.
-
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
-
-
Method Detail
-
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 classScalaSourceMojoSupport
- Throws:
Exception
-
canGenerateReport
public boolean canGenerateReport()
- Specified by:
canGenerateReport
in interfaceorg.apache.maven.reporting.MavenReport
-
isExternalReport
public boolean isExternalReport()
- Specified by:
isExternalReport
in interfaceorg.apache.maven.reporting.MavenReport
-
getCategoryName
public String getCategoryName()
- Specified by:
getCategoryName
in interfaceorg.apache.maven.reporting.MavenReport
-
getDescription
public String getDescription(Locale locale)
- Specified by:
getDescription
in interfaceorg.apache.maven.reporting.MavenReport
-
getName
public String getName(Locale locale)
- Specified by:
getName
in interfaceorg.apache.maven.reporting.MavenReport
-
getOutputName
public String getOutputName()
- Specified by:
getOutputName
in interfaceorg.apache.maven.reporting.MavenReport
-
getReportOutputDirectory
public File getReportOutputDirectory()
- Specified by:
getReportOutputDirectory
in interfaceorg.apache.maven.reporting.MavenReport
-
setReportOutputDirectory
public void setReportOutputDirectory(File v)
- Specified by:
setReportOutputDirectory
in interfaceorg.apache.maven.reporting.MavenReport
-
doExecute
public void doExecute() throws Exception
- Specified by:
doExecute
in classScalaMojoSupport
- Throws:
Exception
-
getScalaCommand
protected JavaMainCaller getScalaCommand() throws Exception
- Overrides:
getScalaCommand
in classScalaMojoSupport
- Throws:
Exception
-
generate
public void generate(org.codehaus.doxia.sink.Sink sink, 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 Exception
- Throws:
Exception
-
-