Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      2

      Description

      i want to be able to use both offline and online links. For offline links i mean 'online links in offline mode'.

      The reason is trivial:
      1. I have links to online available apidocs like the javaapi, j2ee api, jasperrepots api, etc
      2. I also have links to apidocs which are not availble yet. These apidocs become availble when the whole maven site is being published to a secure site.

      For situation 1, i'd like to use online links
      For situation 2, i'd like to use online links in offline mode.

      I've read the plugin jelly. It seems there's a build in feature to use offline links even in online mode, but that does not seem to work.

      According to the javadoc api itself, it supports both online and offline links simultaneously. It does not even have a online/offline mode. This is what the maven-javadoc-plugin should support as well.

      1. plugin.jelly
        27 kB
        Wouter Hermeling
      2. plugin.jelly.patch
        3 kB
        Wouter Hermeling

        Activity

        Hide
        Lukas Theussl added a comment -

        Did you read the FAQ of the javadoc plugin ( http://maven.apache.org/maven-1.x/reference/plugins/javadoc/faq.html#links )?
        I would think this is supposed to do what you want.

        Show
        Lukas Theussl added a comment - Did you read the FAQ of the javadoc plugin ( http://maven.apache.org/maven-1.x/reference/plugins/javadoc/faq.html#links )? I would think this is supposed to do what you want.
        Hide
        Wouter Hermeling added a comment -

        Yes i did read the FAQ. And i also did some testing:

        If i work in offline mode (maven.javadoc.mode.online=false) then i'm only able to use offline links (the ones specified by maven.javadoc.offlineLinks)
        Any other links such as specified by maven.javadoc.links will be ignored.

        Example of what i would like:
        ---------------------------------------------------------------------
        #do not use any online/offline mode anymore
        #maven.javadoc.mode.online=false

        #use the following online link(s)
        maven.javadoc.links=http://java.sun.com/j2se/1.3.1/docs/api

        #use the following offline link(s)
        maven.javadoc.offlineLinks=https://somesite.com/apidocs#/some/local/dir
        ---------------------------------------------------------------------

        I tried to tric the plugin by specifying online links in the maven.javadoc.offlineLinks property (according to the plugin jelly it should work):
        ---------------------------------------------------------------------
        maven.javadoc.mode.online=true
        maven.javadoc.links= \
        https://somesite.com/apidocs#/some/local/dir, \
        http://java.sun.com/j2se/1.3.1/docs/api
        ---------------------------------------------------------------------
        but that did not work. This forces me to specify all links as offline links which means i have to download all apidocs even if they are online available (well actually onlny the package-list file). This results in the following code snippet:
        ---------------------------------------------------------------------
        maven.javadoc.mode.online=false
        maven.javadoc.offlineLinks= \
        https://somesite.com/apidocs#/some/local/dir, \
        http://java.sun.com/j2se/1.3.1/docs/api/#/local/j2se/1.3.1/apidocs
        ---------------------------------------------------------------------

        In fact my program has more like 20 links, many of them are available online. This forces me to store many apidocs on the local file system and to maintain them.

        Maybe i'll try to change the jelly code myself (should be doable and the javadoc seems to support it)

        Show
        Wouter Hermeling added a comment - Yes i did read the FAQ. And i also did some testing: If i work in offline mode (maven.javadoc.mode.online=false) then i'm only able to use offline links (the ones specified by maven.javadoc.offlineLinks) Any other links such as specified by maven.javadoc.links will be ignored. Example of what i would like: --------------------------------------------------------------------- #do not use any online/offline mode anymore #maven.javadoc.mode.online=false #use the following online link(s) maven.javadoc.links= http://java.sun.com/j2se/1.3.1/docs/api #use the following offline link(s) maven.javadoc.offlineLinks= https://somesite.com/apidocs#/some/local/dir --------------------------------------------------------------------- I tried to tric the plugin by specifying online links in the maven.javadoc.offlineLinks property (according to the plugin jelly it should work): --------------------------------------------------------------------- maven.javadoc.mode.online=true maven.javadoc.links= \ https://somesite.com/apidocs#/some/local/dir , \ http://java.sun.com/j2se/1.3.1/docs/api --------------------------------------------------------------------- but that did not work. This forces me to specify all links as offline links which means i have to download all apidocs even if they are online available (well actually onlny the package-list file). This results in the following code snippet: --------------------------------------------------------------------- maven.javadoc.mode.online=false maven.javadoc.offlineLinks= \ https://somesite.com/apidocs#/some/local/dir , \ http://java.sun.com/j2se/1.3.1/docs/api/#/local/j2se/1.3.1/apidocs --------------------------------------------------------------------- In fact my program has more like 20 links, many of them are available online. This forces me to store many apidocs on the local file system and to maintain them. Maybe i'll try to change the jelly code myself (should be doable and the javadoc seems to support it)
        Hide
        Wouter Hermeling added a comment -

        I changed the jelly myself. It wasn't hard to accomplish. See the attached file which is the modified jelly (I orginally used the 1.7 version and made the changes).

        I hope you're 'OK' with the solution.

        Show
        Wouter Hermeling added a comment - I changed the jelly myself. It wasn't hard to accomplish. See the attached file which is the modified jelly (I orginally used the 1.7 version and made the changes). I hope you're 'OK' with the solution.
        Hide
        Lukas Theussl added a comment -

        Can you attach a patch in unified diff format against the latest version from SVN? It's a bit hard to track what you did otherwise. Thanks!

        Show
        Lukas Theussl added a comment - Can you attach a patch in unified diff format against the latest version from SVN? It's a bit hard to track what you did otherwise. Thanks!
        Hide
        Wouter Hermeling added a comment -

        Hmm, i tried creating one for you, but:
        1. The project.xml states that cvs is used, not svn
        2. The connectionUrl in the project.xml is not working. I cannot find the module 'maven-plugins/javadoc' within the repository '/home/cvspublic'on the host cvs.apache.org.

        Could you provide me the correct url?

        Show
        Wouter Hermeling added a comment - Hmm, i tried creating one for you, but: 1. The project.xml states that cvs is used, not svn 2. The connectionUrl in the project.xml is not working. I cannot find the module 'maven-plugins/javadoc' within the repository '/home/cvspublic'on the host cvs.apache.org. Could you provide me the correct url?
        Hide
        Wouter Hermeling added a comment -

        I made some efforts to manually create a patch (see attachement)

        Show
        Wouter Hermeling added a comment - I made some efforts to manually create a patch (see attachement)
        Hide
        Lukas Theussl added a comment -

        The source repository is here: http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/javadoc/

        please check the main maven site for instructions on how to create a patch: http://maven.apache.org/maven-1.x/contributing/patches.html

        Anyway, I'll have a look at your patch ASAP, thanks!

        Show
        Lukas Theussl added a comment - The source repository is here: http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/javadoc/ please check the main maven site for instructions on how to create a patch: http://maven.apache.org/maven-1.x/contributing/patches.html Anyway, I'll have a look at your patch ASAP, thanks!
        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Wouter Hermeling
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: