Fix issue #29 "master@maven-native does not build on Windows 10 with VS2017: 8 failed tests".
JUnit tests on Windows are breaking build because org.codehaus.plexus.util.cli.Commandline#getCommandline() has operating system dependent code referencing org.codehaus.plexus.util.Os.FAMILY_WINDOWS.
The fix adds a new reusuable TestUtils#formPlatformCommandline() static function that matches and encapsulates the platform behavior of Commandline#getCommandline(). For example, on windows tacks cmd.exe /X /C on the front of everything.
The new function lives in the new > maven-native-test module to allow reuse by the tests scattered across maven-native's many maven modules.
Tested on Windows 10
$ver
Microsoft Windows [Version 10.0.18363.1440]
and Ubuntu running on the Windows Subsystem for Linux
$ uname -a
Linux DPDL5CG9247TDP 4.4.0-18362-Microsoft #1049-Microsoft Thu Aug 14 12:01:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
Fix issue #29 "master@maven-native does not build on Windows 10 with VS2017: 8 failed tests". JUnit tests on Windows are breaking build because org.codehaus.plexus.util.cli.Commandline#getCommandline() has operating system dependent code referencing org.codehaus.plexus.util.Os.FAMILY_WINDOWS.
The fix adds a new reusuable TestUtils#formPlatformCommandline() static function that matches and encapsulates the platform behavior of Commandline#getCommandline(). For example, on windows tacks cmd.exe /X /C on the front of everything.
The new function lives in the new > maven-native-test module to allow reuse by the tests scattered across maven-native's many maven modules.
Tested on Windows 10 $ver Microsoft Windows [Version 10.0.18363.1440] and Ubuntu running on the Windows Subsystem for Linux $ uname -a Linux DPDL5CG9247TDP 4.4.0-18362-Microsoft #1049-Microsoft Thu Aug 14 12:01:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux