[ 
https://issues.apache.org/jira/browse/SUREFIRE-1623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16753927#comment-16753927
 ] 

Chris Graham commented on SUREFIRE-1623:
----------------------------------------

As noted, this occurs only on Windows. Surefire creates this file, indirectly. 
Please see:

[ProcessInfo 
windows()|https://gitbox.apache.org/repos/asf?p=maven-surefire.git;a=blob;f=surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java;h=d69c41939b6f5747941c2f8c9cd07dd40420962f;hb=HEAD#l193]

When this is executed the file TempWmicBatchFile.bat is created, and remains 
behind. This needs to be deleted post execution.

For reference, and a possible solution see 
[https://stackoverflow.com/questions/12391655/prevent-wmic-exe-from-writing-tempwmicbatchfile-bat].

If the ProcessInfoConsumer() has change, then this is a regression.

> TempWmicBatchFile.bat is left in project dirs after surefire tests are run
> --------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1623
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1623
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 3.0.0-M3
>            Reporter: Chris Graham
>            Priority: Blocker
>
> WINDOWS ONLY:
> When the WMIC command it run to obtain the process start time, the current 
> implementation leaves behind a batch file, TempWmicBatchFile.bat, which is 
> zero bytes long.
> This file needs to be removed post execution.
> Leaving it behind will interfere with the release plugin as a scm status call 
> will fail with files needing to be added. Simply ignoring the file is a very 
> sloppy approach.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to