[
http://jira.codehaus.org/browse/MJAVADOC-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136380#action_136380
]
Cleber Zarate commented on MJAVADOC-97:
---------------------------------------
Matthew, this code is using the project's url as the maven site. However, there
are some cases where the project site is different from the generated maven
site.
So I changed the code to use the distributionManagement site. If the project
doesn't have one, them attempts to use the project's website.
Here's the code:
@2575
if (model != null)
{
String site;
if(model.getDistributionManagement()!=null &&
model.getDistributionManagement().getSite() !=null){
String url =
model.getDistributionManagement().getSite().getUrl();
if(url.indexOf("http://")>=0)
site =
url.substring(url.indexOf("http://")); //FIXME: make sure every site url will
be http.
else site = url;
}
else if(model.getUrl() != null)
site = model.getUrl();
//attempts to use the project's url.
addArgIfNotEmpty(arguments, "-link",
JavadocUtil
.quotedPathArgument(site + "/apidocs"),
true); //TODO: fix the
getUrl() method to return the URL with the version.
}
I'm using the substring since there's another protocol (dav:) being used for
uploading the website. Maybe there's a better solution for that.
Note that these patches won't work with dependencies that doesn't follow maven
conventions for the site (for instance, hibernate uses
http://www.hibernate.org/hib_docs/v3/api/ ).
> enable internal/external dependency references as links
> --------------------------------------------------------
>
> Key: MJAVADOC-97
> URL: http://jira.codehaus.org/browse/MJAVADOC-97
> Project: Maven 2.x Javadoc Plugin
> Issue Type: New Feature
> Affects Versions: 2.1
> Reporter: Richard van Nieuwenhoven
> Assignee: Kenney Westerhof
> Priority: Minor
> Attachments: maven-javadoc-plugin-2.1.patch,
> MJAVADOC-97-maven-javadoc-plugin.patch
>
>
> This patch enables the java doc plugin to autmaticaly connect the dependent
> javadoc pages as links.
> There is no more need to add links in your pom's for internal and external
> maven projects.
> The plugin resolves the dependencies and adds the defined project url's
> extended with "/apidocs" to the links in the plugin.
> TODO: a warning occures when the project has no javadocs (or no maven
> generated javadoc on its homepage) ......
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira