jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Javadoc Plugin
  • MJAVADOC-97

enable internal/external dependency references as links

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.1
  • Fix Version/s: 2.6
  • Labels:
    None

Description

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) ......

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    maven-javadoc-plugin-2.1.patch
    30/Oct/06 8:57 AM
    15 kB
    Richard van Nieuwenhoven
  2. Text File
    MJAVADOC-97-maven-javadoc-plugin.patch
    27/Nov/07 9:52 AM
    2 kB
    Matthew Beermann

Issue Links

is related to

New Feature - A new feature of the product, which has yet to be developed. MNG-2198 Add <javadoc/> and <source/> to plugin metadata

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MJAVADOC-181 Javadoc report not generated for multi-module project if run from parent level.

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Carlos Sanchez added a comment - 14/Mar/07 3:44 PM

this patch needs more work

  • must be 1.4 compatible
  • no need to reresolve the projects, the javadoc plugin already does, maybe you need to add a variable with the artifacts like compiler plugin does to build the classpath so they are available later
Show
Carlos Sanchez added a comment - 14/Mar/07 3:44 PM this patch needs more work
  • must be 1.4 compatible
  • no need to reresolve the projects, the javadoc plugin already does, maybe you need to add a variable with the artifacts like compiler plugin does to build the classpath so they are available later
Hide
Permalink
Richard van Nieuwenhoven added a comment - 15/Mar/07 3:17 AM

i know it is not the best solution but i needed a solution fast, any volunteers on beatifying this "nessesary" feature.

maybe somewone can comine the effort with the xref generation, to solve the same problem for both projects

Show
Richard van Nieuwenhoven added a comment - 15/Mar/07 3:17 AM i know it is not the best solution but i needed a solution fast, any volunteers on beatifying this "nessesary" feature. maybe somewone can comine the effort with the xref generation, to solve the same problem for both projects
Hide
Permalink
Matthew Beermann added a comment - 27/Nov/07 9:52 AM

Here's another, much more concise patch that I'm fairly sure accomplishes the same thing.

Show
Matthew Beermann added a comment - 27/Nov/07 9:52 AM Here's another, much more concise patch that I'm fairly sure accomplishes the same thing.
Hide
Permalink
Cleber Zarate added a comment - 27/May/08 5:08 PM

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/ ).

Show
Cleber Zarate added a comment - 27/May/08 5:08 PM 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/ ).
Hide
Permalink
Matthew Beermann added a comment - 27/May/08 5:19 PM

I specifically avoided that approach, since it assumes a) that the project is using WebDAV to deploy the site, and b) that the publishing URL is the same as the public access URL. Those both seem like very large assumptions; larger, in my view, than the assumption about the <url> field...

Show
Matthew Beermann added a comment - 27/May/08 5:19 PM I specifically avoided that approach, since it assumes a) that the project is using WebDAV to deploy the site, and b) that the publishing URL is the same as the public access URL. Those both seem like very large assumptions; larger, in my view, than the assumption about the <url> field...
Hide
Permalink
Tuomas Kiviaho added a comment - 25/Jun/09 2:54 AM

Since it is highly unlikely that POM will ever have a javadoc location in the future <http://jira.codehaus.org/browse/MNG-2198> (although this feature would have made a good use of it) I suggest that URL resolving is made pluggable with either of the suggested methods as default. Manual listing of link/linkoffline becomes quite tedious and break easily

Show
Tuomas Kiviaho added a comment - 25/Jun/09 2:54 AM Since it is highly unlikely that POM will ever have a javadoc location in the future <http://jira.codehaus.org/browse/MNG-2198> (although this feature would have made a good use of it) I suggest that URL resolving is made pluggable with either of the suggested methods as default. Manual listing of link/linkoffline becomes quite tedious and break easily
Hide
Permalink
Vincent Siveton added a comment - 20/Jul/09 7:41 AM

Fixed in r795801

I added two new parameters: detectLinks and detectOfflineLinks
Using detectlinks parameter, it tries to add dependencies Javadoc links, ie if you have

<dependency>
   <groupId>commons-lang</groupId>
   <artifactId>commons-lang</artifactId>
 </dependency>

The added Javadoc link will be http://commons.apache.org/lang/apidocs.

Using detectOfflineLinks, all modules javadoc dirs are added as offlinelinks.

Show
Vincent Siveton added a comment - 20/Jul/09 7:41 AM Fixed in r795801 I added two new parameters: detectLinks and detectOfflineLinks Using detectlinks parameter, it tries to add dependencies Javadoc links, ie if you have
<dependency>
   <groupId>commons-lang</groupId>
   <artifactId>commons-lang</artifactId>
 </dependency>
The added Javadoc link will be http://commons.apache.org/lang/apidocs. Using detectOfflineLinks, all modules javadoc dirs are added as offlinelinks.

People

  • Assignee:
    Vincent Siveton
    Reporter:
    Richard van Nieuwenhoven
Vote (10)
Watch (5)

Dates

  • Created:
    30/Oct/06 8:57 AM
    Updated:
    21/Jul/09 7:23 AM
    Resolved:
    20/Jul/09 7:41 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.