Maven SCM
  1. Maven SCM
  2. SCM-292

Replace DEFAULT_CLIENTSPEC_PROPERTY system property by a map to store in memory clientspec names

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: 1.0-beta-4
    • Fix Version/s: 1.x
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      With a Map instead of a system property, we'll can support more that one clientspec in the jvm. It's necessary for Continuum because it access to more than one project in Perforce.

        Activity

        Hide
        Mike Perham added a comment -

        I don't see any way to support multiple clientspecs without explicit support in Continuum and SCM. We need support for ad hoc variables associated with a build which can be passed to the provider. The system property is a hack which obviously doesn't scale.

        Show
        Mike Perham added a comment - I don't see any way to support multiple clientspecs without explicit support in Continuum and SCM. We need support for ad hoc variables associated with a build which can be passed to the provider. The system property is a hack which obviously doesn't scale.
        Hide
        Emmanuel Venisse added a comment -

        Possible solution without modification in continuum:

        instead of system property, we can store the clientspec in $

        {user.home}

        /.scm/perforce.xml (other providers use a xml file to configure the provider too)
        In this file we store a mapping between the scmurl and the clientspec

        <settings>
            <clientSpecMappings>
                <clientSpecMapping>
                    <scmUrl>scm:perforce:username@host:port:path_to_repository1</scmUrl>
                    <clientSpecName>username-host-MavenSCM-path-to-repo1</clientSpecName>
                </clientSpecMapping>
                <clientSpecMapping>
                    <scmUrl>scm:perforce:username@host:port:path_to_repository2</scmUrl>
                    <clientSpecName>username-host-MavenSCM-path-to-repo2</clientSpecName>
                </clientSpecMapping>
            </clientSpecMappings>
        </settings>
        

        and in PerforceScmProvider.getClientspecName(...) we return the clientSpecName from the xml file. If if doesn't exist, we generate a default name and we store it in the xml file.

        WDYT?

        Show
        Emmanuel Venisse added a comment - Possible solution without modification in continuum: instead of system property, we can store the clientspec in $ {user.home} /.scm/perforce.xml (other providers use a xml file to configure the provider too) In this file we store a mapping between the scmurl and the clientspec <settings> <clientSpecMappings> <clientSpecMapping> <scmUrl>scm:perforce:username@host:port:path_to_repository1</scmUrl> <clientSpecName>username-host-MavenSCM-path-to-repo1</clientSpecName> </clientSpecMapping> <clientSpecMapping> <scmUrl>scm:perforce:username@host:port:path_to_repository2</scmUrl> <clientSpecName>username-host-MavenSCM-path-to-repo2</clientSpecName> </clientSpecMapping> </clientSpecMappings> </settings> and in PerforceScmProvider.getClientspecName(...) we return the clientSpecName from the xml file. If if doesn't exist, we generate a default name and we store it in the xml file. WDYT?
        Hide
        Emmanuel Venisse added a comment -

        Mike, ping.

        Show
        Emmanuel Venisse added a comment - Mike, ping.
        Hide
        Raphael PETIT added a comment -

        Currently, each client spec has

        • a root with the unique number at the end
        • a view defined by one line

        Maybe, it can be changed to a unique client spec

        • a root (global definition)
        • a view defined by several line the unique number at the end

        So things seems to be manageable without continnum concept in the scm...

        Show
        Raphael PETIT added a comment - Currently, each client spec has a root with the unique number at the end a view defined by one line Maybe, it can be changed to a unique client spec a root (global definition) a view defined by several line the unique number at the end So things seems to be manageable without continnum concept in the scm...
        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.

        Assignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.

        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. Assignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.

          People

          • Assignee:
            Patrick Schneider
            Reporter:
            Emmanuel Venisse
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: