Skip to content

Commit

Permalink
[MNG-7255] Infer groupId for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Aug 30, 2024
1 parent a98d530 commit dd5c319
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,15 @@ void handleCiFriendlyVersion(ModelTransformerContext context, Model model, Path
void handleReactorDependencies(ModelTransformerContext context, Model model, Path pomFile, Model.Builder builder) {
List<Dependency> newDeps = new ArrayList<>();
boolean modified = false;
String groupId = model.getGroupId();
if (groupId == null) {
groupId = model.getParent().getGroupId();
}
for (Dependency dep : model.getDependencies()) {
if (dep.getGroupId() == null) {
dep = dep.withGroupId(groupId);
modified = true;
}
if (dep.getVersion() == null) {
Model depModel = context.getRawModel(model.getPomFile(), dep.getGroupId(), dep.getArtifactId());
if (depModel != null) {
Expand Down

0 comments on commit dd5c319

Please sign in to comment.