Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-338

NullPointerException when using -DvssDirectory to set ss.exe path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.1
    • maven-scm-provider-vss
    • None
    • Windows XP, JRE 1.4.2
    • Patch

    Description

      NullPointerException occurs with any SCM operation when there is no ~/.scm/vss-settings.xml file, and when the vssDirectory system property is set:

      Caused by: java.lang.NullPointerException
              at org.apache.maven.scm.provider.vss.commands.VssCommandLineUtils.getSettings(VssCommandLineUtils.java:137)
              at org.apache.maven.scm.provider.vss.commands.VssCommandLineUtils.getSsDir(VssCommandLineUtils.java:145)
              at org.apache.maven.scm.provider.vss.commands.changelog.VssHistoryCommand.buildCmdLine(VssHistoryCommand.java:91)
              at org.apache.maven.scm.provider.vss.commands.changelog.VssHistoryCommand.executeChangeLogCommand(VssHistoryCommand.java:53)
              at org.apache.maven.scm.command.changelog.AbstractChangeLogCommand.executeCommand(AbstractChangeLogCommand.java:101)
              at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:58)
              ... 21 more
      

      This error is easily replicated using the attached project vssproviderbug.zip. Unzip the archive and run

      mvn scm:changelog -DvssDirectory=something -e
      

      Assuming the file ~/.scm/vss-settings.xml does not exist, you should see the above error in the stack traces. Note that you don't need VSS installed (or even to be on Windows) in order to replicate the error - Maven doesn't actually get as far as making a call to ss.exe.

      Attachments

        1. SCM-338-[02]-maven-scm-provider-vss.patch
          6 kB
          Allan Lang
        2. SCM-338-maven-scm-provider-vss.patch
          0.6 kB
          Allan Lang
        3. vssproviderbug.zip
          3 kB
          Allan Lang

        Activity

          People

            evenisse Emmanuel Venisse
            allanlang Allan Lang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: