You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "benoitbr (via GitHub)" <gi...@apache.org> on 2026/03/19 13:24:16 UTC

[I] Test-jar type dependencies fail to be resolved during checksum calculation with -f builds [maven-build-cache-extension]

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: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Test-jar type dependencies fail to be resolved during checksum calculation with -f builds [maven-build-cache-extension]

Posted by "benoitbr (via GitHub)" <gi...@apache.org>.
benoitbr commented on issue #467:
URL: https://github.com/apache/maven-build-cache-extension/issues/467#issuecomment-4090689731

   My AI agent believes the issue could be here:
   
   https://github.com/apache/maven-build-cache-extension/blob/b827d52410d96375e2e5ebafe3b95cf559649809/src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java#L845
   
   If the type of the dependency is `test-jar`, the single-arg constructor of `DefaultArtifactType` will set the extension to `test-jar` instead of `jar`.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Test-jar type dependencies fail to be resolved during checksum calculation with -f builds [maven-build-cache-extension]

Posted by "benoitbr (via GitHub)" <gi...@apache.org>.
benoitbr commented on issue #467:
URL: https://github.com/apache/maven-build-cache-extension/issues/467#issuecomment-4222475362

   Thanks


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Test-jar type dependencies fail to be resolved during checksum calculation with -f builds [maven-build-cache-extension]

Posted by "olamy (via GitHub)" <gi...@apache.org>.
olamy closed issue #467: Test-jar type dependencies fail to be resolved during checksum calculation with -f builds
URL: https://github.com/apache/maven-build-cache-extension/issues/467


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Test-jar type dependencies fail to be resolved during checksum calculation with -f builds [maven-build-cache-extension]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on issue #467:
URL: https://github.com/apache/maven-build-cache-extension/issues/467#issuecomment-4100555236

   And agent is right, that there is wrong.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Test-jar type dependencies fail to be resolved during checksum calculation with -f builds [maven-build-cache-extension]

Posted by "olamy (via GitHub)" <gi...@apache.org>.
olamy commented on issue #467:
URL: https://github.com/apache/maven-build-cache-extension/issues/467#issuecomment-4110146137

   @benoitbr thanks should be fixed with https://github.com/apache/maven-build-cache-extension/pull/468


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org