benoitbr opened a new issue, #467:
URL: https://github.com/apache/maven-build-cache-extension/issues/467

   ### Affected version
   
   1.2.2, 1.2.1
   
   ### Bug description
   
   Building a sub-module with `mvn -f <submodule>` fails when that module 
depends on a `test-jar` artifact from another module. The build cache 
extension's checksum calculation cannot resolve the `test-jar` dependency, even 
though the artifact is correctly installed in the local Maven repository.
   
   Full reactor builds are **not** affected.
   
   ### Error
   
   ```
   [ERROR] Failed to calculate checksums for module-b:
     org.eclipse.aether.resolution.ArtifactResolutionException:
     The following artifacts could not be resolved:
     com.example:module-a:test-jar:1.0.0-SNAPSHOT (absent):
     Could not find artifact com.example:module-a:test-jar:1.0.0-SNAPSHOT
   ```
   
   ### Steps to reproduce
   
   Minimal reproducer project: 
[cache-testjar-reproducer.zip](https://github.com/user-attachments/files/26115445/cache-testjar-reproducer.zip)
   
   ```bash
   # 1. Full reactor build — succeeds
   mvn clean install
   
   # 2. Build only module-b with -f — FAILS
   mvn -f module-b clean install
   
   # 3. Disabling the cache proves the extension is the culprit
   mvn -f module-b clean install -Dmaven.build.cache.enabled=false  # succeeds
   ```
   
   ### Environment
   
   - maven-build-cache-extension: **1.2.2** and **1.2.1**
   - Maven: 3.9.14
   
   ## Related issues
   
   - #422 — closed as duplicate of #417, but the fix in PR #419 only addressed 
system-scoped and dynamic-version cases
   - #379 — PR that introduced the regression in snapshot artifact resolution
   


-- 
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]

Reply via email to