[
https://issues.apache.org/jira/browse/GROOVY-11682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-11682.
--------------------------------
Fix Version/s: 6.0.0-alpha-1
Assignee: Paul King
Resolution: Fixed
> Support modular external links
> ------------------------------
>
> Key: GROOVY-11682
> URL: https://issues.apache.org/jira/browse/GROOVY-11682
> Project: Groovy
> Issue Type: Improvement
> Components: groovy-groovydoc
> Affects Versions: 4.0.27
> Reporter: Per Nyfelt
> Assignee: Paul King
> Priority: Major
> Fix For: 6.0.0-alpha-1
>
>
> Currently, the Groovydoc ant task assumes a non modular java doc. e.g. when
> adding
> link(packages: 'java.', href:
> '[https://docs.oracle.com/en/java/javase/21/docs/api/')]
> A link to a java class e.g. Object becomes
> [https://docs.oracle.com/en/java/javase/21/docs/api/java/lang/Object.html]
> Instead of the correct
> https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html
>
> This could be fixed by adding an optional module argument to the link e.g.
> link(packages: 'java.', href:
> 'https://docs.oracle.com/en/java/javase/21/docs/api/', module: 'java.base')
> To do this, the
> LinkArgument could be modified with an additional module attribute and the
> getHref method changed to
> @Override
> public String getHref() {
> String base = super.getHref();
> if (base == null || module == null || module.isEmpty()) return base;
> return base.endsWith("/") ? base + module : base + "/" + module;
> }
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)