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:
if (model != null)
if(model.getDistributionManagement()!=null && model.getDistributionManagement().getSite() !=null)
String url = model.getDistributionManagement().getSite().getUrl();
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/ ).