Maven 1.x XDoc Plugin
  1. Maven 1.x XDoc Plugin
  2. MPXDOC-130

CVS Usage Page is blank when using Subversion scm.

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.10
    • Labels:
      None
    • Environment:
      maven-xdoc-1.8
    • Number of attachments :
      2

      Description

      Maven-xdoc-plugin generates mostly empty page if project uses Subversion scm.

      Although maven now can not checkout projects from svn repos, cvs-usage.xml template must generate a command line checkout instructions.

      1. svn.patch
        3 kB
        Evrim ULU
      2. svnv2.patch
        3 kB
        Evrim ULU

        Activity

        Hide
        Evrim ULU added a comment -

        I have tried to add necessary output to velocity macro cvs-usage.xml file. But it seems the following macros are not parsed if scm is svn in project.xml.

        #set ($conn = $repository.getCvsRoot($repository.connection, ''))
        #set ($module = $repository.getCvsModule($repository.connection))

        I couldn't find the repository class in maven repository. If somebody shows me the code, i may alter it to parse it.

        Anyway, i'll continue to examine the code.

        Show
        Evrim ULU added a comment - I have tried to add necessary output to velocity macro cvs-usage.xml file. But it seems the following macros are not parsed if scm is svn in project.xml. #set ($conn = $repository.getCvsRoot($repository.connection, '')) #set ($module = $repository.getCvsModule($repository.connection)) I couldn't find the repository class in maven repository. If somebody shows me the code, i may alter it to parse it. Anyway, i'll continue to examine the code.
        Hide
        Evrim ULU added a comment -

        I was using maven 1.0 and after downloading CVS snapshot, i realized that all maven-scm package is restructured.

        After my observations, there is no method named getSvnRoot() inside maven versions 1.0 and 1.0.1.

        Although situation seems to push me to wait for final-restructured-scm release, a quick hack can be done using jelly.

        Ive seen that scm:parse-connection goal parses svn connection string into tokens. I may try to copy-paste code into xdoc/plugin.jelly and make maven.scm.svn variable available to velocity template. If i move it to xdoc plugin, xdoc can parse the connection string but it obviously results code duplication.

        Anyway, this will be quick hack, not a real solution. After new maven scm release, problem will be solved simply by calling scm-provider-specific methods ie getCvsRoot(), getSvnRoot().

        Show
        Evrim ULU added a comment - I was using maven 1.0 and after downloading CVS snapshot, i realized that all maven-scm package is restructured. After my observations, there is no method named getSvnRoot() inside maven versions 1.0 and 1.0.1. Although situation seems to push me to wait for final-restructured-scm release, a quick hack can be done using jelly. Ive seen that scm:parse-connection goal parses svn connection string into tokens. I may try to copy-paste code into xdoc/plugin.jelly and make maven.scm.svn variable available to velocity template. If i move it to xdoc plugin, xdoc can parse the connection string but it obviously results code duplication. Anyway, this will be quick hack, not a real solution. After new maven scm release, problem will be solved simply by calling scm-provider-specific methods ie getCvsRoot(), getSvnRoot().
        Hide
        Evrim ULU added a comment -

        Attached patch parses svn <connection> string from pom and inserts it into generated cvs-usage.html.

        It does not implement a parser for <developerConnection> string because i am bored that jelly does not have a regexp token replacer.

        As I have discussed this patch must be updated according to new scm structure. I will be easier than my hacking effort.

        Show
        Evrim ULU added a comment - Attached patch parses svn <connection> string from pom and inserts it into generated cvs-usage.html. It does not implement a parser for <developerConnection> string because i am bored that jelly does not have a regexp token replacer. As I have discussed this patch must be updated according to new scm structure. I will be easier than my hacking effort.
        Hide
        Evrim ULU added a comment -

        svn.patch attachment seems to resolve the issue.

        Show
        Evrim ULU added a comment - svn.patch attachment seems to resolve the issue.
        Hide
        Evrim ULU added a comment -

        Ive forgotten a dot char in the output. Hope this night will end

        Show
        Evrim ULU added a comment - Ive forgotten a dot char in the output. Hope this night will end
        Hide
        Lukas Theussl added a comment -

        Reopened to review patch

        Show
        Lukas Theussl added a comment - Reopened to review patch
        Hide
        Lukas Theussl added a comment -

        Patch is not directly applicable anymore (i18n), need to make ScmUtil SVN-aware.

        Show
        Lukas Theussl added a comment - Patch is not directly applicable anymore (i18n), need to make ScmUtil SVN-aware.
        Hide
        Brett Porter added a comment -

        Vincent S has done a fantastic job on this for the Maven 2.x plugin. Please investigate some way of reusing that, it greatly pains me to see so much duplicate work

        Show
        Brett Porter added a comment - Vincent S has done a fantastic job on this for the Maven 2.x plugin. Please investigate some way of reusing that, it greatly pains me to see so much duplicate work
        Hide
        Lukas Theussl added a comment -

        Yes, I am aware of that. I forgot to mention to make it at least compatible with the m2 layout. Thanks!

        Show
        Lukas Theussl added a comment - Yes, I am aware of that. I forgot to mention to make it at least compatible with the m2 layout. Thanks!

          People

          • Assignee:
            Lukas Theussl
            Reporter:
            Evrim ULU
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: