Skip to content

Commit

Permalink
Handle shortened form of Maven parent.version and project.artifactId
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider authored Apr 24, 2023
1 parent 76e3036 commit defbc7c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,21 @@ private String getProperty(@Nullable String property) {
case "pom.groupId":
return requested.getGroupId();
case "project.parent.groupId":
case "parent.groupId":
return requested.getParent() != null ? requested.getParent().getGroupId() : null;
case "artifactId":
case "project.artifactId":
case "pom.artifactId":
return requested.getArtifactId(); // cannot be inherited from parent
case "project.parent.artifactId":
case "parent.artifactId":
return requested.getParent() == null ? null : requested.getParent().getArtifactId();
case "version":
case "project.version":
case "pom.version":
return requested.getVersion();
case "project.parent.version":
case "parent.version":
return requested.getParent() != null ? requested.getParent().getVersion() : null;
}

Expand Down

0 comments on commit defbc7c

Please sign in to comment.