Maven JXR
  1. Maven JXR
  2. JXR-87

Change line number anchor name pattern

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.4
    • Component/s: jxr
    • Labels:
      None
    • Environment:
      Site plugin 2.2
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Linenumber achor anames are solely the line number but this brings problems. Then linking in APT to source code, it complains:

      [WARNING] [APT Parser] Modified invalid link: '77' to '../kcc-core/xref/package/Object.html#a77'
      

      This means that I am not able to link to lines anymore. Change the anchor name pattern to L\d+

      1. JXR-87.patch
        0.7 kB
        Michael Osipov

        Activity

        Show
        Michael Osipov added a comment - The suspicious line is: http://svn.apache.org/viewvc/maven/jxr/tags/jxr-2.2/maven-jxr/src/main/java/org/apache/maven/jxr/JavaCodeTransform.java?view=markup#l375
        Hide
        Neeme Praks added a comment -

        Your patch will break all the links out there that rely on the current format. I would suggest to include a configuration option to restore the old behavior for people that cannot update all the other systems that rely on the old format. But new format should be default as the current format is broken (see also http://stackoverflow.com/questions/7110556/is-it-valid-to-use-only-digits-as-uri-fragment-identifier)

        Show
        Neeme Praks added a comment - Your patch will break all the links out there that rely on the current format. I would suggest to include a configuration option to restore the old behavior for people that cannot update all the other systems that rely on the old format. But new format should be default as the current format is broken (see also http://stackoverflow.com/questions/7110556/is-it-valid-to-use-only-digits-as-uri-fragment-identifier )
        Hide
        Michael Osipov added a comment -

        True, but it was broken anyway. Doxia was broken too before Maven 2.2.x. That's the reason I created this patch. Btw, for those who upgrade from Maven 2.0 to 2.2 they see broken links too. So in my opinion there is little harm.

        Show
        Michael Osipov added a comment - True, but it was broken anyway. Doxia was broken too before Maven 2.2.x. That's the reason I created this patch. Btw, for those who upgrade from Maven 2.0 to 2.2 they see broken links too. So in my opinion there is little harm.
        Hide
        Michael Osipov added a comment -

        Is anyone opposed to fix this after more than two years? I will apply this patch and target it for the next release. Those who care for compat should read CHANGES anyway.

        Show
        Michael Osipov added a comment - Is anyone opposed to fix this after more than two years? I will apply this patch and target it for the next release. Those who care for compat should read CHANGES anyway.
        Hide
        Michael Osipov added a comment -

        Retargeting fix for 2.4.

        Show
        Michael Osipov added a comment - Retargeting fix for 2.4.
        Hide
        Michael Osipov added a comment -

        Fixed with r1544832.

        Show
        Michael Osipov added a comment - Fixed with r1544832.

          People

          • Assignee:
            Michael Osipov
            Reporter:
            Michael Osipov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: