Class AbstractJavadocMojo

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<AdditionalDependency> additionalDependencies
      Capability to add additional dependencies to the javadoc classpath.
      private java.lang.String additionalJOption
      Set an additional Javadoc option(s) (i.e.
      private java.lang.String[] additionalJOptions
      Set additional JVM options for the execution of the javadoc command via the '-J' option to javadoc.
      private java.lang.String[] additionalOptions
      Set an additional option(s) on the command line.
      private boolean applyJavadocSecurityFix
      To apply the security fix on generated javadoc see http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1571
      private org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
      Archiver manager
      protected static java.lang.String ARGFILE_FILE_NAME
      The argfile file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
      private org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager  
      private org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver  
      private boolean author
      Specifies whether or not the author text is included in the generated Javadocs.
      private java.lang.String bootclasspath
      Specifies the paths where the boot classes reside.
      private BootclasspathArtifact[] bootclasspathArtifacts
      Specifies the artifacts where the boot classes reside.
      private 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.
      private boolean breakiterator
      Uses the sentence break iterator to determine the end of the first sentence.
      private java.lang.String charset
      Specifies the HTML character set for this document.
      private boolean debug
      Set this to true to debug the Javadoc plugin.
      protected static java.lang.String DEBUG_JAVADOC_SCRIPT_NAME
      The Javadoc script file name when debug parameter is on, i.e.
      private static java.lang.String DEFAULT_CSS_NAME
      Default css file name
      private java.util.List<JavadocBundle> dependencyJavadocBundles
      Transient variable to allow lazy-resolution of javadoc bundles from dependencies, so they can be used at various points in the javadoc generation process.
      private org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver dependencyResolver  
      private java.util.List<java.lang.String> dependencySourceExcludes
      List of excluded dependency-source patterns.
      private java.util.List<java.lang.String> dependencySourceIncludes
      List of included dependency-source patterns.
      private boolean detectJavaApiLink
      Detect the Java API link for the current build, i.e.
      private boolean detectLinks
      Detect the Javadoc links for all dependencies defined in the project.
      private boolean detectOfflineLinks
      Detect the links for all modules defined in the project.
      private java.lang.String docencoding
      Specifies the encoding of the generated HTML files.
      private boolean docfilessubdirs
      Enables deep copying of the **/doc-files directories and the specifc resources directory from the javadocDirectory directory (for instance, src/main/javadoc/com/mycompany/myapp/doc-files and src/main/javadoc/resources).
      private java.lang.String doclet
      Specifies the class file that starts the doclet used in generating the documentation.
      private DocletArtifact docletArtifact
      Specifies the artifact containing the doclet starting class file (specified with the -doclet option).
      private DocletArtifact[] docletArtifacts
      Specifies multiple artifacts containing the path for the doclet starting class file (specified with the -doclet option).
      private java.lang.String docletPath
      Specifies the path to the doclet starting class file (specified with the -doclet option) and any jar files it depends on.
      private java.lang.String doclint
      Specifies specific checks to be performed on Javadoc comments.
      private java.lang.String doctitle
      Specifies the title to be placed near the top of the overview summary file.
      private static java.lang.String ELEMENT_LIST  
      private java.lang.String encoding
      Specifies the encoding name of the source files.
      private java.lang.String excludedocfilessubdir
      Excludes any "doc-files" subdirectories with the given names.
      private java.lang.String excludePackageNames
      Unconditionally excludes the specified packages and their subpackages from the list formed by -subpackages.
      private java.lang.String extdirs
      Specifies the directories where extension classes reside.
      protected boolean failOnError
      Specifies if the build will fail if there are errors during javadoc execution or not.
      protected boolean failOnWarnings
      Specifies if the build will fail if there are warning during javadoc execution or not.
      protected static java.lang.String FILES_FILE_NAME
      The files file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
      private java.lang.String footer
      Specifies the footer text to be placed at the bottom of each output file.
      private Group[] groups
      Separates packages on the overview page into whatever groups you specify, one group per table.
      private java.lang.String header
      Specifies the header text to be placed at the top of each output file.
      private java.lang.String helpfile
      Specifies the path of an alternate help file path\filename that the HELP link in the top and bottom navigation bars link to.
      private boolean includeDependencySources
      Whether dependency -sources jars should be resolved and included as source paths for javadoc generation.
      private boolean includeTransitiveDependencySources
      Deprecated.
      if these sources depend on transitive dependencies, those dependencies should be added to the pom as direct dependencies
      private boolean isOffline
      Specify if the Javadoc should operate in offline mode.
      private static org.codehaus.plexus.languages.java.version.JavaVersion JAVA_VERSION  
      private java.util.Properties javaApiLinks
      Use this parameter only if if you want to override the default URLs.
      static java.lang.String JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
      Classifier used in the name of the javadoc-options XML file, and in the resources bundle artifact that gets attached to the project.
      private java.io.File javadocDirectory
      Specifies the Javadoc resources directory to be included in the Javadoc (i.e.
      private java.lang.String javadocExecutable
      Sets the absolute path of the Javadoc Tool executable to use.
      private java.io.File javadocOptionsDir
      Directory into which assembled JavadocOptions instances will be written before they are added to javadoc resources bundles.
      private org.codehaus.plexus.languages.java.version.JavaVersion javadocRuntimeVersion
      Version of the Javadoc Tool executable to use.
      private java.lang.String javadocVersion
      Version of the Javadoc Tool executable to use, ex.
      private java.util.Map<java.lang.String,​java.lang.String> jdkToolchain
      Specify the requirements for this jdk toolchain.
      private boolean keywords
      Adds HTML meta keyword tags to the generated file for each class.
      protected java.util.ArrayList<java.lang.String> links
      Creates links to existing javadoc-generated documentation of external referenced classes.
      private boolean linksource
      Creates an HTML version of each source file (with line numbers) and adds links to them from the standard HTML documentation.
      private java.lang.String locale
      Specifies the locale that javadoc uses when generating documentation.
      private org.apache.maven.artifact.repository.ArtifactRepository localRepository
      The local repository where the artifacts are located.
      (package private) org.codehaus.plexus.languages.java.jpms.LocationManager locationManager  
      private org.apache.maven.project.ProjectBuilder mavenProjectBuilder
      Project builder
      private java.lang.String maxmemory
      Specifies the maximum Java heap size to be used when launching the Javadoc tool.
      private java.lang.String minmemory
      Specifies the minimum Java heap size to be used when launching the Javadoc tool.
      private org.apache.maven.plugin.MojoExecution mojo  
      private boolean nocomment
      Suppress the entire comment body, including the main description and all tags, generating only declarations.
      private boolean nodeprecated
      Prevents the generation of any deprecated API at all in the documentation.
      private boolean nodeprecatedlist
      Prevents the generation of the file containing the list of deprecated APIs (deprecated-list.html) and the link in the navigation bar to that page.
      private boolean nohelp
      Omits the HELP link in the navigation bars at the top and bottom of each page of output.
      private boolean noindex
      Omits the index from the generated docs.
      private boolean nonavbar
      Omits the navigation bar from the generated docs.
      private boolean nooverview
      Omits the entire overview page from the generated docs.
      private java.lang.String noqualifier
      Omits qualifying package name from ahead of class names in output.
      private boolean nosince
      Omits from the generated docs the "Since" sections associated with the since tags.
      private boolean notimestamp
      Suppresses the timestamp, which is hidden in an HTML comment in the generated HTML near the top of each page.
      private boolean notree
      Omits the class/interface hierarchy pages from the generated docs.
      private OfflineLink[] offlineLinks
      This option is a variation of -link; they both create links to javadoc-generated documentation for external referenced classes.
      private boolean old
      This option creates documentation with the appearance and functionality of documentation generated by Javadoc 1.1.
      protected static java.lang.String OPTIONS_FILE_NAME
      The options file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
      protected java.io.File outputDirectory
      Specifies the destination directory where javadoc saves the generated HTML files.
      private java.io.File overview
      Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by path/filename and place it on the Overview page (overview-summary.html).
      private static java.lang.String PACKAGE_LIST  
      protected static java.lang.String PACKAGES_FILE_NAME
      The packages file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
      private java.lang.String packagesheader
      Specify the text for upper left frame.
      protected org.apache.maven.project.MavenProject project
      The Maven Project Object
      private boolean quiet
      Shuts off non-error and non-warning messages, leaving only the warnings and errors appear, making them easier to view.
      private java.util.List<org.apache.maven.project.MavenProject> reactorProjects
      The projects in the reactor for aggregation report.
      private java.lang.String release
      Provide source compatibility with specified release
      private static java.lang.String RESOURCE_CSS_DIR
      Default location for css
      private static java.lang.String RESOURCE_DIR
      The current class directory
      private ResourceResolver resourceResolver  
      private ResourcesArtifact[] resourcesArtifacts
      A list of artifacts containing resources which should be copied into the Javadoc output directory (like stylesheets, icons, etc.).
      private boolean serialwarn
      Generates compile-time warnings for missing serial tags.
      protected org.apache.maven.execution.MavenSession session
      The current build session instance.
      private org.apache.maven.settings.Settings settings
      The Maven Settings.
      private java.lang.String show
      Specifies the access level for classes and members to show in the Javadocs.
      private static org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_4
      For Javadoc options appears since Java 1.4.
      private static org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_4_2
      For Javadoc options appears since Java 1.4.2.
      private static org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_5
      For Javadoc options appears since Java 5.0.
      private static org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_6
      For Javadoc options appears since Java 6.0.
      private static org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_8
      For Javadoc options appears since Java 8.0.
      protected boolean skip
      Specifies whether the Javadoc generation should be skipped.
      private java.lang.String skippedModules
      Comma separated list of modules (artifactId) to not add in aggregated javadoc
      private java.lang.String source
      Necessary to enable javadoc to handle assertions introduced in J2SE v 1.4 source code or generics introduced in J2SE v5.
      private java.io.File sourceDependencyCacheDir
      Directory where unpacked project sources / test-sources should be cached.
      private java.util.List<java.lang.String> sourceFileExcludes
      exclude filters on the source files.
      private java.util.List<java.lang.String> sourceFileIncludes
      Include filters on the source files.
      private java.lang.String sourcepath
      Specifies the source paths where the subpackages are located.
      private int sourcetab
      Specify the number of spaces each tab takes up in the source.
      private boolean splitindex
      Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non-alphabetical characters.
      private java.io.File staleDataPath
      Location of the file used to store the state of the previous javadoc run.
      private java.lang.String stylesheet
      Specifies whether the stylesheet to be used is the maven's javadoc stylesheet or java's default stylesheet when a stylesheetfile parameter is not specified.
      private java.lang.String stylesheetfile
      Specifies the path of an alternate HTML stylesheet file.
      private java.lang.String subpackages
      Specifies the package directory where javadoc will be executed.
      private java.lang.String taglet
      Specifies the class file that starts the taglet used in generating the documentation for that tag.
      private TagletArtifact tagletArtifact
      Specifies the Taglet artifact containing the taglet class files (.class).
      private TagletArtifact[] tagletArtifacts
      Specifies several Taglet artifacts containing the taglet class files (.class).
      private java.lang.String tagletpath
      Specifies the search paths for finding taglet class files (.class).
      private Taglet[] taglets
      Enables the Javadoc tool to interpret multiple taglets.
      private Tag[] tags
      Enables the Javadoc tool to interpret a simple, one-argument custom block tag tagname in doc comments.
      static java.lang.String TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
      Classifier used in the name of the javadoc-options XML file, and in the resources bundle artifact that gets attached to the project.
      private org.apache.maven.toolchain.ToolchainManager toolchainManager  
      private java.lang.String top
      Specifies the top text to be placed at the top of each output file.
      private boolean use
      Includes one "Use" page for each documented class and package.
      protected boolean useStandardDocletOptions
      Specifies to use the options provided by the Standard Doclet for a custom doclet.
      private boolean validateLinks
      Flag controlling content validation of package-list resources.
      private boolean verbose
      Provides more detailed messages while javadoc is running.
      private boolean version
      Includes the version text in the generated docs.
      private java.lang.String windowtitle
      Specifies the title to be placed in the HTML title tag.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      private void addArgIf​(java.util.List<java.lang.String> arguments, boolean b, java.lang.String value)
      Convenience method to add an argument to the command line conditionally based on the given flag.
      private void addArgIf​(java.util.List<java.lang.String> arguments, boolean b, java.lang.String value, org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion)
      Convenience method to add an argument to the command line regarding the requested Java version.
      private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments, java.lang.String key, java.lang.String value)
      Convenience method to add an argument to the command line if the the value is not null or empty.
      private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments, java.lang.String key, java.lang.String value, boolean repeatKey)
      Convenience method to add an argument to the command line if the the value is not null or empty.
      private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments, java.lang.String key, java.lang.String value, boolean repeatKey, boolean splitValue)
      Convenience method to add an argument to the command line if the the value is not null or empty.
      private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments, java.lang.String key, java.lang.String value, boolean repeatKey, boolean splitValue, org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion)
      Convenience method to add an argument to the command line if the the value is not null or empty.
      private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments, java.lang.String key, java.lang.String value, org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion)
      Convenience method to add an argument to the command line regarding the requested Java version.
      private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments, java.lang.String key, java.lang.String value, org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion, boolean repeatKey)
      Convenience method to add an argument to the command line regarding the requested Java version.
      private void addCommandLineArgFile​(org.codehaus.plexus.util.cli.Commandline cmd, java.io.File javadocOutputDirectory, java.util.List<java.lang.String> files)
      Generate a file called argfile (or files, depending the JDK) to hold files and add the @argfile (or @file, depending the JDK) in the command line.
      private void addCommandLineOptions​(org.codehaus.plexus.util.cli.Commandline cmd, java.util.List<java.lang.String> arguments, java.io.File javadocOutputDirectory)
      Generate an options file for all options and arguments and add the @options in the command line.
      private void addCommandLinePackages​(org.codehaus.plexus.util.cli.Commandline cmd, java.io.File javadocOutputDirectory, java.util.List<java.lang.String> packageNames)
      Generate a file called packages to hold all package names and add the @packages in the command line.
      private void addGroups​(java.util.List<java.lang.String> arguments)
      Add groups parameter to arguments.
      private void addJavadocOptions​(java.io.File javadocOutputDirectory, java.util.List<java.lang.String> arguments, java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> allSourcePaths, java.util.Set<OfflineLink> offlineLinks)
      Add Standard Javadoc Options.
      private void addLinkArguments​(java.util.List<java.lang.String> arguments)
      Convenience method to process links values as individual -link javadoc options.
      private void addLinkofflineArguments​(java.util.List<java.lang.String> arguments, java.util.Set<OfflineLink> offlineLinksList)
      Convenience method to process offlineLinks values as individual -linkoffline javadoc options.
      private void addMemoryArg​(org.codehaus.plexus.util.cli.Commandline cmd, java.lang.String arg, java.lang.String memory)
      Method that adds/sets the java memory parameters in the command line execution.
      private void addProxyArg​(org.codehaus.plexus.util.cli.Commandline cmd)
      Method that adds/sets the javadoc proxy parameters in the command line execution.
      private void addStandardDocletOptions​(java.io.File javadocOutputDirectory, java.util.List<java.lang.String> arguments, java.util.Set<OfflineLink> offlineLinks)
      Add Standard Doclet Options.
      private void addTaglets​(java.util.List<java.lang.String> arguments)
      Add taglets parameter to arguments.
      private void addTagletsFromTagletArtifacts​(java.util.List<java.lang.String> arguments)
      Auto-detect taglets class name from tagletArtifacts and add them to arguments.
      private void addTags​(java.util.List<java.lang.String> arguments)
      Add tags parameter to arguments.
      protected JavadocOptions buildJavadocOptions()
      Generate a javadoc-options XML file, for either bundling with a javadoc-resources artifact OR supplying to a distro module in a includeDependencySources configuration, so the javadoc options from this execution can be reconstructed and merged in the distro build.
      protected boolean canGenerateReport​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> files)
      Method that indicates whether the javadoc can be generated or not.
      private static java.lang.String cleanUrl​(java.lang.String url)  
      protected <T> java.util.Collection<T> collect​(java.util.Collection<java.util.Collection<T>> sourcePaths)  
      private java.util.Set<BootclasspathArtifact> collectBootClasspathArtifacts()  
      private java.util.Set<DocletArtifact> collectDocletArtifacts()  
      private java.util.Set<Group> collectGroups()  
      private java.util.Set<java.lang.String> collectLinks()  
      private java.util.Set<OfflineLink> collectOfflineLinks()  
      private java.util.Set<ResourcesArtifact> collectResourcesArtifacts()  
      private java.util.Set<TagletArtifact> collectTagletArtifacts()  
      private java.util.Set<Taglet> collectTaglets()  
      private java.util.Set<Tag> collectTags()  
      protected SourceResolverConfig configureDependencySourceResolution​(SourceResolverConfig config)
      Override this method to customize the configuration for resolving dependency sources.
      private void copyAdditionalJavadocResources​(java.io.File anOutputDirectory)
      Method that copy additional Javadoc resources from given artifacts.
      private void copyAllResources​(java.io.File javadocOutputDirectory)
      Coppy all resources to the output directory
      private void copyDefaultStylesheet​(java.io.File anOutputDirectory)
      Copies the DEFAULT_CSS_NAME css file from the current class loader to the outputDirectory only if stylesheetfile is empty and stylesheet is equals to maven.
      private void copyJavadocResources​(java.io.File anOutputDirectory)
      Method that copy all doc-files directories from javadocDirectory of the current project or of the projects in the reactor to the outputDirectory.
      private org.apache.maven.artifact.Artifact createAndResolveArtifact​(JavadocPathArtifact javadocArtifact)
      creates an Artifact representing the configured JavadocPathArtifact and resolves it.
      private org.apache.maven.shared.artifact.filter.resolve.TransformableFilter createDependencyArtifactFilter()
      Returns a ArtifactFilter that only includes direct dependencies of this project (verified via groupId and artifactId).
      (package private) abstract void doExecute()  
      private void doExecuteJavadocCommandLine​(org.codehaus.plexus.util.cli.Commandline cmd, java.io.File javadocOutputDirectory)
      Execute the Javadoc command line
      void execute()  
      private void executeJavadocCommandLine​(org.codehaus.plexus.util.cli.Commandline cmd, java.io.File javadocOutputDirectory)
      Execute the Javadoc command line
      protected void executeReport​(java.util.Locale unusedLocale)
      The package documentation details the Javadoc Options used by this Plugin.
      protected void failOnError​(java.lang.String prefix, java.lang.Exception e)  
      private java.io.File findMainDescriptor​(java.util.Collection<java.nio.file.Path> roots)  
      private int fixFrameInjectionBug​(java.io.File javadocOutputDirectory, java.lang.String outputEncoding)
      Patches the given Javadoc output directory to work around CVE-2013-1571 (see http://www.kb.cert.org/vuls/id/225657).
      private java.util.Set<java.lang.String> followLinks​(java.util.Set<java.lang.String> links)
      Follows all of the given links, and returns their last redirect locations.
      private java.lang.String getAccessLevel()
      Method to get the access level for the classes and members to be shown in the generated javadoc.
      private java.util.List<org.apache.maven.project.MavenProject> getAggregatedProjects()  
      protected java.io.File getArtifactFile​(org.apache.maven.project.MavenProject project)  
      private java.util.List<java.lang.String> getArtifactsAbsolutePath​(JavadocPathArtifact javadocArtifact)
      Return the Javadoc artifact path and its transitive dependencies path from the local repository
      protected java.lang.String getAttachmentClassifier()
      Override this if you need to provide a bundle attachment classifier, as in the case of test javadocs.
      private java.lang.String getBootclassPath()
      Method to get the path of the bootclass artifacts used in the -bootclasspath option.
      private java.lang.String getBottomText()
      Method that sets the bottom text that will be displayed on the bottom of the javadocs.
      private java.lang.String getCharset()  
      protected OfflineLink getDefaultJavadocApiLink()  
      private java.util.List<java.lang.String> getDependenciesLinks()
      Using Maven, a Javadoc link is given by ${project.url}/apidocs.
      protected org.apache.maven.shared.artifact.filter.resolve.ScopeFilter getDependencyScopeFilter()  
      protected java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> getDependencySourcePaths()
      Resolve dependency sources so they can be included directly in the javadoc process.
      private SourceResolverConfig getDependencySourceResolverConfig()
      Construct a SourceResolverConfig for resolving dependency sources and resources in a consistent way, so it can be reused for both source and resource resolution.
      private java.lang.String getDocencoding()  
      private java.lang.String getDocletPath()
      Method to get the path of the doclet artifacts used in the -docletpath option.
      protected java.lang.String getDoclint()  
      protected java.lang.String getDoctitle()  
      private java.lang.String getEncoding()  
      private java.util.Collection<java.lang.String> getExcludedPackages()
      Method to get the packages specified in the excludePackageNames parameter.
      private java.lang.String getExcludedPackages​(java.util.Collection<java.nio.file.Path> sourcePaths)
      Method to get the excluded source files from the javadoc and create the argument string that will be included in the javadoc commandline execution.
      protected java.util.List<java.lang.String> getExecutionProjectSourceRoots​(org.apache.maven.project.MavenProject p)  
      protected java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> getFiles​(java.util.Collection<java.nio.file.Path> sourcePaths)
      Method to get the files on the specified source paths
      private java.util.List<java.lang.String> getFilesWithUnnamedPackages​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)  
      private java.lang.String getFullJavadocGoal()
      Get the full javadoc goal.
      private java.lang.String getHelpFile​(java.io.File javadocOutputDirectory)
      Method to get the help file to be used by the Javadoc Tool.
      protected java.io.File getJavadocDirectory()  
      private java.lang.String getJavadocExecutable()
      Get the path of the Javadoc tool executable depending the user entry or try to find it depending the OS or the java.home system property or the JAVA_HOME environment variable.
      private static java.lang.String getJavadocLink​(org.apache.maven.project.MavenProject p)  
      protected java.io.File getJavadocOptionsFile()
      Construct the output file for the generated javadoc-options XML file, after creating the javadocOptionsDir if necessary.
      private java.util.Set<OfflineLink> getLinkofflines()  
      private java.util.List<OfflineLink> getModulesLinks()
      Using Maven, a Javadoc link is given by ${project.url}/apidocs.
      private java.util.List<java.lang.String> getModuleSourcePathFiles​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)  
      protected java.lang.String getOutputDirectory()  
      protected java.io.File getOverview()  
      private java.util.List<java.lang.String> getPackageNames​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)  
      private java.util.List<java.lang.String> getPackageNamesRespectingJavaModules​(java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> allSourcePaths)  
      private java.util.Collection<java.io.File> getPathElements()
      Method that gets the classpath and modulepath elements that will be specified in the javadoc -classpath and --module-path parameter.
      private static org.apache.maven.model.Plugin getPlugin​(org.apache.maven.project.MavenProject p, java.lang.String pluginId)  
      private static java.lang.String getPluginParameter​(org.apache.maven.project.MavenProject p, java.lang.String pluginId, java.lang.String param)  
      protected org.apache.maven.project.MavenProject getProject()  
      private org.apache.maven.project.ProjectBuildingRequest getProjectBuildingRequest​(org.apache.maven.project.MavenProject currentProject)  
      protected java.util.List<java.io.File> getProjectBuildOutputDirs​(org.apache.maven.project.MavenProject p)  
      protected java.util.List<java.lang.String> getProjectSourceRoots​(org.apache.maven.project.MavenProject p)  
      private org.codehaus.plexus.languages.java.jpms.ResolvePathResult getResolvePathResult​(java.io.File artifactFile)  
      private java.lang.String getResource​(java.io.File outputFile, java.lang.String inputResourceName)  
      private java.net.URL getResource​(java.util.List<java.lang.String> classPath, java.lang.String resource)  
      private java.lang.String getSourcePath​(java.util.Collection<java.nio.file.Path> sourcePaths)
      Method to format the specified source paths that will be accepted by the javadoc tool.
      protected java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> getSourcePaths()
      Method to get the source paths per reactorProject.
      private java.util.List<java.lang.String> getSpecialFiles​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)
      Either return only the module descriptor or all sourcefiles per sourcepath
      private java.lang.String getStylesheetFile​(java.io.File javadocOutputDirectory)
      Method to get the stylesheet path file to be used by the Javadoc Tool.
      private java.lang.String getTagletPath()
      Method to get the path of the taglet artifacts used in the -tagletpath option.
      protected org.apache.maven.toolchain.Toolchain getToolchain()  
      protected java.lang.String getWindowtitle()  
      protected boolean isAggregator()
      Indicates whether this goal is flagged with @aggregator.
      private boolean isDocletArtifactEmpty​(DocletArtifact aDocletArtifact)
      Verify if a doclet artifact is empty or not
      private boolean isJavaDocVersionAtLeast​(org.codehaus.plexus.languages.java.version.JavaVersion requiredVersion)
      Is the Javadoc version at least the requested version.
      private boolean isJavadocVMInitError​(java.lang.String output)
      Check if the Javadoc JVM is correctly started or not.
      protected boolean isSkippedJavadoc​(org.apache.maven.project.MavenProject mavenProject)  
      protected boolean isSkippedModule​(org.apache.maven.project.MavenProject mavenProject)  
      protected boolean isTest()
      Indicates whether this goal generates documentation for the Java Test code.
      private boolean isUpToDate​(org.codehaus.plexus.util.cli.Commandline cmd)
      Check if the javadoc is uptodate or not
      protected boolean isValidJavadocLink​(java.lang.String link, boolean detecting)  
      protected void logError​(java.lang.String message, java.lang.Throwable t)
      Logs an error with throwable content only if in debug.
      private java.util.Set<org.apache.maven.project.MavenProject> modulesForAggregatedProject​(org.apache.maven.project.MavenProject aggregatedProject, java.util.Map<java.nio.file.Path,​org.apache.maven.project.MavenProject> reactorProjectsMap)
      Recursively add the modules of the aggregatedProject to the set of aggregatedModules.
      private void populateCompileArtifactMap​(java.util.Map<java.lang.String,​org.apache.maven.artifact.Artifact> compileArtifactMap, java.util.Collection<org.apache.maven.artifact.Artifact> artifactList)
      Method to put the artifacts in the hashmap.
      org.apache.maven.artifact.Artifact resolveDependency​(org.apache.maven.model.Dependency dependency)  
      private void resolveDependencyBundles()  
      private void setFJavadocVersion​(java.io.File jExecutable)
      Set a new value for javadocRuntimeVersion
      private static java.util.List<java.lang.String> trimValues​(java.util.List<java.lang.String> items)  
      private void validateJavadocOptions()
      Checks for the validity of the Javadoc options used by the user.
      private void validateStandardDocletOptions()
      Checks for the validity of the Standard Doclet options.
      protected void verifyRemovedParameter​(java.lang.String paramName)  
      private void verifyReplacedParameter​(java.lang.String oldParamName, java.lang.String newParamNew)  
      private void writeDebugJavadocScript​(java.lang.String cmdLine, java.io.File javadocOutputDirectory)
      Write a debug javadoc script in case of command line error or in debug mode.
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER

        public static final java.lang.String JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
        Classifier used in the name of the javadoc-options XML file, and in the resources bundle artifact that gets attached to the project. This one is used for non-test javadocs.
        Since:
        2.7
        See Also:
        TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, Constant Field Values
      • TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER

        public static final java.lang.String TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
        Classifier used in the name of the javadoc-options XML file, and in the resources bundle artifact that gets attached to the project. This one is used for test-javadocs.
        Since:
        2.7
        See Also:
        JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, Constant Field Values
      • DEBUG_JAVADOC_SCRIPT_NAME

        protected static final java.lang.String DEBUG_JAVADOC_SCRIPT_NAME
        The Javadoc script file name when debug parameter is on, i.e. javadoc.bat or javadoc.sh
      • OPTIONS_FILE_NAME

        protected static final java.lang.String OPTIONS_FILE_NAME
        The options file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
        See Also:
        Constant Field Values
      • PACKAGES_FILE_NAME

        protected static final java.lang.String PACKAGES_FILE_NAME
        The packages file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
        See Also:
        Constant Field Values
      • ARGFILE_FILE_NAME

        protected static final java.lang.String ARGFILE_FILE_NAME
        The argfile file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
        See Also:
        Constant Field Values
      • FILES_FILE_NAME

        protected static final java.lang.String FILES_FILE_NAME
        The files file name in the output directory when calling: javadoc.exe(or .sh) @options @packages | @argfile | @files
        See Also:
        Constant Field Values
      • RESOURCE_DIR

        private static final java.lang.String RESOURCE_DIR
        The current class directory
      • DEFAULT_CSS_NAME

        private static final java.lang.String DEFAULT_CSS_NAME
        Default css file name
        See Also:
        Constant Field Values
      • RESOURCE_CSS_DIR

        private static final java.lang.String RESOURCE_CSS_DIR
        Default location for css
      • SINCE_JAVADOC_1_4

        private static final org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_4
        For Javadoc options appears since Java 1.4. See What's New in Javadoc 1.4
        Since:
        2.1
      • SINCE_JAVADOC_1_4_2

        private static final org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_4_2
        For Javadoc options appears since Java 1.4.2. See What's New in Javadoc 1.4.2
        Since:
        2.1
      • SINCE_JAVADOC_1_5

        private static final org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_5
        For Javadoc options appears since Java 5.0. See What's New in Javadoc 5.0
        Since:
        2.1
      • SINCE_JAVADOC_1_6

        private static final org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_6
        For Javadoc options appears since Java 6.0. See Javadoc Technology
        Since:
        2.4
      • SINCE_JAVADOC_1_8

        private static final org.codehaus.plexus.languages.java.version.JavaVersion SINCE_JAVADOC_1_8
        For Javadoc options appears since Java 8.0. See Javadoc Technology
        Since:
        3.0.0
      • JAVA_VERSION

        private static final org.codehaus.plexus.languages.java.version.JavaVersion JAVA_VERSION
      • archiverManager

        @Component
        private org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
        Archiver manager
        Since:
        2.5
      • artifactResolver

        @Component
        private org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver
      • artifactHandlerManager

        @Component
        private org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager
      • dependencyResolver

        @Component
        private org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver dependencyResolver
      • mavenProjectBuilder

        @Component
        private org.apache.maven.project.ProjectBuilder mavenProjectBuilder
        Project builder
        Since:
        3.0
      • toolchainManager

        @Component
        private org.apache.maven.toolchain.ToolchainManager toolchainManager
      • locationManager

        final org.codehaus.plexus.languages.java.jpms.LocationManager locationManager
      • session

        @Parameter(defaultValue="${session}",
                   readonly=true,
                   required=true)
        protected org.apache.maven.execution.MavenSession session
        The current build session instance. This is used for toolchain manager API calls.
      • settings

        @Parameter(defaultValue="${settings}",
                   readonly=true,
                   required=true)
        private org.apache.maven.settings.Settings settings
        The Maven Settings.
        Since:
        2.3
      • project

        @Parameter(defaultValue="${project}",
                   readonly=true,
                   required=true)
        protected org.apache.maven.project.MavenProject project
        The Maven Project Object
      • mojo

        @Parameter(defaultValue="${mojoExecution}",
                   readonly=true)
        private org.apache.maven.plugin.MojoExecution mojo
      • isOffline

        @Parameter(defaultValue="${settings.offline}",
                   required=true,
                   readonly=true)
        private boolean isOffline
        Specify if the Javadoc should operate in offline mode.
      • javadocDirectory

        @Parameter(defaultValue="${basedir}/src/main/javadoc")
        private java.io.File javadocDirectory
        Specifies the Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).
        Could be used in addition of docfilessubdirs parameter.
        See docfilessubdirs.
        Since:
        2.1
        See Also:
        docfilessubdirs
      • additionalOptions

        @Parameter
        private java.lang.String[] additionalOptions
        Set an additional option(s) on the command line. All input will be passed as-is to the @options file. You must take care of quoting and escaping. Useful for a custom doclet.
        Since:
        3.0.0
      • additionalJOption

        @Parameter(property="additionalJOption")
        private java.lang.String additionalJOption
        Set an additional Javadoc option(s) (i.e. JVM options) on the command line. Example:
         <additionalJOption>-J-Xss128m</additionalJOption>
         
        See Jflag.
        See vmoptions.
        See Networking Properties.
        Since:
        2.3
      • additionalJOptions

        @Parameter
        private java.lang.String[] additionalJOptions
        Set additional JVM options for the execution of the javadoc command via the '-J' option to javadoc. Example:
             <additionalJOptions>
                 <additionalJOption>-J-Xmx1g </additionalJOption>
             </additionalJOptions>
         
        Since:
        2.9
      • resourcesArtifacts

        @Parameter(property="resourcesArtifacts")
        private ResourcesArtifact[] resourcesArtifacts
        A list of artifacts containing resources which should be copied into the Javadoc output directory (like stylesheets, icons, etc.).
        Example:
         <resourcesArtifacts>
           <resourcesArtifact>
             <groupId>external.group.id</groupId>
             <artifactId>external-resources</artifactId>
             <version>1.0</version>
           </resourcesArtifact>
         </resourcesArtifacts>
         

        See Javadoc.
        Since:
        2.5
      • localRepository

        @Parameter(property="localRepository")
        private org.apache.maven.artifact.repository.ArtifactRepository localRepository
        The local repository where the artifacts are located.
      • reactorProjects

        @Parameter(property="reactorProjects",
                   readonly=true)
        private java.util.List<org.apache.maven.project.MavenProject> reactorProjects
        The projects in the reactor for aggregation report.
      • debug

        @Parameter(property="debug",
                   defaultValue="false")
        private boolean debug
        Set this to true to debug the Javadoc plugin. With this, javadoc.bat(or.sh), options, @packages or argfile files are provided in the output directory.
        Since:
        2.1
      • javadocExecutable

        @Parameter(property="javadocExecutable")
        private java.lang.String javadocExecutable
        Sets the absolute path of the Javadoc Tool executable to use. Since version 2.5, a mere directory specification is sufficient to have the plugin use "javadoc" or "javadoc.exe" respectively from this directory.
        Since:
        2.3
      • javadocVersion

        @Parameter(property="javadocVersion")
        private java.lang.String javadocVersion
        Version of the Javadoc Tool executable to use, ex. "1.3", "1.5".
        Since:
        2.3
      • javadocRuntimeVersion

        private org.codehaus.plexus.languages.java.version.JavaVersion javadocRuntimeVersion
        Version of the Javadoc Tool executable to use.
      • skip

        @Parameter(property="maven.javadoc.skip",
                   defaultValue="false")
        protected boolean skip
        Specifies whether the Javadoc generation should be skipped.
        Since:
        2.5
      • failOnError

        @Parameter(property="maven.javadoc.failOnError",
                   defaultValue="true")
        protected boolean failOnError
        Specifies if the build will fail if there are errors during javadoc execution or not.
        Since:
        2.5
      • failOnWarnings

        @Parameter(property="maven.javadoc.failOnWarnings",
                   defaultValue="false")
        protected boolean failOnWarnings
        Specifies if the build will fail if there are warning during javadoc execution or not.
        Since:
        3.0.1
      • useStandardDocletOptions

        @Parameter(property="useStandardDocletOptions",
                   defaultValue="true")
        protected boolean useStandardDocletOptions
        Specifies to use the options provided by the Standard Doclet for a custom doclet.
        Example:
         <docletArtifacts>
           <docletArtifact>
             <groupId>com.sun.tools.doclets</groupId>
             <artifactId>doccheck</artifactId>
             <version>1.2b2</version>
           </docletArtifact>
         </docletArtifacts>
         <useStandardDocletOptions>true</useStandardDocletOptions>
         
        Since:
        2.5
      • detectLinks

        @Parameter(property="detectLinks",
                   defaultValue="false")
        private boolean detectLinks
        Detect the Javadoc links for all dependencies defined in the project. The detection is based on the default Maven conventions, i.e.: ${project.url}/apidocs.
        For instance, if the project has a dependency to Apache Commons Lang i.e.:
         <dependency>
           <groupId>commons-lang</groupId>
           <artifactId>commons-lang</artifactId>
         </dependency>
         
        The added Javadoc -link parameter will be http://commons.apache.org/lang/apidocs.
        Since:
        2.6
        See Also:
        links
      • detectOfflineLinks

        @Parameter(property="detectOfflineLinks",
                   defaultValue="true")
        private boolean detectOfflineLinks
        Detect the links for all modules defined in the project.
        If reactorProjects is defined in a non-aggregator way, it generates default offline links between modules based on the defined project's urls. For instance, if a parent project has two projects module1 and module2, the -linkoffline will be:
        The added Javadoc -linkoffline parameter for module1 will be /absolute/path/to/module2/target/site/apidocs
        The added Javadoc -linkoffline parameter for module2 will be /absolute/path/to/module1/target/site/apidocs
        Since:
        2.6
        See Also:
        offlineLinks
      • detectJavaApiLink

        @Parameter(property="detectJavaApiLink",
                   defaultValue="true")
        private boolean detectJavaApiLink
        Detect the Java API link for the current build, i.e. http://docs.oracle.com/javase/1.4.2/docs/api/ for Java source 1.4.
        By default, the goal detects the Javadoc API link depending the value of the source parameter in the org.apache.maven.plugins:maven-compiler-plugin (defined in ${project.build.plugins} or in ${project.build.pluginManagement}), or try to compute it from the javadocExecutable version.
        See Javadoc for the default values.
        Since:
        2.6
        See Also:
        links, javaApiLinks, #DEFAULT_JAVA_API_LINKS
      • javaApiLinks

        @Parameter(property="javaApiLinks")
        private java.util.Properties javaApiLinks
        Use this parameter only if if you want to override the default URLs. The key should match api_x, where x matches the Java version. For example:
        api_1.5
        https://docs.oracle.com/javase/1.5.0/docs/api/
        api_1.8
        https://docs.oracle.com/javase/8/docs/api/
        api_9
        https://docs.oracle.com/javase/9/docs/api/
        Since:
        2.6
      • validateLinks

        @Parameter(property="validateLinks",
                   defaultValue="false")
        private boolean validateLinks
        Flag controlling content validation of package-list resources. If set, the content of package-list resources will be validated.
        Since:
        2.8
      • bootclasspath

        @Parameter(property="bootclasspath")
        private java.lang.String bootclasspath
        Specifies the paths where the boot classes reside. The bootclasspath can contain multiple paths by separating them with a colon (:) or a semi-colon (;).
        See bootclasspath.
        Since:
        2.5
      • bootclasspathArtifacts

        @Parameter(property="bootclasspathArtifacts")
        private BootclasspathArtifact[] bootclasspathArtifacts
        Specifies the artifacts where the boot classes reside.
        See bootclasspath.
        Example:
         <bootclasspathArtifacts>
           <bootclasspathArtifact>
             <groupId>my-groupId</groupId>
             <artifactId>my-artifactId</artifactId>
             <version>my-version</version>
           </bootclasspathArtifact>
         </bootclasspathArtifacts>
         

        See Javadoc.
        Since:
        2.5
      • breakiterator

        @Parameter(property="breakiterator",
                   defaultValue="false")
        private boolean breakiterator
        Uses the sentence break iterator to determine the end of the first sentence.
        See breakiterator.
        Since Java 1.4.
      • doclet

        @Parameter(property="doclet")
        private java.lang.String doclet
        Specifies the class file that starts the doclet used in generating the documentation.
        See doclet.
      • docletArtifact

        @Parameter(property="docletArtifact")
        private DocletArtifact docletArtifact
        Specifies the artifact containing the doclet starting class file (specified with the -doclet option).
        See docletpath.
        Example:
         <docletArtifact>
           <groupId>com.sun.tools.doclets</groupId>
           <artifactId>doccheck</artifactId>
           <version>1.2b2</version>
         </docletArtifact>
         

        See Javadoc.
      • docletArtifacts

        @Parameter(property="docletArtifacts")
        private DocletArtifact[] docletArtifacts
        Specifies multiple artifacts containing the path for the doclet starting class file (specified with the -doclet option).
        See docletpath.
        Example:
         <docletArtifacts>
           <docletArtifact>
             <groupId>com.sun.tools.doclets</groupId>
             <artifactId>doccheck</artifactId>
             <version>1.2b2</version>
           </docletArtifact>
         </docletArtifacts>
         

        See Javadoc.
        Since:
        2.1
      • docletPath

        @Parameter(property="docletPath")
        private java.lang.String docletPath
        Specifies the path to the doclet starting class file (specified with the -doclet option) and any jar files it depends on. The docletPath can contain multiple paths by separating them with a colon (:) or a semi-colon (;).
        See docletpath.
      • encoding

        @Parameter(property="encoding",
                   defaultValue="${project.build.sourceEncoding}")
        private java.lang.String encoding
        Specifies the encoding name of the source files. If not specificed, the encoding value will be the value of the file.encoding system property.
        See encoding.
        Note: In 2.4, the default value was locked to ISO-8859-1 to ensure reproducing build, but this was reverted in 2.5.
      • excludePackageNames

        @Parameter(property="excludePackageNames")
        private java.lang.String excludePackageNames
        Unconditionally excludes the specified packages and their subpackages from the list formed by -subpackages. Multiple packages can be separated by commas (,), colons (:) or semicolons (;).

        Wildcards work as followed:

        • a wildcard at the beginning should match 1 or more folders
        • any other wildcard must match exactly one folder

        Example:

         <excludePackageNames>*.internal:org.acme.exclude1.*:org.acme.exclude2</excludePackageNames>
         

        See exclude.
        Since Java 1.4.

      • extdirs

        @Parameter(property="extdirs")
        private java.lang.String extdirs
        Specifies the directories where extension classes reside. Separate directories in extdirs with a colon (:) or a semi-colon (;).
        See extdirs.
      • locale

        @Parameter(property="locale")
        private java.lang.String locale
        Specifies the locale that javadoc uses when generating documentation.
        See locale.
      • maxmemory

        @Parameter(property="maxmemory")
        private java.lang.String maxmemory
        Specifies the maximum Java heap size to be used when launching the Javadoc tool. JVMs refer to this property as the -Xmx parameter. Example: '512' or '512m'. The memory unit depends on the JVM used. The units supported could be: k, kb, m, mb, g, gb, t, tb. If no unit specified, the default unit is m.
      • minmemory

        @Parameter(property="minmemory")
        private java.lang.String minmemory
        Specifies the minimum Java heap size to be used when launching the Javadoc tool. JVMs refer to this property as the -Xms parameter. Example: '512' or '512m'. The memory unit depends on the JVM used. The units supported could be: k, kb, m, mb, g, gb, t, tb. If no unit specified, the default unit is m.
      • old

        @Parameter(property="old",
                   defaultValue="false")
        private boolean old
        This option creates documentation with the appearance and functionality of documentation generated by Javadoc 1.1.
        See 1.1.
      • overview

        @Parameter(property="overview",
                   defaultValue="${basedir}/src/main/javadoc/overview.html")
        private java.io.File overview
        Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by path/filename and place it on the Overview page (overview-summary.html).
        Note: could be in conflict with <nooverview/>.
        See overview.
      • quiet

        @Parameter(property="quiet",
                   defaultValue="false")
        private boolean quiet
        Shuts off non-error and non-warning messages, leaving only the warnings and errors appear, making them easier to view.
        Note: was a standard doclet in Java 1.4.2 (refer to bug ID 4714350).
        See quiet.
        Since Java 5.0.
      • show

        @Parameter(property="show",
                   defaultValue="protected")
        private java.lang.String show
        Specifies the access level for classes and members to show in the Javadocs. Possible values are:
        • public (shows only public classes and members)
        • protected (shows only public and protected classes and members)
        • package (shows all classes and members not marked private)
        • private (shows all classes and members)

      • source

        @Parameter(property="source")
        private java.lang.String source
        Necessary to enable javadoc to handle assertions introduced in J2SE v 1.4 source code or generics introduced in J2SE v5.
        See source.
        Since Java 1.4.
      • release

        @Parameter(defaultValue="${maven.compiler.release}")
        private java.lang.String release
        Provide source compatibility with specified release
        Since:
        JDK 9, 3.1.0
      • sourcepath

        @Parameter(property="sourcepath")
        private java.lang.String sourcepath
        Specifies the source paths where the subpackages are located. The sourcepath can contain multiple paths by separating them with a colon (:) or a semi-colon (;).
        See sourcepath.
      • subpackages

        @Parameter(property="subpackages")
        private java.lang.String subpackages
        Specifies the package directory where javadoc will be executed. Multiple packages can be separated by colons (:).
        See subpackages.
        Since Java 1.4.
      • verbose

        @Parameter(property="verbose",
                   defaultValue="false")
        private boolean verbose
        Provides more detailed messages while javadoc is running.
        See verbose.
      • author

        @Parameter(property="author",
                   defaultValue="true")
        private boolean author
        Specifies whether or not the author text is included in the generated Javadocs.
        See author.
      • bottom

        @Parameter(property="bottom",
                   defaultValue="Copyright &#169; {inceptionYear}&#x2013;{currentYear} {organizationName}. All rights reserved.")
        private 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>]]>
        See bottom.
      • charset

        @Parameter(property="charset")
        private java.lang.String charset
        Specifies the HTML character set for this document. If not specificed, the charset value will be the value of the docencoding parameter.
        See charset.
      • docencoding

        @Parameter(property="docencoding",
                   defaultValue="${project.reporting.outputEncoding}")
        private java.lang.String docencoding
        Specifies the encoding of the generated HTML files. If not specificed, the docencoding value will be UTF-8.
        See docencoding.
      • docfilessubdirs

        @Parameter(property="docfilessubdirs",
                   defaultValue="false")
        private boolean docfilessubdirs
        Enables deep copying of the **/doc-files directories and the specifc resources directory from the javadocDirectory directory (for instance, src/main/javadoc/com/mycompany/myapp/doc-files and src/main/javadoc/resources).
        See docfilessubdirs.
        Since Java 1.4.
        See javadocDirectory.
        See Also:
        excludedocfilessubdir, javadocDirectory
      • doclint

        @Parameter(property="doclint")
        private java.lang.String doclint
        Specifies specific checks to be performed on Javadoc comments.
        See doclint.
        Since:
        3.0.0
      • doctitle

        @Parameter(property="doctitle",
                   defaultValue="${project.name} ${project.version} API")
        private java.lang.String doctitle
        Specifies the title to be placed near the top of the overview summary file.
        See doctitle.
      • excludedocfilessubdir

        @Parameter(property="excludedocfilessubdir")
        private java.lang.String excludedocfilessubdir
        Excludes any "doc-files" subdirectories with the given names. Multiple patterns can be excluded by separating them with colons (:).
        See excludedocfilessubdir.
        Since Java 1.4.
        See Also:
        docfilessubdirs
      • footer

        @Parameter(property="footer")
        private java.lang.String footer
        Specifies the footer text to be placed at the bottom of each output file.
        See footer.
      • groups

        @Parameter
        private Group[] groups
        Separates packages on the overview page into whatever groups you specify, one group per table. The packages pattern can be any package name, or can be the start of any package name followed by an asterisk (*) meaning "match any characters". Multiple patterns can be included in a group by separating them with colons (:).
        Example:
         <groups>
           <group>
             <title>Core Packages</title>
             <!-- To includes java.lang, java.lang.ref,
             java.lang.reflect and only java.util
             (i.e. not java.util.jar) -->
             <packages>java.lang*:java.util</packages>
           </group>
           <group>
             <title>Extension Packages</title>
              <!-- To include javax.accessibility,
             javax.crypto, ... (among others) -->
             <packages>javax.*</packages>
           </group>
         </groups>
         
        Note: using java.lang.* for packages would omit the java.lang package but using java.lang* will include it.
        See group.
        See Javadoc.
      • header

        @Parameter(property="header")
        private java.lang.String header
        Specifies the header text to be placed at the top of each output file.
        See header.
      • helpfile

        @Parameter(property="helpfile")
        private java.lang.String helpfile
        Specifies the path of an alternate help file path\filename that the HELP link in the top and bottom navigation bars link to.
        Note: could be in conflict with <nohelp/>.
        The helpfile could be an absolute File path.
        Since 2.6, it could be also be a path from a resource in the current project source directories (i.e. src/main/java, src/main/resources or src/main/javadoc) or from a resource in the Javadoc plugin dependencies, for instance:
         <helpfile>path/to/your/resource/yourhelp-doc.html</helpfile>
         
        Where path/to/your/resource/yourhelp-doc.html could be in src/main/javadoc.
         <build>
           <plugins>
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <configuration>
                 <helpfile>path/to/your/resource/yourhelp-doc.html</helpfile>
                 ...
               </configuration>
               <dependencies>
                 <dependency>
                   <groupId>groupId</groupId>
                   <artifactId>artifactId</artifactId>
                   <version>version</version>
                 </dependency>
               </dependencies>
             </plugin>
             ...
           <plugins>
         </build>
         
        Where path/to/your/resource/yourhelp-doc.html is defined in the groupId:artifactId:version javadoc plugin dependency.
        See helpfile.
      • keywords

        @Parameter(property="keywords",
                   defaultValue="false")
        private boolean keywords
        Adds HTML meta keyword tags to the generated file for each class.
        See keywords.
        Since Java 1.4.2.
        Since Java 5.0.
        Since:
        2.1
      • links

        @Parameter(property="links")
        protected java.util.ArrayList<java.lang.String> links
        Creates links to existing javadoc-generated documentation of external referenced classes.
        Notes:
        1. only used if isOffline is set to false.
        2. all given links should have a fetchable /package-list file. For instance:
           <links>
             <link>http://docs.oracle.com/javase/1.4.2/docs/api</link>
           <links>
           
          will be used because http://docs.oracle.com/javase/1.4.2/docs/api/package-list exists.
        3. if detectLinks is defined, the links between the project dependencies are automatically added.
        4. if detectJavaApiLink is defined, a Java API link, based on the Java version of the project's sources, will be added automatically.
        See link.
        See Also:
        detectLinks, detectJavaApiLink
      • linksource

        @Parameter(property="linksource",
                   defaultValue="false")
        private boolean linksource
        Creates an HTML version of each source file (with line numbers) and adds links to them from the standard HTML documentation.
        See linksource.
        Since Java 1.4.
      • nocomment

        @Parameter(property="nocomment",
                   defaultValue="false")
        private boolean nocomment
        Suppress the entire comment body, including the main description and all tags, generating only declarations.
        See nocomment.
        Since Java 1.4.
      • nodeprecated

        @Parameter(property="nodeprecated",
                   defaultValue="false")
        private boolean nodeprecated
        Prevents the generation of any deprecated API at all in the documentation.
        See nodeprecated.
      • nodeprecatedlist

        @Parameter(property="nodeprecatedlist",
                   defaultValue="false")
        private boolean nodeprecatedlist
        Prevents the generation of the file containing the list of deprecated APIs (deprecated-list.html) and the link in the navigation bar to that page.
        See nodeprecatedlist.
      • nohelp

        @Parameter(property="nohelp",
                   defaultValue="false")
        private boolean nohelp
        Omits the HELP link in the navigation bars at the top and bottom of each page of output.
        Note: could be in conflict with <helpfile/>.
        See nohelp.
      • noindex

        @Parameter(property="noindex",
                   defaultValue="false")
        private boolean noindex
        Omits the index from the generated docs.
        Note: could be in conflict with <splitindex/>.
        See noindex.
      • nonavbar

        @Parameter(property="nonavbar",
                   defaultValue="false")
        private boolean nonavbar
        Omits the navigation bar from the generated docs.
        See nonavbar.
      • nooverview

        @Parameter(property="nooverview",
                   defaultValue="false")
        private boolean nooverview
        Omits the entire overview page from the generated docs.
        Note: could be in conflict with <overview/>.
        Standard Doclet undocumented option.
        Since:
        2.4
      • noqualifier

        @Parameter(property="noqualifier")
        private java.lang.String noqualifier
        Omits qualifying package name from ahead of class names in output. Example:
         <noqualifier>all</noqualifier>
         or
         <noqualifier>packagename1:packagename2</noqualifier>
         
        See noqualifier.
        Since Java 1.4.
      • nosince

        @Parameter(property="nosince",
                   defaultValue="false")
        private boolean nosince
        Omits from the generated docs the "Since" sections associated with the since tags.
        See nosince.
      • notimestamp

        @Parameter(property="notimestamp",
                   defaultValue="false")
        private boolean notimestamp
        Suppresses the timestamp, which is hidden in an HTML comment in the generated HTML near the top of each page.
        See notimestamp.
        Since Java 5.0.
        Since:
        2.1
      • notree

        @Parameter(property="notree",
                   defaultValue="false")
        private boolean notree
        Omits the class/interface hierarchy pages from the generated docs.
        See Also:
        notree option
      • offlineLinks

        @Parameter(property="offlineLinks")
        private OfflineLink[] offlineLinks
        This option is a variation of -link; they both create links to javadoc-generated documentation for external referenced classes.
        See linkoffline.
        Example:
         <offlineLinks>
           <offlineLink>
             <url>http://docs.oracle.com/javase/1.5.0/docs/api/</url>
             <location>../javadoc/jdk-5.0/</location>
           </offlineLink>
         </offlineLinks>
         

        Note: if detectOfflineLinks is defined, the offline links between the project modules are automatically added if the goal is calling in a non-aggregator way.
        See Also:
        Javadoc.
      • outputDirectory

        @Parameter(property="destDir",
                   alias="destDir",
                   defaultValue="${project.build.directory}/apidocs",
                   required=true)
        protected java.io.File outputDirectory
        Specifies the destination directory where javadoc saves the generated HTML files.
        See Also:
        javadoc d
      • packagesheader

        @Parameter(property="packagesheader")
        private java.lang.String packagesheader
        Specify the text for upper left frame.
        Since Java 1.4.2.
        Since:
        2.1
      • serialwarn

        @Parameter(property="serialwarn",
                   defaultValue="false")
        private boolean serialwarn
        Generates compile-time warnings for missing serial tags.
        See Also:
        serialwarn option
      • sourcetab

        @Parameter(property="sourcetab",
                   alias="linksourcetab")
        private int sourcetab
        Specify the number of spaces each tab takes up in the source. If no tab is used in source, the default space is used.
        Note: was linksourcetab in Java 1.4.2 (refer to bug ID 4788919).
        Since 1.4.2.
        Since Java 5.0.
        Since:
        2.1
      • splitindex

        @Parameter(property="splitindex",
                   defaultValue="false")
        private boolean splitindex
        Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non-alphabetical characters.
        Note: could be in conflict with <noindex/>.
        See splitindex.
      • stylesheet

        @Parameter(property="stylesheet",
                   defaultValue="java")
        private java.lang.String stylesheet
        Specifies whether the stylesheet to be used is the maven's javadoc stylesheet or java's default stylesheet when a stylesheetfile parameter is not specified.
        Possible values: maven or java.
      • stylesheetfile

        @Parameter(property="stylesheetfile")
        private java.lang.String stylesheetfile
        Specifies the path of an alternate HTML stylesheet file.
        The stylesheetfile could be an absolute File path.
        Since 2.6, it could be also be a path from a resource in the current project source directories (i.e. src/main/java, src/main/resources or src/main/javadoc) or from a resource in the Javadoc plugin dependencies, for instance:
         <stylesheetfile>path/to/your/resource/yourstylesheet.css</stylesheetfile>
         
        Where path/to/your/resource/yourstylesheet.css could be in src/main/javadoc.
         <build>
           <plugins>
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <configuration>
                 <stylesheetfile>path/to/your/resource/yourstylesheet.css</stylesheetfile>
                 ...
               </configuration>
               <dependencies>
                 <dependency>
                   <groupId>groupId</groupId>
                   <artifactId>artifactId</artifactId>
                   <version>version</version>
                 </dependency>
               </dependencies>
             </plugin>
             ...
           <plugins>
         </build>
         
        Where path/to/your/resource/yourstylesheet.css is defined in the groupId:artifactId:version javadoc plugin dependency.
        See stylesheetfile.
      • taglet

        @Parameter(property="taglet")
        private java.lang.String taglet
        Specifies the class file that starts the taglet used in generating the documentation for that tag.
        See taglet.
        Since Java 1.4.
      • tagletArtifact

        @Parameter(property="tagletArtifact")
        private TagletArtifact tagletArtifact
        Specifies the Taglet artifact containing the taglet class files (.class).
        See tagletpath.
        Example:
         <taglets>
           <taglet>
             <tagletClass>com.sun.tools.doclets.ToDoTaglet</tagletClass>
           </taglet>
           <taglet>
             <tagletClass>package.to.AnotherTagletClass</tagletClass>
           </taglet>
           ...
         </taglets>
         <tagletArtifact>
           <groupId>group-Taglet</groupId>
           <artifactId>artifact-Taglet</artifactId>
           <version>version-Taglet</version>
         </tagletArtifact>
         

        See Javadoc.
        Since:
        2.1
      • tagletArtifacts

        @Parameter(property="tagletArtifacts")
        private TagletArtifact[] tagletArtifacts
        Specifies several Taglet artifacts containing the taglet class files (.class). These taglets class names will be auto-detect and so no need to specify them.
        See taglet.
        See tagletpath.
        Example:
         <tagletArtifacts>
           <tagletArtifact>
             <groupId>group-Taglet</groupId>
             <artifactId>artifact-Taglet</artifactId>
             <version>version-Taglet</version>
           </tagletArtifact>
           ...
         </tagletArtifacts>
         

        See Javadoc.
        Since:
        2.5
      • tagletpath

        @Parameter(property="tagletpath")
        private java.lang.String tagletpath
        Specifies the search paths for finding taglet class files (.class). The tagletpath can contain multiple paths by separating them with a colon (:) or a semi-colon (;).
        See tagletpath.
        Since Java 1.4.
      • taglets

        @Parameter(property="taglets")
        private Taglet[] taglets
        Enables the Javadoc tool to interpret multiple taglets.
        See taglet.
        See tagletpath.
        Example:
         <taglets>
           <taglet>
             <tagletClass>com.sun.tools.doclets.ToDoTaglet</tagletClass>
             <!--<tagletpath>/home/taglets</tagletpath>-->
             <tagletArtifact>
               <groupId>group-Taglet</groupId>
               <artifactId>artifact-Taglet</artifactId>
               <version>version-Taglet</version>
             </tagletArtifact>
           </taglet>
         </taglets>
         

        See Javadoc.
        Since:
        2.1
      • tags

        @Parameter(property="tags")
        private Tag[] tags
        Enables the Javadoc tool to interpret a simple, one-argument custom block tag tagname in doc comments.
        See tag.
        Since Java 1.4.
        Example:
         <tags>
           <tag>
             <name>todo</name>
             <placement>a</placement>
             <head>To Do:</head>
           </tag>
         </tags>
         
        Note: the placement should be a combinaison of Xaoptcmf letters:
        • X (disable tag)
        • a (all)
        • o (overview)
        • p (packages)
        • t (types, that is classes and interfaces)
        • c (constructors)
        • m (methods)
        • f (fields)
        See Javadoc.
      • top

        @Parameter(property="top")
        private java.lang.String top
        Specifies the top text to be placed at the top of each output file.
        See 6227616.
        Since Java 6.0
        Since:
        2.4
      • use

        @Parameter(property="use",
                   defaultValue="true")
        private boolean use
        Includes one "Use" page for each documented class and package.
        See use.
      • version

        @Parameter(property="version",
                   defaultValue="true")
        private boolean version
        Includes the version text in the generated docs.
        See version.
      • windowtitle

        @Parameter(property="windowtitle",
                   defaultValue="${project.name} ${project.version} API")
        private java.lang.String windowtitle
        Specifies the title to be placed in the HTML title tag.
        See windowtitle.
      • includeDependencySources

        @Parameter(defaultValue="false")
        private boolean includeDependencySources
        Whether dependency -sources jars should be resolved and included as source paths for javadoc generation. This is useful when creating javadocs for a distribution project.
        Since:
        2.7
      • sourceDependencyCacheDir

        @Parameter(defaultValue="${project.build.directory}/distro-javadoc-sources")
        private java.io.File sourceDependencyCacheDir
        Directory where unpacked project sources / test-sources should be cached.
        Since:
        2.7
        See Also:
        includeDependencySources
      • includeTransitiveDependencySources

        @Parameter(defaultValue="false")
        @Deprecated
        private boolean includeTransitiveDependencySources
        Deprecated.
        if these sources depend on transitive dependencies, those dependencies should be added to the pom as direct dependencies
        Whether to include transitive dependencies in the list of dependency -sources jars to include in this javadoc run.
        Since:
        2.7
        See Also:
        includeDependencySources
      • dependencySourceIncludes

        @Parameter
        private java.util.List<java.lang.String> dependencySourceIncludes
        List of included dependency-source patterns. Example: org.apache.maven:*
        Since:
        2.7
        See Also:
        includeDependencySources
      • dependencySourceExcludes

        @Parameter
        private java.util.List<java.lang.String> dependencySourceExcludes
        List of excluded dependency-source patterns. Example: org.apache.maven.shared:*
        Since:
        2.7
        See Also:
        includeDependencySources
      • javadocOptionsDir

        @Parameter(defaultValue="${project.build.directory}/javadoc-bundle-options",
                   readonly=true)
        private java.io.File javadocOptionsDir
        Directory into which assembled JavadocOptions instances will be written before they are added to javadoc resources bundles.
        Since:
        2.7
      • dependencyJavadocBundles

        private transient java.util.List<JavadocBundle> dependencyJavadocBundles
        Transient variable to allow lazy-resolution of javadoc bundles from dependencies, so they can be used at various points in the javadoc generation process.
        Since:
        2.7
      • additionalDependencies

        @Parameter
        private java.util.List<AdditionalDependency> additionalDependencies
        Capability to add additional dependencies to the javadoc classpath. Example:
         <additionalDependencies>
           <additionalDependency>
             <groupId>geronimo-spec</groupId>
             <artifactId>geronimo-spec-jta</artifactId>
             <version>1.0.1B-rc4</version>
           </additionalDependency>
         </additionalDependencies>
         
        Since:
        2.8.1
      • sourceFileIncludes

        @Parameter
        private java.util.List<java.lang.String> sourceFileIncludes
        Include filters on the source files. Default is **\/\*.java. These are ignored if you specify subpackages or subpackage excludes.
        Since:
        2.9
      • sourceFileExcludes

        @Parameter
        private java.util.List<java.lang.String> sourceFileExcludes
        exclude filters on the source files. These are ignored if you specify subpackages or subpackage excludes.
        Since:
        2.9
      • applyJavadocSecurityFix

        @Parameter(defaultValue="true",
                   property="maven.javadoc.applyJavadocSecurityFix")
        private boolean applyJavadocSecurityFix
        To apply the security fix on generated javadoc see http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1571
        Since:
        2.9.1
      • jdkToolchain

        @Parameter
        private java.util.Map<java.lang.String,​java.lang.String> jdkToolchain

        Specify the requirements for this jdk toolchain. This overrules the toolchain selected by the maven-toolchain-plugin.

        note: requires at least Maven 3.3.1
        Since:
        3.0.0
      • staleDataPath

        @Parameter(property="staleDataPath",
                   defaultValue="${project.build.directory}/maven-javadoc-plugin-stale-data.txt")
        private java.io.File staleDataPath

        Location of the file used to store the state of the previous javadoc run. This is used to skip the generation if nothing has changed.

        Since:
        3.2.0
      • skippedModules

        @Parameter(property="maven.javadoc.skippedModules")
        private java.lang.String skippedModules

        Comma separated list of modules (artifactId) to not add in aggregated javadoc

        Since:
        3.2.0
    • Constructor Detail

      • AbstractJavadocMojo

        public AbstractJavadocMojo()
    • Method Detail

      • isTest

        protected boolean isTest()
        Indicates whether this goal generates documentation for the Java Test code.
        Returns:
        true if the goal generates Test Javadocs, false otherwise.
      • getOutputDirectory

        protected java.lang.String getOutputDirectory()
        Returns:
        the output directory
      • getProject

        protected org.apache.maven.project.MavenProject getProject()
      • getProjectBuildOutputDirs

        protected java.util.List<java.io.File> getProjectBuildOutputDirs​(org.apache.maven.project.MavenProject p)
        Parameters:
        p - not null maven project
        Returns:
        the list of directories where compiled classes are placed for the given project. These dirs are added in the javadoc classpath.
      • getArtifactFile

        protected java.io.File getArtifactFile​(org.apache.maven.project.MavenProject project)
      • getProjectSourceRoots

        protected java.util.List<java.lang.String> getProjectSourceRoots​(org.apache.maven.project.MavenProject p)
        Parameters:
        p - not null maven project
        Returns:
        the list of source paths for the given project
      • getExecutionProjectSourceRoots

        protected java.util.List<java.lang.String> getExecutionProjectSourceRoots​(org.apache.maven.project.MavenProject p)
        Parameters:
        p - not null maven project
        Returns:
        the list of source paths for the execution project of the given project
      • getJavadocDirectory

        protected java.io.File getJavadocDirectory()
        Returns:
        the current javadoc directory
      • getDoclint

        protected java.lang.String getDoclint()
        Returns:
        the doclint specific checks configuration
      • getDoctitle

        protected java.lang.String getDoctitle()
        Returns:
        the title to be placed near the top of the overview summary file
      • getOverview

        protected java.io.File getOverview()
        Returns:
        the overview documentation file from the user parameter or from the javadocdirectory
      • getWindowtitle

        protected java.lang.String getWindowtitle()
        Returns:
        the title to be placed in the HTML title tag
      • getCharset

        private java.lang.String getCharset()
        Returns:
        the charset attribute or the value of getDocencoding() if null.
      • getDocencoding

        private java.lang.String getDocencoding()
        Returns:
        the docencoding attribute or UTF-8 if null.
      • getEncoding

        private java.lang.String getEncoding()
        Returns:
        the encoding attribute or the value of file.encoding system property if null.
      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • doExecute

        abstract void doExecute()
                         throws org.apache.maven.plugin.MojoExecutionException,
                                org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • verifyRemovedParameter

        protected final void verifyRemovedParameter​(java.lang.String paramName)
      • verifyReplacedParameter

        private void verifyReplacedParameter​(java.lang.String oldParamName,
                                             java.lang.String newParamNew)
      • executeReport

        protected void executeReport​(java.util.Locale unusedLocale)
                              throws org.apache.maven.reporting.MavenReportException
        The package documentation details the Javadoc Options used by this Plugin.
        Parameters:
        unusedLocale - the wanted locale (actually unused).
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
      • collect

        protected final <T> java.util.Collection<T> collect​(java.util.Collection<java.util.Collection<T>> sourcePaths)
      • getFiles

        protected java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> getFiles​(java.util.Collection<java.nio.file.Path> sourcePaths)
                                                                                                   throws org.apache.maven.reporting.MavenReportException
        Method to get the files on the specified source paths
        Parameters:
        sourcePaths - a Collection that contains the paths to the source files
        Returns:
        a List that contains the specific path for every source file
        Throws:
        org.apache.maven.reporting.MavenReportException - MavenReportException issue while generating report
      • getSourcePaths

        protected java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> getSourcePaths()
                                                                                                         throws org.apache.maven.reporting.MavenReportException
        Method to get the source paths per reactorProject. If no source path is specified in the parameter, the compile source roots of the project will be used.
        Returns:
        a Map of the project absolute source paths per projects key (G:A)
        Throws:
        org.apache.maven.reporting.MavenReportException - MavenReportException issue while generating report
        See Also:
        JavadocUtil.pruneDirs(MavenProject, Collection)
      • modulesForAggregatedProject

        private java.util.Set<org.apache.maven.project.MavenProject> modulesForAggregatedProject​(org.apache.maven.project.MavenProject aggregatedProject,
                                                                                                 java.util.Map<java.nio.file.Path,​org.apache.maven.project.MavenProject> reactorProjectsMap)
        Recursively add the modules of the aggregatedProject to the set of aggregatedModules.
        Parameters:
        aggregatedProject - the project being aggregated
        reactorProjectsMap - map of (still) available reactor projects
      • getDependencySourcePaths

        protected final java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> getDependencySourcePaths()
                                                                                                                         throws org.apache.maven.reporting.MavenReportException
        Resolve dependency sources so they can be included directly in the javadoc process. To customize this, override configureDependencySourceResolution(SourceResolverConfig).
        Returns:
        List of source paths.
        Throws:
        org.apache.maven.reporting.MavenReportException - MavenReportException
      • createDependencyArtifactFilter

        private org.apache.maven.shared.artifact.filter.resolve.TransformableFilter createDependencyArtifactFilter()
        Returns a ArtifactFilter that only includes direct dependencies of this project (verified via groupId and artifactId).
        Returns:
      • getDependencySourceResolverConfig

        private SourceResolverConfig getDependencySourceResolverConfig()
        Construct a SourceResolverConfig for resolving dependency sources and resources in a consistent way, so it can be reused for both source and resource resolution.
        Since:
        2.7
      • getProjectBuildingRequest

        private org.apache.maven.project.ProjectBuildingRequest getProjectBuildingRequest​(org.apache.maven.project.MavenProject currentProject)
      • canGenerateReport

        protected boolean canGenerateReport​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> files)
        Method that indicates whether the javadoc can be generated or not. If the project does not contain any source files and no subpackages are specified, the plugin will terminate.
        Parameters:
        files - the project files
        Returns:
        a boolean that indicates whether javadoc report can be generated or not
      • getExcludedPackages

        private java.lang.String getExcludedPackages​(java.util.Collection<java.nio.file.Path> sourcePaths)
                                              throws org.apache.maven.reporting.MavenReportException
        Method to get the excluded source files from the javadoc and create the argument string that will be included in the javadoc commandline execution.
        Parameters:
        sourceFolders - the collection of paths to the source files
        Returns:
        a String that contains the exclude argument that will be used by javadoc
        Throws:
        org.apache.maven.reporting.MavenReportException
      • getSourcePath

        private java.lang.String getSourcePath​(java.util.Collection<java.nio.file.Path> sourcePaths)
        Method to format the specified source paths that will be accepted by the javadoc tool.
        Parameters:
        sourcePaths - the list of paths to the source files that will be included in the javadoc.
        Returns:
        a String that contains the formatted source path argument, separated by the System pathSeparator string (colon (:) on Solaris or semi-colon (;) on Windows).
        See Also:
        File.pathSeparator
      • getExcludedPackages

        private java.util.Collection<java.lang.String> getExcludedPackages()
                                                                    throws org.apache.maven.reporting.MavenReportException
        Method to get the packages specified in the excludePackageNames parameter. The packages are split with ',', ':', or ';' and then formatted.
        Returns:
        an array of String objects that contain the package names
        Throws:
        org.apache.maven.reporting.MavenReportException
      • trimValues

        private static java.util.List<java.lang.String> trimValues​(java.util.List<java.lang.String> items)
      • getPathElements

        private java.util.Collection<java.io.File> getPathElements()
                                                            throws org.apache.maven.reporting.MavenReportException
        Method that gets the classpath and modulepath elements that will be specified in the javadoc -classpath and --module-path parameter. Since we have all the sources of the current reactor, it is sufficient to consider the dependencies of the reactor modules, excluding the module artifacts which may not yet be available when the reactor project is built for the first time.
        Returns:
        all classpath elements
        Throws:
        org.apache.maven.reporting.MavenReportException - if any.
      • getDependencyScopeFilter

        protected org.apache.maven.shared.artifact.filter.resolve.ScopeFilter getDependencyScopeFilter()
      • resolveDependency

        public org.apache.maven.artifact.Artifact resolveDependency​(org.apache.maven.model.Dependency dependency)
                                                             throws org.apache.maven.reporting.MavenReportException
        Parameters:
        dependency - Dependency
        Returns:
        Artifact
        Throws:
        org.apache.maven.reporting.MavenReportException - when artifact could not be resolved
      • getToolchain

        protected final org.apache.maven.toolchain.Toolchain getToolchain()
      • populateCompileArtifactMap

        private void populateCompileArtifactMap​(java.util.Map<java.lang.String,​org.apache.maven.artifact.Artifact> compileArtifactMap,
                                                java.util.Collection<org.apache.maven.artifact.Artifact> artifactList)
                                         throws org.apache.maven.reporting.MavenReportException
        Method to put the artifacts in the hashmap.
        Parameters:
        compileArtifactMap - the hashmap that will contain the artifacts
        artifactList - the list of artifacts that will be put in the map
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
      • 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
      • getStylesheetFile

        private java.lang.String getStylesheetFile​(java.io.File javadocOutputDirectory)
        Method to get the stylesheet path file to be used by the Javadoc Tool.
        If the stylesheetfile is empty, return the file as String definded by stylesheet value.
        If the stylesheetfile is defined, return the file as String.
        Note: since 2.6, the stylesheetfile could be a path from a resource in the project source directories (i.e. src/main/java, src/main/resources or src/main/javadoc) or from a resource in the Javadoc plugin dependencies.
        Parameters:
        javadocOutputDirectory - the output directory
        Returns:
        the stylesheet file absolute path as String.
        See Also:
        getResource(List, String)
      • getHelpFile

        private java.lang.String getHelpFile​(java.io.File javadocOutputDirectory)
        Method to get the help file to be used by the Javadoc Tool.
        Since 2.6, the helpfile could be a path from a resource in the project source directories (i.e. src/main/java, src/main/resources or src/main/javadoc) or from a resource in the Javadoc plugin dependencies.
        Parameters:
        javadocOutputDirectory - the output directory.
        Returns:
        the help file absolute path as String.
        Since:
        2.6
        See Also:
        getResource(File, String)
      • getAccessLevel

        private java.lang.String getAccessLevel()
        Method to get the access level for the classes and members to be shown in the generated javadoc. If the specified access level is not public, protected, package or private, the access level is set to protected.
        Returns:
        the access level
      • getBootclassPath

        private java.lang.String getBootclassPath()
                                           throws org.apache.maven.reporting.MavenReportException
        Method to get the path of the bootclass artifacts used in the -bootclasspath option.
        Returns:
        a string that contains bootclass path, separated by the System pathSeparator string (colon (:) on Solaris or semi-colon (;) on Windows).
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        File.pathSeparator
      • getDocletPath

        private java.lang.String getDocletPath()
                                        throws org.apache.maven.reporting.MavenReportException
        Method to get the path of the doclet artifacts used in the -docletpath option.

        Either docletArtifact or doclectArtifacts can be defined and used, not both, docletArtifact takes precedence over doclectArtifacts. docletPath is always appended to any result path definition.

        Returns:
        a string that contains doclet path, separated by the System pathSeparator string (colon (:) on Solaris or semi-colon (;) on Windows).
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        File.pathSeparator
      • isDocletArtifactEmpty

        private boolean isDocletArtifactEmpty​(DocletArtifact aDocletArtifact)
        Verify if a doclet artifact is empty or not
        Parameters:
        aDocletArtifact - could be null
        Returns:
        true if aDocletArtifact or the groupId/artifactId/version of the doclet artifact is null, false otherwise.
      • getTagletPath

        private java.lang.String getTagletPath()
                                        throws org.apache.maven.reporting.MavenReportException
        Method to get the path of the taglet artifacts used in the -tagletpath option.
        Returns:
        a string that contains taglet path, separated by the System pathSeparator string (colon (:) on Solaris or semi-colon (;) on Windows).
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        File.pathSeparator
      • collectLinks

        private java.util.Set<java.lang.String> collectLinks()
                                                      throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectGroups

        private java.util.Set<Group> collectGroups()
                                            throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectResourcesArtifacts

        private java.util.Set<ResourcesArtifact> collectResourcesArtifacts()
                                                                    throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectBootClasspathArtifacts

        private java.util.Set<BootclasspathArtifact> collectBootClasspathArtifacts()
                                                                            throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectOfflineLinks

        private java.util.Set<OfflineLink> collectOfflineLinks()
                                                        throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectTags

        private java.util.Set<Tag> collectTags()
                                        throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectTagletArtifacts

        private java.util.Set<TagletArtifact> collectTagletArtifacts()
                                                              throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectDocletArtifacts

        private java.util.Set<DocletArtifact> collectDocletArtifacts()
                                                              throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • collectTaglets

        private java.util.Set<Taglet> collectTaglets()
                                              throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • getArtifactsAbsolutePath

        private java.util.List<java.lang.String> getArtifactsAbsolutePath​(JavadocPathArtifact javadocArtifact)
                                                                   throws org.apache.maven.reporting.MavenReportException
        Return the Javadoc artifact path and its transitive dependencies path from the local repository
        Parameters:
        javadocArtifact - not null
        Returns:
        a list of locale artifacts absolute path
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
      • createAndResolveArtifact

        private org.apache.maven.artifact.Artifact createAndResolveArtifact​(JavadocPathArtifact javadocArtifact)
                                                                     throws org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException
        creates an Artifact representing the configured JavadocPathArtifact and resolves it.
        Parameters:
        javadocArtifact - the JavadocPathArtifact to resolve
        Returns:
        a resolved Artifact
        Throws:
        org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException - issue while resolving artifact
      • addMemoryArg

        private void addMemoryArg​(org.codehaus.plexus.util.cli.Commandline cmd,
                                  java.lang.String arg,
                                  java.lang.String memory)
        Method that adds/sets the java memory parameters in the command line execution.
        Parameters:
        cmd - the command line execution object where the argument will be added
        arg - the argument parameter name
        memory - the JVM memory value to be set
        See Also:
        JavadocUtil.parseJavadocMemory(String)
      • addProxyArg

        private void addProxyArg​(org.codehaus.plexus.util.cli.Commandline cmd)
        Method that adds/sets the javadoc proxy parameters in the command line execution.
        Parameters:
        cmd - the command line execution object where the argument will be added
      • getJavadocExecutable

        private java.lang.String getJavadocExecutable()
                                               throws java.io.IOException
        Get the path of the Javadoc tool executable depending the user entry or try to find it depending the OS or the java.home system property or the JAVA_HOME environment variable.
        Returns:
        the path of the Javadoc tool
        Throws:
        java.io.IOException - if not found
      • setFJavadocVersion

        private void setFJavadocVersion​(java.io.File jExecutable)
                                 throws org.apache.maven.reporting.MavenReportException
        Set a new value for javadocRuntimeVersion
        Parameters:
        jExecutable - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if not found
        See Also:
        JavadocUtil.getJavadocVersion(File)
      • isJavaDocVersionAtLeast

        private boolean isJavaDocVersionAtLeast​(org.codehaus.plexus.languages.java.version.JavaVersion requiredVersion)
        Is the Javadoc version at least the requested version.
        Parameters:
        requiredVersion - the required version, for example 1.5f
        Returns:
        true if the javadoc version is equal or greater than the required version
      • addArgIf

        private void addArgIf​(java.util.List<java.lang.String> arguments,
                              boolean b,
                              java.lang.String value)
        Convenience method to add an argument to the command line conditionally based on the given flag.
        Parameters:
        arguments - a list of arguments, not null
        b - the flag which controls if the argument is added or not.
        value - the argument value to be added.
      • addArgIf

        private void addArgIf​(java.util.List<java.lang.String> arguments,
                              boolean b,
                              java.lang.String value,
                              org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion)
        Convenience method to add an argument to the command line regarding the requested Java version.
        Parameters:
        arguments - a list of arguments, not null
        b - the flag which controls if the argument is added or not.
        value - the argument value to be added.
        requiredJavaVersion - the required Java version, for example 1.31f or 1.4f
        See Also:
        addArgIf(List, boolean, String), isJavaDocVersionAtLeast(JavaVersion)
      • addArgIfNotEmpty

        private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments,
                                      java.lang.String key,
                                      java.lang.String value)
        Convenience method to add an argument to the command line if the the value is not null or empty.

        Moreover, the value could be comma separated.

        Parameters:
        arguments - a list of arguments, not null
        key - the argument name.
        value - the argument value to be added.
        See Also:
        addArgIfNotEmpty(List, String, String, boolean)
      • addArgIfNotEmpty

        private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments,
                                      java.lang.String key,
                                      java.lang.String value,
                                      boolean repeatKey,
                                      boolean splitValue,
                                      org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion)
        Convenience method to add an argument to the command line if the the value is not null or empty.

        Moreover, the value could be comma separated.

        Parameters:
        arguments - a list of arguments, not null
        key - the argument name.
        value - the argument value to be added.
        repeatKey - repeat or not the key in the command line
        splitValue - if true given value will be tokenized by comma
        requiredJavaVersion - the required Java version, for example 1.31f or 1.4f
        See Also:
        addArgIfNotEmpty(List, String, String, boolean, boolean), isJavaDocVersionAtLeast(JavaVersion)
      • addArgIfNotEmpty

        private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments,
                                      java.lang.String key,
                                      java.lang.String value,
                                      boolean repeatKey,
                                      boolean splitValue)
        Convenience method to add an argument to the command line if the the value is not null or empty.

        Moreover, the value could be comma separated.

        Parameters:
        arguments - a list of arguments, not null
        key - the argument name.
        value - the argument value to be added.
        repeatKey - repeat or not the key in the command line
        splitValue - if true given value will be tokenized by comma
      • addArgIfNotEmpty

        private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments,
                                      java.lang.String key,
                                      java.lang.String value,
                                      boolean repeatKey)
        Convenience method to add an argument to the command line if the the value is not null or empty.

        Moreover, the value could be comma separated.

        Parameters:
        arguments - a list of arguments, not null
        key - the argument name.
        value - the argument value to be added.
        repeatKey - repeat or not the key in the command line
      • addArgIfNotEmpty

        private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments,
                                      java.lang.String key,
                                      java.lang.String value,
                                      org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion)
        Convenience method to add an argument to the command line regarding the requested Java version.
        Parameters:
        arguments - a list of arguments, not null
        key - the argument name.
        value - the argument value to be added.
        requiredJavaVersion - the required Java version, for example 1.31f or 1.4f
        See Also:
        addArgIfNotEmpty(List, String, String, JavaVersion, boolean)
      • addArgIfNotEmpty

        private void addArgIfNotEmpty​(java.util.List<java.lang.String> arguments,
                                      java.lang.String key,
                                      java.lang.String value,
                                      org.codehaus.plexus.languages.java.version.JavaVersion requiredJavaVersion,
                                      boolean repeatKey)
        Convenience method to add an argument to the command line regarding the requested Java version.
        Parameters:
        arguments - a list of arguments, not null
        key - the argument name.
        value - the argument value to be added.
        requiredJavaVersion - the required Java version, for example 1.31f or 1.4f
        repeatKey - repeat or not the key in the command line
        See Also:
        addArgIfNotEmpty(List, String, String), isJavaDocVersionAtLeast(org.codehaus.plexus.languages.java.version.JavaVersion)
      • addLinkofflineArguments

        private void addLinkofflineArguments​(java.util.List<java.lang.String> arguments,
                                             java.util.Set<OfflineLink> offlineLinksList)
                                      throws org.apache.maven.reporting.MavenReportException
        Convenience method to process offlineLinks values as individual -linkoffline javadoc options.
        If detectOfflineLinks, try to add javadoc apidocs according Maven conventions for all modules given in the project.
        Parameters:
        arguments - a list of arguments, not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        offlineLinks, getModulesLinks(), package-list spec
      • getLinkofflines

        private java.util.Set<OfflineLink> getLinkofflines()
                                                    throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • addLinkArguments

        private void addLinkArguments​(java.util.List<java.lang.String> arguments)
                               throws org.apache.maven.reporting.MavenReportException
        Convenience method to process links values as individual -link javadoc options. If detectLinks, try to add javadoc apidocs according Maven conventions for all dependencies given in the project.
        According the Javadoc documentation, all defined link should have ${link}/package-list fetchable.
        Note: when a link is not fetchable:
        • Javadoc 1.4 and less throw an exception
        • Javadoc 1.5 and more display a warning
        Parameters:
        arguments - a list of arguments, not null
        Throws:
        org.apache.maven.reporting.MavenReportException - issue while generating report
        See Also:
        detectLinks, getDependenciesLinks(), package-list spec
      • resolveDependencyBundles

        private void resolveDependencyBundles()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • copyAdditionalJavadocResources

        private void copyAdditionalJavadocResources​(java.io.File anOutputDirectory)
                                             throws org.apache.maven.reporting.MavenReportException
        Method that copy additional Javadoc resources from given artifacts.
        Parameters:
        anOutputDirectory - the output directory
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        resourcesArtifacts
      • getPackageNames

        private java.util.List<java.lang.String> getPackageNames​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)
        Parameters:
        sourcePaths - could be null
        Returns:
        the list of package names for files in the sourcePaths
      • getPackageNamesRespectingJavaModules

        private java.util.List<java.lang.String> getPackageNamesRespectingJavaModules​(java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> allSourcePaths)
                                                                               throws org.apache.maven.reporting.MavenReportException
        Parameters:
        allSourcePaths - not null, containing absolute and relative paths
        Returns:
        a list of exported package names for files in allSourcePaths
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        getFiles(java.util.Collection<java.nio.file.Path>), getSourcePaths()
      • getFilesWithUnnamedPackages

        private java.util.List<java.lang.String> getFilesWithUnnamedPackages​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)
        Parameters:
        sourcePaths - could be null
        Returns:
        a list files with unnamed package names for files in the sourcePaths
      • getSpecialFiles

        private java.util.List<java.lang.String> getSpecialFiles​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)
        Either return only the module descriptor or all sourcefiles per sourcepath
        Parameters:
        sourcePaths - could be null
        Returns:
        a list of files
      • getModuleSourcePathFiles

        private java.util.List<java.lang.String> getModuleSourcePathFiles​(java.util.Map<java.nio.file.Path,​java.util.Collection<java.lang.String>> sourcePaths)
      • addCommandLineOptions

        private void addCommandLineOptions​(org.codehaus.plexus.util.cli.Commandline cmd,
                                           java.util.List<java.lang.String> arguments,
                                           java.io.File javadocOutputDirectory)
                                    throws org.apache.maven.reporting.MavenReportException
        Generate an options file for all options and arguments and add the @options in the command line.
        Parameters:
        cmd - not null
        arguments - not null
        javadocOutputDirectory - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        Reference Guide, Command line argument files, OPTIONS_FILE_NAME
      • addCommandLinePackages

        private void addCommandLinePackages​(org.codehaus.plexus.util.cli.Commandline cmd,
                                            java.io.File javadocOutputDirectory,
                                            java.util.List<java.lang.String> packageNames)
                                     throws org.apache.maven.reporting.MavenReportException
        Generate a file called packages to hold all package names and add the @packages in the command line.
        Parameters:
        cmd - not null
        javadocOutputDirectory - not null
        packageNames - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        Reference Guide, Command line argument files, PACKAGES_FILE_NAME
      • validateJavadocOptions

        private void validateJavadocOptions()
                                     throws org.apache.maven.reporting.MavenReportException
        Checks for the validity of the Javadoc options used by the user.
        Throws:
        org.apache.maven.reporting.MavenReportException - if error
      • validateStandardDocletOptions

        private void validateStandardDocletOptions()
                                            throws org.apache.maven.reporting.MavenReportException
        Checks for the validity of the Standard Doclet options.
        For example, throw an exception if <nohelp/> and <helpfile/> options are used together.
        Throws:
        org.apache.maven.reporting.MavenReportException - if error or conflict found
      • addJavadocOptions

        private void addJavadocOptions​(java.io.File javadocOutputDirectory,
                                       java.util.List<java.lang.String> arguments,
                                       java.util.Map<java.lang.String,​java.util.Collection<java.nio.file.Path>> allSourcePaths,
                                       java.util.Set<OfflineLink> offlineLinks)
                                throws org.apache.maven.reporting.MavenReportException
        Add Standard Javadoc Options.
        The package documentation details the Standard Javadoc Options wrapped by this Plugin.
        Parameters:
        javadocOutputDirectory - not null
        arguments - not null
        allSourcePaths - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadocoptions
      • getResolvePathResult

        private org.codehaus.plexus.languages.java.jpms.ResolvePathResult getResolvePathResult​(java.io.File artifactFile)
      • findMainDescriptor

        private java.io.File findMainDescriptor​(java.util.Collection<java.nio.file.Path> roots)
                                         throws org.apache.maven.reporting.MavenReportException
        Throws:
        org.apache.maven.reporting.MavenReportException
      • addStandardDocletOptions

        private void addStandardDocletOptions​(java.io.File javadocOutputDirectory,
                                              java.util.List<java.lang.String> arguments,
                                              java.util.Set<OfflineLink> offlineLinks)
                                       throws org.apache.maven.reporting.MavenReportException
        Add Standard Doclet Options.
        The package documentation details the Standard Doclet Options wrapped by this Plugin.
        Parameters:
        javadocOutputDirectory - not null
        arguments - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#standard
      • addGroups

        private void addGroups​(java.util.List<java.lang.String> arguments)
                        throws org.apache.maven.reporting.MavenReportException
        Add groups parameter to arguments.
        Parameters:
        arguments - not null
        Throws:
        org.apache.maven.reporting.MavenReportException
      • addTags

        private void addTags​(java.util.List<java.lang.String> arguments)
                      throws org.apache.maven.reporting.MavenReportException
        Add tags parameter to arguments.
        Parameters:
        arguments - not null
        Throws:
        org.apache.maven.reporting.MavenReportException
      • addTaglets

        private void addTaglets​(java.util.List<java.lang.String> arguments)
        Add taglets parameter to arguments.
        Parameters:
        arguments - not null
      • addTagletsFromTagletArtifacts

        private void addTagletsFromTagletArtifacts​(java.util.List<java.lang.String> arguments)
                                            throws org.apache.maven.reporting.MavenReportException
        Auto-detect taglets class name from tagletArtifacts and add them to arguments.
        Parameters:
        arguments - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        See Also:
        JavadocUtil.getTagletClassNames(File)
      • executeJavadocCommandLine

        private void executeJavadocCommandLine​(org.codehaus.plexus.util.cli.Commandline cmd,
                                               java.io.File javadocOutputDirectory)
                                        throws org.apache.maven.reporting.MavenReportException
        Execute the Javadoc command line
        Parameters:
        cmd - not null
        javadocOutputDirectory - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any errors occur
      • isUpToDate

        private boolean isUpToDate​(org.codehaus.plexus.util.cli.Commandline cmd)
                            throws org.apache.maven.reporting.MavenReportException
        Check if the javadoc is uptodate or not
        Parameters:
        cmd - not null
        Returns:
        true is the javadoc is uptodate, false otherwise
        Throws:
        org.apache.maven.reporting.MavenReportException - if any error occur
      • doExecuteJavadocCommandLine

        private void doExecuteJavadocCommandLine​(org.codehaus.plexus.util.cli.Commandline cmd,
                                                 java.io.File javadocOutputDirectory)
                                          throws org.apache.maven.reporting.MavenReportException
        Execute the Javadoc command line
        Parameters:
        cmd - not null
        javadocOutputDirectory - not null
        Throws:
        org.apache.maven.reporting.MavenReportException - if any errors occur
      • fixFrameInjectionBug

        private int fixFrameInjectionBug​(java.io.File javadocOutputDirectory,
                                         java.lang.String outputEncoding)
                                  throws java.io.IOException
        Patches the given Javadoc output directory to work around CVE-2013-1571 (see http://www.kb.cert.org/vuls/id/225657).
        Parameters:
        javadocOutputDirectory - directory to scan for vulnerabilities
        outputEncoding - encoding used by the javadoc tool (-docencoding parameter). If null, the platform's default encoding is used (like javadoc does).
        Returns:
        the number of patched files
        Throws:
        java.io.IOException
      • getResource

        private java.lang.String getResource​(java.io.File outputFile,
                                             java.lang.String inputResourceName)
        Parameters:
        outputFile - not nul
        inputResourceName - a not null resource in src/main/java, src/main/resources or src/main/javadoc or in the Javadoc plugin dependencies.
        Returns:
        the resource file absolute path as String
        Since:
        2.6
      • getResource

        private java.net.URL getResource​(java.util.List<java.lang.String> classPath,
                                         java.lang.String resource)
        Parameters:
        classPath - a not null String list of files where resource will be look up.
        resource - a not null ressource to find in the class path.
        Returns:
        the resource from the given classpath or null if not found
        Since:
        2.6
        See Also:
        ClassLoader.getResource(String)
      • getFullJavadocGoal

        private java.lang.String getFullJavadocGoal()
        Get the full javadoc goal. Loads the plugin's pom.properties to get the current plugin version.
        Returns:
        org.apache.maven.plugins:maven-javadoc-plugin:CURRENT_VERSION:[test-]javadoc
      • getModulesLinks

        private java.util.List<OfflineLink> getModulesLinks()
                                                     throws org.apache.maven.reporting.MavenReportException
        Using Maven, a Javadoc link is given by ${project.url}/apidocs.
        Returns:
        the detected Javadoc links using the Maven conventions for all modules defined in the current project or an empty list.
        Throws:
        org.apache.maven.reporting.MavenReportException - if any
        Since:
        2.6
        See Also:
        detectOfflineLinks, reactorProjects
      • getDependenciesLinks

        private java.util.List<java.lang.String> getDependenciesLinks()
        Using Maven, a Javadoc link is given by ${project.url}/apidocs.
        Returns:
        the detected Javadoc links using the Maven conventions for all dependencies defined in the current project or an empty list.
        Since:
        2.6
        See Also:
        detectLinks, isValidJavadocLink(java.lang.String, boolean)
      • followLinks

        private java.util.Set<java.lang.String> followLinks​(java.util.Set<java.lang.String> links)
        Follows all of the given links, and returns their last redirect locations. Ordering is kept. This is necessary because javadoc tool doesn't follow links, see JDK-8190312 (MJAVADOC-427, MJAVADOC-487)
        Parameters:
        links - Links to follow.
        Returns:
        Last redirect location of all the links.
      • isValidJavadocLink

        protected boolean isValidJavadocLink​(java.lang.String link,
                                             boolean detecting)
        Parameters:
        link - not null
        detecting - true if the link is generated by detectLinks, or false otherwise
        Returns:
        true if the link has a /package-list, false otherwise.
        Since:
        2.6
        See Also:
        package-list spec
      • writeDebugJavadocScript

        private void writeDebugJavadocScript​(java.lang.String cmdLine,
                                             java.io.File javadocOutputDirectory)
        Write a debug javadoc script in case of command line error or in debug mode.
        Parameters:
        cmdLine - the current command line as string, not null.
        javadocOutputDirectory - the output dir, not null.
        Since:
        2.6
        See Also:
        executeJavadocCommandLine(Commandline, File)
      • isJavadocVMInitError

        private boolean isJavadocVMInitError​(java.lang.String output)
        Check if the Javadoc JVM is correctly started or not.
        Parameters:
        output - the command line output, not null.
        Returns:
        true if Javadoc output command line contains Javadoc word, false otherwise.
        Since:
        2.6.1
        See Also:
        executeJavadocCommandLine(Commandline, File)
      • getJavadocLink

        private static java.lang.String getJavadocLink​(org.apache.maven.project.MavenProject p)
        Parameters:
        p - not null
        Returns:
        the javadoc link based on the project url i.e. ${project.url}/${destDir} where destDir is configued in the Javadoc plugin configuration (apidocs by default).
        Since:
        2.6
      • cleanUrl

        private static java.lang.String cleanUrl​(java.lang.String url)
        Parameters:
        url - could be null.
        Returns:
        the url cleaned or empty if url was null.
        Since:
        2.6
      • getPlugin

        private static org.apache.maven.model.Plugin getPlugin​(org.apache.maven.project.MavenProject p,
                                                               java.lang.String pluginId)
        Parameters:
        p - not null
        pluginId - not null key of the plugin defined in PluginContainer.getPluginsAsMap() or in PluginContainer.getPluginsAsMap()
        Returns:
        the Maven plugin defined in ${project.build.plugins} or in ${project.build.pluginManagement}, or null if not defined.
        Since:
        2.6
      • getPluginParameter

        private static java.lang.String getPluginParameter​(org.apache.maven.project.MavenProject p,
                                                           java.lang.String pluginId,
                                                           java.lang.String param)
        Parameters:
        p - not null
        pluginId - not null
        param - not null
        Returns:
        the simple parameter as String defined in the plugin configuration by param key or null if not found.
        Since:
        2.6
      • getJavadocOptionsFile

        protected final java.io.File getJavadocOptionsFile()
        Construct the output file for the generated javadoc-options XML file, after creating the javadocOptionsDir if necessary. This method does NOT write to the file in question.
        Returns:
        The options File file.
        Since:
        2.7
      • buildJavadocOptions

        protected final JavadocOptions buildJavadocOptions()
                                                    throws java.io.IOException
        Generate a javadoc-options XML file, for either bundling with a javadoc-resources artifact OR supplying to a distro module in a includeDependencySources configuration, so the javadoc options from this execution can be reconstructed and merged in the distro build.
        Returns:
        JavadocOptions
        Throws:
        java.io.IOException - IOException
        Since:
        2.7
      • getAttachmentClassifier

        protected java.lang.String getAttachmentClassifier()
        Override this if you need to provide a bundle attachment classifier, as in the case of test javadocs.
        Returns:
        The attachment classifier.
      • logError

        protected void logError​(java.lang.String message,
                                java.lang.Throwable t)
        Logs an error with throwable content only if in debug.
        Parameters:
        message - The message which should be announced.
        t - The throwable part of the message.
      • failOnError

        protected void failOnError​(java.lang.String prefix,
                                   java.lang.Exception e)
                            throws org.apache.maven.plugin.MojoExecutionException
        Parameters:
        prefix - The prefix of the exception.
        e - The exception.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - MojoExecutionException issue while generating report
      • getAggregatedProjects

        private java.util.List<org.apache.maven.project.MavenProject> getAggregatedProjects()
        Returns:
        List of projects to be part of aggregated javadoc
      • isSkippedModule

        protected boolean isSkippedModule​(org.apache.maven.project.MavenProject mavenProject)
        Returns:
        true if the module need to be skipped from aggregate generation
      • isSkippedJavadoc

        protected boolean isSkippedJavadoc​(org.apache.maven.project.MavenProject mavenProject)
        Returns:
        true if the pom configuration skip javadoc generation for the project