Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.2
    • Labels:
      None
    • Number of attachments :
      7

      Description

      Currently, we can't directly use the pom or velocity in user-documentation.

      JSL is applied to the user-docs as-is. I suggest having a property called maven.docs.src.templates (defaults to false) that when set to true treats user-docs as templates.

      Then, slightly modify the goal xdoc:jelly-transform.

      We need to var's:

      <j:set var="mergeUserDocs" value="$

      {maven.docs.src.templates}

      "/>
      <j:set var="hasUserDocs" value="$

      {maven.docs.src.available}

      "/>

      If both evaluate to true then velocity:merge the user docs before doing jsl. If they evaluate to false do as before.

      It would probably be nice to be able to use jelly as well as user-supplied docs.

      1. hrefkey.patch
        7 kB
        Ignacio G. Mac Dowell
      2. last.cumulative.patch
        15 kB
        Ignacio G. Mac Dowell
      3. last.docs.patch
        3 kB
        Ignacio G. Mac Dowell
      4. last.main.patch
        3 kB
        Ignacio G. Mac Dowell
      5. last.test.patch
        8 kB
        Ignacio G. Mac Dowell
      6. plugin.jelly.patch
        2 kB
        Ignacio G. Mac Dowell
      7. plugin.properties.patch
        0.6 kB
        Ignacio G. Mac Dowell

        Activity

        Hide
        Brett Porter added a comment -

        I think this is a good idea.

        Show
        Brett Porter added a comment - I think this is a good idea.
        Hide
        Lukas Theussl added a comment -

        Ignacio,
        I have checked your latest patch (hrefkey.patch). Unless I'm missing something, the test that you attached does not produce the desired result (an element <a hrefkey="testlinks.mysite1">empty document</a> is generated instead of <a href="http://mysite1.com">empty document</a>) . If you could fix that we'll include it in our next release.

        Show
        Lukas Theussl added a comment - Ignacio, I have checked your latest patch (hrefkey.patch). Unless I'm missing something, the test that you attached does not produce the desired result (an element <a hrefkey="testlinks.mysite1">empty document</a> is generated instead of <a href="http://mysite1.com">empty document</a>) . If you could fix that we'll include it in our next release.
        Hide
        Ignacio G. Mac Dowell added a comment -

        If i run test03, test04 and the multiproject test against the patched plugin, I do get the desired results.

        Are you running the tests against the patched plugin? Another alternative to test is to change maven.xdoc.jsl since it is the only important file that this patch changes (a part from docs and tests).

        Show
        Ignacio G. Mac Dowell added a comment - If i run test03, test04 and the multiproject test against the patched plugin, I do get the desired results. Are you running the tests against the patched plugin? Another alternative to test is to change maven.xdoc.jsl since it is the only important file that this patch changes (a part from docs and tests).
        Hide
        Lukas Theussl added a comment -

        Hmm, seems I forgot to install the plugin before I tested it...

        We'll include it in our 1.9.2 release. Thanks!

        Show
        Lukas Theussl added a comment - Hmm, seems I forgot to install the plugin before I tested it... We'll include it in our 1.9.2 release. Thanks!
        Hide
        Arnaud Heritier added a comment -

        Applied. Thanks.

        Show
        Arnaud Heritier added a comment - Applied. Thanks.

          People

          • Assignee:
            Arnaud Heritier
            Reporter:
            Ignacio G. Mac Dowell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: