Tibor17 commented on PR #3252: URL: https://github.com/apache/maven-surefire/pull/3252#issuecomment-3902622075
@olamy @slachiewicz I will have a look into these changes. But I agree to discuss it on the mailing list. Of course, there's a compromise. There are several notices on my side: 1. We have also customers with old Windows systems: Windows XP, Windows Server. 2. It is not true that the `PowerShell` is the only solution because not everybody wants to install it nor installed it yet. 3. It is true that using OS-naturally native commands we are significantly mitigating the risk (the risk that some native binary is not recognized). 4. It is true that the [ProcessHandle](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ProcessHandle.html) is **totally avoiding** this issue. Unlikely the PS or WMIC or PowerShell commands which are only at the mitigation phase - there is always some risk but it is minimum. 5. It is true that using a kind of Java reflection (or a modern [MethodHandle](https://docs.oracle.com/javase/8/docs/api/java/lang/invoke/MethodHandle.html)) we can call [ProcessHandle](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ProcessHandle.html) without any problem even on Java 8 build process of this project (customer's build process is different story - there **ProcessHandle** can be activated). 6. If we do not want to switch to Java 9, I am fine with that, but then we have to continue in the risk mitigation and we should not push the customer to something he does not like and it is reinstallation of only systems with PowerShell (which might not be installable). In this case adding PowerShell is okay but we have to keep WMIC for old Windows systems, and PS for *Nix systems. Due to the Java 9 API is simple, and it is simple to call (in principal) `ProcessHandle.of(PPID).isAlive()` via the reflection - we have these experiences, we can switch from **risk mitigation** to a **guarantee**. Since of Maven 4, we can delete all of these PowerShell, WMIC, PS commands and call `ProcessHandle.of(PPID).isAlive()` without reflection - trivial. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
