Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Patch
Description
currently it is not possible to specify custom GroovyDoc package-, doc- or class-templates. additionally, as template files are loaded by the class loader (see ClasspathResourceManager), it is not possible to define templates outside the classpath.
see Groovydoc.execute():
GroovyDocTool htmlTool = new GroovyDocTool( new ClasspathResourceManager(), sourcePath.list(), GroovyDocTemplateInfo.DEFAULT_DOC_TEMPLATES, GroovyDocTemplateInfo.DEFAULT_PACKAGE_TEMPLATES, GroovyDocTemplateInfo.DEFAULT_CLASS_TEMPLATES, links, properties);
This issue targets to allow Groovydoc descendant classes to override the default template classpath locations (and still relying on the classloader resource manager implementation).
The attached patch adds three protected methods for retrieving package-, doc- and class-templates and has a test-case for specifying a custom class template.