olamy commented on code in PR #534:
URL:
https://github.com/apache/maven-build-cache-extension/pull/534#discussion_r4013637641
##########
src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java:
##########
@@ -665,7 +676,59 @@ private static boolean isReadable(Path entry) throws
IOException {
}
private SortedMap<String, String> getMutableDependencies() throws
IOException {
- return getMutableDependenciesHashes("", project.getDependencies());
+ SortedMap<String, String> hashes = getMutableDependenciesHashes("",
project.getDependencies());
+ if (project.getDependencies().isEmpty()) {
+ return hashes;
+ }
+
+ // Collect through Maven so dependency management, exclusions and
scope mediation match the build.
+ // Resolve only additional external snapshots; reactor dependencies
use project checksums.
+ DefaultDependencyResolutionRequest request =
+ new DefaultDependencyResolutionRequest(project,
session.getRepositorySession());
+ request.setResolutionFilter((node, parents) -> {
Review Comment:
there should be filtering here. for main source we do not need to check
`test` scope dependencies. Any change in test dependencies will invalidate the
cache for src/main
--
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]