From fb99fb0c4ac47ab82515219d98283688f41ddd2f Mon Sep 17 00:00:00 2001 From: Jan-Jelle Kester Date: Fri, 18 Oct 2024 20:05:40 +0200 Subject: [PATCH] [MNG-8331] - Sometimes versioned dependencies disappear Ensure all dependencies end up in the model --- .../apache/maven/internal/impl/model/DefaultModelBuilder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java b/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java index 38266f30327b..8b24bb4f9daf 100644 --- a/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java +++ b/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java @@ -595,6 +595,8 @@ Model transformFileToRaw(Model model) { } else { newDeps.add(dep); } + } else { + newDeps.add(dep); } } return modified ? model.withDependencies(newDeps) : model;