Maven 2 & 3

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.8
  • Fix Version/s: 2.0.9, 3.0-alpha-1
  • Component/s: Command Line
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

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".

  1. mvn.bat
    10/Jan/08 5:52 AM
    5 kB
    Jaroslaw Bojar
  2. mvnDebug.bat
    10/Jan/08 5:52 AM
    6 kB
    Jaroslaw Bojar

Activity

Hide
John Casey added a comment -

Patch applied, thanks.

Incidentally, I don't have a copy of windows here, so if someone could try this and reopen it if it doesn't work, I'd appreciate it!

Show
John Casey added a comment - Patch applied, thanks. Incidentally, I don't have a copy of windows here, so if someone could try this and reopen it if it doesn't work, I'd appreciate it!
Hide
Jaroslaw Bojar added a comment -

OK. It works fine.

Show
Jaroslaw Bojar added a comment - OK. It works fine.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: