Class AbstractGroovydocMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    GroovydocMojo, GroovydocTestsMojo

    public abstract class AbstractGroovydocMojo
    extends AbstractGroovySourcesMojo
    The base groovydoc mojo, which all groovydoc mojos extend.
    Since:
    1.0-beta-1
    Author:
    Keegan Witt
    • Field Detail

      • GROOVY_1_6_0_RC2

        protected static final Version GROOVY_1_6_0_RC2
        Groovy 1.6.0 RC-2 version.
      • GROOVY_1_6_0_RC1

        protected static final Version GROOVY_1_6_0_RC1
        Groovy 1.6.0 RC-1 version.
      • GROOVY_1_5_8

        protected static final Version GROOVY_1_5_8
        Groovy 1.5.8 version.
      • GROOVY_1_5_2

        protected static final Version GROOVY_1_5_2
        Groovy 1.5.2 version.
      • groovydocOutputDirectory

        protected File groovydocOutputDirectory
        The location for the generated API docs.
      • testGroovydocOutputDirectory

        protected File testGroovydocOutputDirectory
        The location for the generated test API docs.
      • windowTitle

        protected String windowTitle
        The window title.
      • docTitle

        protected String docTitle
        The page title.
      • footer

        protected String footer
        The page footer.
      • header

        protected String header
        The page header.
      • displayAuthor

        protected boolean displayAuthor
        Whether to display the author in the generated Groovydoc.
      • overviewFile

        protected File overviewFile
        The HTML file to be used for overview documentation.
      • stylesheetFile

        protected File stylesheetFile
        The stylesheet file (absolute path) to copy to output directory (will overwrite default stylesheet.css).
      • stylesheetEncoding

        protected String stylesheetEncoding
        The encoding of stylesheetFile.
      • scope

        protected String scope
        The scope to generate Groovydoc for. Should be one of:
        • "public"
        • "protected"
        • "package"
        • "private"
      • links

        protected List<Link> links
        Links to include in the generated groovydoc (key is link href, value is comma-separated packages to use that link).
        Since:
        1.0-beta-2
      • groovydocJavaSources

        protected boolean groovydocJavaSources
        Whether to include Java sources in groovydoc generation.
        Since:
        1.0-beta-2
    • Constructor Detail

      • AbstractGroovydocMojo

        public AbstractGroovydocMojo()
    • Method Detail

      • setupProperties

        protected Properties setupProperties()
        Sets up the documentation properties.
        Returns:
        the documentation properties
      • createGroovyDocTool

        protected Object createGroovyDocTool​(Class groovyDocToolClass,
                                             Class resourceManagerClass,
                                             Properties docProperties,
                                             Object classpathResourceManager,
                                             List<String> sourceDirectories,
                                             GroovyDocTemplateInfo groovyDocTemplateInfo,
                                             List groovydocLinks)
                                      throws InvocationTargetException,
                                             IllegalAccessException,
                                             InstantiationException
        Instantiates a new GroovyDocTool.
        Parameters:
        groovyDocToolClass - the GroovyDocTool class
        resourceManagerClass - the ResourceManager lass
        docProperties - the documentation properties
        classpathResourceManager - the ClasspathResourceManager for the GroovyDocTool
        sourceDirectories - the source directories for the GroovyDocTool
        groovyDocTemplateInfo - the GroovyDocTemplateInfo for the GroovyDocTool
        groovydocLinks - the Groovydoc links
        Returns:
        the GroovyDocTool to use in Groovydoc generation
        Throws:
        InstantiationException - when a class needed for setting up Groovydoc tool cannot be instantiated
        IllegalAccessException - when a method needed for setting up Groovydoc tool cannot be accessed
        InvocationTargetException - when a reflection invocation needed for setting up Groovydoc tool cannot be completed
      • setupGroovyDocSources

        protected List<String> setupGroovyDocSources​(org.apache.maven.shared.model.fileset.FileSet[] sourceDirectories,
                                                     org.apache.maven.shared.model.fileset.util.FileSetManager fileSetManager)
        Gets the Groovy sources without the Java sources (since the Java sources don't have Javadoc).
        Parameters:
        sourceDirectories - the source directories to get the Groovy sources from
        fileSetManager - the FileSetmanager to use to get the included files
        Returns:
        the groovy sources
      • generateGroovydoc

        protected void generateGroovydoc​(File outputDirectory,
                                         Class groovyDocToolClass,
                                         Class outputToolClass,
                                         Object fileOutputTool,
                                         List<String> groovydocSources,
                                         Object groovyDocTool)
                                  throws InvocationTargetException,
                                         IllegalAccessException
        Performs the Groovydoc generation.
        Parameters:
        outputDirectory - the directory to output the Groovydoc to
        groovyDocToolClass - the GroovyDocTool class
        outputToolClass - the OutputTool class
        fileOutputTool - the FileOutputTool to use for Groovydoc generation
        groovydocSources - the sources to
        groovyDocTool - the GroovyDocTool to use for Groovydoc generation
        Throws:
        IllegalAccessException - when a method needed for Groovydoc generation cannot be accessed
        InvocationTargetException - when a reflection invocation needed for Groovydoc generation cannot be completed
      • copyStylesheet

        protected void copyStylesheet​(File outputDirectory)
        Copies the stylesheet to the specified output directory.
        Parameters:
        outputDirectory - The output directory to copy the stylesheet to