Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3354

mvn.bat incorrectly detects OS on Windows NT or XP with Novell login

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.8
    • 2.0.9, 3.0-alpha-1
    • Command Line
    • None
    • Patch

    Description

      On Windows NT or XP with Novell Client Login mvn.bat incorrectly selects OS as Win9x, because Novell sets OS environment variable to WINNT instead of Windows_NT.
      As a result it processes command line arguments as in windows 9x, what is very inconvenient because all arguments with = (equals) sign must be quoted on command line. For example -DdownloadSources=true must be quoted as "-DdownloadSources=true".

      The reason for such behaviour is that mvn.bat checks in several places if "%OS%"=="Windows_NT" and this statement yields false on windows with novell login. On winnt with novell login OS is set to WINNT instead of Windows_NT.

      I attached corrected mvn.bat and mvnDebug.bat that check additionally for "%OS%"=="WINNT".

      Attachments

        1. mvnDebug.bat
          6 kB
          Jaroslaw Bojar
        2. mvn.bat
          5 kB
          Jaroslaw Bojar

        Activity

          People

            jdcasey John Dennis Casey
            jarr Jaroslaw Bojar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: