Skip to content

Commit

Permalink
[jlink] fix model props resolution. Fixes #753
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 15, 2022
1 parent cd40677 commit 9870212
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ void setAll(Jlink jlink) {
}

public String getResolvedImageName(JReleaserContext context) {
Map<String, Object> props = context.props();
Map<String, Object> props = context.getModel().props();
props.putAll(props());
return resolveTemplate(imageName, props);
}

public String getResolvedImageNameTransform(JReleaserContext context) {
if (isBlank(imageNameTransform)) return null;
Map<String, Object> props = context.props();
Map<String, Object> props = context.getModel().props();
props.putAll(props());
return resolveTemplate(imageNameTransform, props);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ void setAll(NativeImage nativeImage) {
}

public String getResolvedImageName(JReleaserContext context) {
Map<String, Object> props = context.props();
Map<String, Object> props = context.getModel().props();
props.putAll(props());
return resolveTemplate(imageName, props);
}

public String getResolvedImageNameTransform(JReleaserContext context) {
if (isBlank(imageNameTransform)) return null;
Map<String, Object> props = context.props();
Map<String, Object> props = context.getModel().props();
props.putAll(props());
return resolveTemplate(imageNameTransform, props);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public static void validateProject(JReleaserContext context, JReleaserContext.Mo
"project.snapshot.label",
project.getSnapshot().getLabel(),
DEFAULT_SNAPSHOT_LABEL));
// eager resolve
project.getSnapshot().getResolvedLabel(context.getModel());

project.getSnapshot().setFullChangelog(
checkProperty(context,
Expand Down

0 comments on commit 9870212

Please sign in to comment.