Skip to content

Commit

Permalink
Move DependencyManagement check behind initialisation of the target d…
Browse files Browse the repository at this point in the history
…ependency

To be squashed!
  • Loading branch information
matthiasblaesing committed Dec 21, 2024
1 parent c3ad14c commit 1131ee4
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,23 @@ public List<Dependency> build(Xpp3Dom configRoot, ExpressionEvaluator eval) {
item.setGroupId(g.getValue());
item.setLocation(PROP_GROUP_ID, (InputLocation)g.getInputLocation());
}

if (v != null) {
item.setVersion(v.getValue());
item.setLocation(PROP_VERSION, (InputLocation)v.getInputLocation());
} else if (dependencyManagement != null && dependencyManagement.getDependencies() != null) {
}
if (c != null) {
item.setClassifier(c.getValue());
item.setLocation(PROP_CLASSIFIER, (InputLocation)c.getInputLocation());
}
if (t != null) {
item.setType(t.getValue());
item.setLocation(PROP_TYPE, (InputLocation)t.getInputLocation());
}
if (s != null) {
item.setScope(s.getValue());
item.setLocation(PROP_SCOPE, (InputLocation)s.getInputLocation());
}
if (item.getVersion() == null && dependencyManagement != null && dependencyManagement.getDependencies() != null) {
dependencyManagement
.getDependencies()
.stream()
Expand All @@ -677,18 +689,6 @@ public List<Dependency> build(Xpp3Dom configRoot, ExpressionEvaluator eval) {
item.setLocation(PROP_VERSION, d.getLocation(PROP_VERSION));
});
}
if (c != null) {
item.setClassifier(c.getValue());
item.setLocation(PROP_CLASSIFIER, (InputLocation)c.getInputLocation());
}
if (t != null) {
item.setType(t.getValue());
item.setLocation(PROP_TYPE, (InputLocation)t.getInputLocation());
}
if (s != null) {
item.setScope(s.getValue());
item.setLocation(PROP_SCOPE, (InputLocation)s.getInputLocation());
}
coords.add(item);
}
return coords;
Expand Down

0 comments on commit 1131ee4

Please sign in to comment.