Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1, 1.8
    • Fix Version/s: 1.9
    • Component/s: maven-scm-provider-svn
    • Labels:
      None
    • Environment:
      Windows xp, maven 2.0.9

      Description

      I have a need to use the SCM api to manipulate a local svn copy, but the svn provider can only work with remote copies.

      e.g. "svn info ." to get the reposirory URL etc from what Subversion has and not what you think it is.

      If you pass in a file:// URL it treats this as a repository and not a local copy - but if you don't use a url prefix and pass in just the path it fails to parse the URL in SvnScmProviderRepository.parseURL().

      The current workaround is to provide a custom SvnScmProviderRepository which overrides getURL to return the path which shows that the info command and others can work like this (however this obviously breaks anything that uses local file based repositories!)

      1. svnexe.diff
        0.9 kB
        James Nord

        Issue Links

          Activity

          James Nord created issue -
          Hide
          Dan Tran added a comment -
          Show
          Dan Tran added a comment - initial discussion link http://www.nabble.com/Maven-SCM---SVN-provider-td21358219.html
          Hide
          James Nord added a comment -

          Digging into this a bit more all I think is needed is changing lines 155-157 of SvnSCMProviderRepository.java from

          if ( getProtocol() == null )

          { return; }

          to

          if ( getProtocol() == null )
          {
          File f = new File(url);
          if (f.exists) {
          this.url = url;
          // can not have hosts etc in local paths so just return or surround the later code with an else

          {...}

          return;
          }
          return;
          }

          Show
          James Nord added a comment - Digging into this a bit more all I think is needed is changing lines 155-157 of SvnSCMProviderRepository.java from if ( getProtocol() == null ) { return; } to if ( getProtocol() == null ) { File f = new File(url); if (f.exists) { this.url = url; // can not have hosts etc in local paths so just return or surround the later code with an else {...} return; } return; }
          Hide
          Dan Tran added a comment -

          I think http://jira.codehaus.org/browse/SCM-433 solves your case where you only want to do svn info project.getBasedir()

          Show
          Dan Tran added a comment - I think http://jira.codehaus.org/browse/SCM-433 solves your case where you only want to do svn info project.getBasedir()
          Hide
          James Nord added a comment -

          I will try that when it is released.

          Show
          James Nord added a comment - I will try that when it is released.
          Hide
          James Nord added a comment -

          Looking at that I don't think it will help as I am still required to pass in a ProviderRepository. If you pass in null (work it out) an exception is thrown.

          Show
          James Nord added a comment - Looking at that I don't think it will help as I am still required to pass in a ProviderRepository. If you pass in null (work it out) an exception is thrown.
          Hide
          James Nord added a comment -

          Digging through the code it seems like this should be supported and ends up in getRepositoryURL in SvnExeScmProvider.

          However this calls info which goes out and into AbstractCommand.execute(...) which does a check against the repo.

          I beleive this should call the info command directly.
          .

          Show
          James Nord added a comment - Digging through the code it seems like this should be supported and ends up in getRepositoryURL in SvnExeScmProvider. However this calls info which goes out and into AbstractCommand.execute(...) which does a check against the repo. I beleive this should call the info command directly. .
          Hide
          James Nord added a comment -

          fix for issue

          Show
          James Nord added a comment - fix for issue
          James Nord made changes -
          Field Original Value New Value
          Attachment svnexe.diff [ 41187 ]
          Olivier Lamy (*$^¨%`£) made changes -
          Fix Version/s 1.x [ 13501 ]
          Hide
          Chris Graham added a comment -

          This patch still has not been applied. It is likely to be? Or, is the issue still relevant?

          Show
          Chris Graham added a comment - This patch still has not been applied. It is likely to be? Or, is the issue still relevant?
          Robert Scholte made changes -
          Affects Version/s 1.8 [ 18444 ]
          Assignee Robert Scholte [ rfscholte ]
          Fix Version/s 1.9 [ 18783 ]
          Fix Version/s 1.x [ 13501 ]
          Hide
          Robert Scholte added a comment -

          This seems to be the reason why the junit-tests for the maven-scm-publish-plugin fail under Windows.

          Show
          Robert Scholte added a comment - This seems to be the reason why the junit-tests for the maven-scm-publish-plugin fail under Windows.
          Robert Scholte made changes -
          Link This issue is depended upon by MSCMPUB-3 [ MSCMPUB-3 ]
          Show
          Robert Scholte added a comment - Fixed in https://git-wip-us.apache.org/repos/asf/maven-scm/commit/c96ca247 Thanks!
          Robert Scholte made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:22:36 UTC 2015 [ 1428236556206 ]
          Mark Thomas made changes -
          Link This issue is depended upon by MSCMPUB-3 [ MSCMPUB-3 ]
          Mark Thomas made changes -
          Workflow jira [ 12725446 ] Default workflow, editable Closed status [ 12757695 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 01:08:37 UTC 2015 [ 1428282517778 ]
          Mark Thomas made changes -
          Link This issue is depended upon by MSCMPUB-3 [ MSCMPUB-3 ]
          Mark Thomas made changes -
          Workflow jira [ 12963280 ] Default workflow, editable Closed status [ 13000627 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          1409d 2h 30m 1 Robert Scholte 18/Nov/12 10:26

            People

            • Assignee:
              Robert Scholte
              Reporter:
              James Nord
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development