radughiorma opened a new issue, #220:
URL: https://github.com/apache/maven-build-cache-extension/issues/220
### Affected version
1.2.0
### Bug description
Maven clean works and build is in success.
```shell
mvn clean -Dmaven.build.cache.failFast=false
```
```text
[INFO] Loading cache configuration from
[EDITED]\build-cache-clean-issue\.mvn\maven-build-cache-config.xml
[INFO] Using XX hash algorithm for cache
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.example:build-cache-clean-issue
>-----------------
[INFO] Building build-cache-clean-issue 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar
]---------------------------------
[INFO]
[INFO] --- clean:3.4.0:clean (default-clean) @ build-cache-clean-issue
---
[INFO] Deleting [EDITED]\build-cache-clean-issue\target
[INFO] Cannot save project in cache, skipping
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 0.242 s
[INFO] Finished at: 2025-06-07T11:19:03+03:00
[INFO]
------------------------------------------------------------------------
```
Maven clean fails when
[build-cache-clean-issue.zip](https://github.com/user-attachments/files/20637748/build-cache-clean-issue.zip)
```shell
mvn clean -Dmaven.build.cache.failFast=true
```
```text
[INFO] Loading cache configuration from
[EDITED]\build-cache-clean-issue\.mvn\maven-build-cache-config.xml
[INFO] Using XX hash algorithm for cache
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.example:build-cache-clean-issue
>-----------------
[INFO] Building build-cache-clean-issue 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar
]---------------------------------
[INFO]
[INFO] --- clean:3.4.0:clean (default-clean) @ build-cache-clean-issue
---
[INFO] Deleting [EDITED]\build-cache-clean-issue\target
[INFO] Cannot save project in cache, skipping
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 0.246 s
[INFO] Finished at: 2025-06-07T11:07:04+03:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to restore project[com.example:build-cache-clean-issue]
from cache, failing build.
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
Process finished with exit code 1
```
Why is cache report created by maven clean goal?
[maven-incremental](target/maven-incremental)
--
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]