[ https://issues.apache.org/jira/browse/MNG-8211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17873988#comment-17873988 ]
ASF GitHub Bot commented on MNG-8211: ------------------------------------- laeubi commented on code in PR #1656: URL: https://github.com/apache/maven/pull/1656#discussion_r1718560854 ########## maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java: ########## @@ -158,6 +160,16 @@ public Object getValue(String expression) { // Overwrite existing values in model properties. Otherwise it's not possible // to define them via command line e.g.: mvn -Drevision=6.5.7 ... versionProcessor.overwriteModelProperties(modelProperties, config); + String version = model.getVersion(); + if (version != null && version.startsWith("${") && version.endsWith("}")) { + String property = version.substring(2, version.length() - 1); + if (!modelProperties.containsKey(property)) { + problems.add(new ModelProblemCollectorRequest(ModelProblem.Severity.FATAL, ModelProblem.Version.BASE) + .setMessage("Model '" + model.getId() + "' uses CI Friendly Versions expression '${" + property + + "}' without value being set") Review Comment: ```suggestion .setMessage("Project '" + model.getId() + "' uses versions expression '" + version + "' but a value is not defined") ``` > Maven should fail builds that use CI Friendly versions but have no values set > ----------------------------------------------------------------------------- > > Key: MNG-8211 > URL: https://issues.apache.org/jira/browse/MNG-8211 > Project: Maven > Issue Type: Bug > Components: Core > Reporter: Tamas Cservenak > Priority: Major > Fix For: 3.9.10 > > > As otherwise it is just source of confusion, Maven will "happily" install and > deploy artifacts as {{G:A:$revision}} and this is 100% NOT what users wants. -- This message was sent by Atlassian Jira (v8.20.10#820010)