Package scala_maven
Class ScalaDocJarMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- scala_maven.ScalaMojoSupport
-
- scala_maven.ScalaSourceMojoSupport
-
- scala_maven.ScalaDocMojo
-
- scala_maven.ScalaDocJarMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,org.apache.maven.reporting.MavenReport
@Mojo(name="doc-jar", defaultPhase=PACKAGE, requiresDependencyResolution=COMPILE) public class ScalaDocJarMojo extends ScalaDocMojoCreates a jar of the non-aggregated scaladoc and attaches it to the project for distribution.
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.archiver.MavenArchiveConfigurationarchiveThe archive configuration to use.private booleanattachSpecifies whether to attach the generated artifact to the project helper.private java.lang.StringclassifierSpecifies the classifier of the generated artifact.private static java.lang.String[]DEFAULT_EXCLUDESprivate static java.lang.String[]DEFAULT_INCLUDESprivate java.io.FiledefaultManifestFilePath to the default MANIFEST file to use.protected booleanfailOnErrorSpecifies if the build will fail if there are errors during javadoc execution or not.private java.lang.StringfinalNameSpecifies the filename that will be used for the generated jar file.private org.codehaus.plexus.archiver.jar.JarArchiverjarArchiverThe Jar archiver.private java.lang.StringjarOutputDirectorySpecifies the directory where the generated jar file will be put.private org.apache.maven.project.MavenProjectHelperprojectHelperUsed for attaching the artifact in the project.private booleanskipSpecifies whether to skip generating scaladoc.private booleanuseDefaultManifestFileSet this totrueto enable the use of thedefaultManifestFile.-
Fields inherited from class scala_maven.ScalaDocMojo
aggregateDirectOnly, bottom, charset, doctitle, footer, forceAggregate, header, linksource, nocomment, outputDirectory, reportOutputDirectory, scaladocClassName, sourceDir, stylesheetfile, top, vscaladocVersion, windowtitle
-
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 ScalaDocJarMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoExecute()protected voidfailOnError(java.lang.String prefix, java.lang.Exception e)private java.io.FilegenerateArchive(java.io.File javadocFiles, java.lang.String jarFileName)Method that creates the jar fileprotected java.lang.StringgetClassifier()-
Methods inherited from class scala_maven.ScalaDocMojo
aggregate, canGenerateReport, generate, getCategoryName, getDescription, getName, getOutputName, getReportOutputDirectory, getScalaCommand, getSourceDirectories, isExternalReport, setReportOutputDirectory, tryAggregateUpper
-
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
-
DEFAULT_INCLUDES
private static final java.lang.String[] DEFAULT_INCLUDES
-
DEFAULT_EXCLUDES
private static final java.lang.String[] DEFAULT_EXCLUDES
-
jarArchiver
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="jar") private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiverThe Jar archiver.
-
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelper
Used for attaching the artifact in the project.
-
finalName
@Parameter(property="project.build.finalName") private java.lang.String finalName
Specifies the filename that will be used for the generated jar file. Please note that-javadocor-test-javadocwill be appended to the file name.
-
attach
@Parameter(property="attach", defaultValue="true") private boolean attachSpecifies whether to attach the generated artifact to the project helper.
-
classifier
@Parameter(property="classifier", defaultValue="javadoc") private java.lang.String classifierSpecifies the classifier of the generated artifact.
-
skip
@Parameter(property="skip", defaultValue="false") private boolean skipSpecifies whether to skip generating scaladoc.
-
jarOutputDirectory
@Parameter(property="project.build.directory") private java.lang.String jarOutputDirectory
Specifies the directory where the generated jar file will be put.
-
archive
@Parameter private org.apache.maven.archiver.MavenArchiveConfiguration archive
The archive configuration to use. See Maven Archiver Reference.
-
defaultManifestFile
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/MANIFEST.MF", required=true, readonly=true) private java.io.File defaultManifestFilePath to the default MANIFEST file to use. It will be used ifuseDefaultManifestFileis set totrue.
-
useDefaultManifestFile
@Parameter(defaultValue="false") private boolean useDefaultManifestFile
Set this totrueto enable the use of thedefaultManifestFile.
-
failOnError
@Parameter(property="maven.javadoc.failOnError", defaultValue="true") protected boolean failOnErrorSpecifies if the build will fail if there are errors during javadoc execution or not.- Since:
- 2.5
-
-
Method Detail
-
doExecute
public void doExecute() throws java.lang.Exception- Overrides:
doExecutein classScalaDocMojo- Throws:
java.lang.Exception
-
generateArchive
private java.io.File generateArchive(java.io.File javadocFiles, java.lang.String jarFileName) throws org.codehaus.plexus.archiver.ArchiverException, java.io.IOExceptionMethod that creates the jar file- Parameters:
javadocFiles- the directory where the generated jar file will be putjarFileName- the filename of the generated jar file- Returns:
- a File object that contains the generated jar file
- Throws:
org.codehaus.plexus.archiver.ArchiverExceptionjava.io.IOException
-
getClassifier
protected java.lang.String getClassifier()
-
failOnError
protected void failOnError(java.lang.String prefix, java.lang.Exception e) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-