maven-mvnd: Second "clean" build in fails on Windows due to locked files
In Quarkus, first mvnd -Dquickly is ok, but any subsequent run yields:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project quarkus-builder: Failed to clean project: Failed to delete C:\_dev\git\quarkus\core\builder\target\quarkus-builder-999-SNAPSHOT.jar -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project arc: Failed to clean project: Failed to delete C:\_dev\git\quarkus\independent-projects\arc\runtime\target\arc-999-SNAPSHOT.jar -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project quarkus-development-mode-spi: Failed to clean project: Failed to delete C:\_dev\git\quarkus\core\devmode-spi\target\quarkus-development-mode-spi-999-SNAPSHOT.jar -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project quarkus-bootstrap-app-model: Failed to clean project: Failed to delete C:\_dev\git\quarkus\independent-projects\bootstrap\app-model\target\quarkus-bootstrap-app-model-999-SNAPSHOT.jar -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean (default-clean) on project quarkus-bootstrap-runner: Failed to clean project: Failed to delete C:\_dev\git\quarkus\independent-projects\bootstrap\runner\target\quarkus-bootstrap-runner-999-SNAPSHOT.jar -> [Help 1]
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 28 (22 by maintainers)
Hi,
On our projet, first build ok but next one fails on locked files.
Also, when trying to mvnd clean or mvn clean or even trying manually, the target folder on some sub projects could not be deleted. Windows keeps complaining that I need administrator authorisation (which I do have).
I will try finding which files are causing this using the file leak detector.
Maybe a Quarkus component is leaking file handles?
I tried attaching https://file-leak-detector.kohsuke.org/ but the build died in some groovy related plugin and I haven’t had time yet to investigate.
Update: I’ve just tried
mvndin my current internal project (that is using Quarkus) and it fails there as well. (certain project artifact jars are still open)