diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java index 6ff36b499e..fc09890ea6 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java @@ -156,7 +156,7 @@ public class StringSearchModelInterpolator if ( String.class == type ) { String value = (String) fields[i].get( target ); - if ( value != null ) + if ( value != null && !Modifier.isFinal( fields[i].getModifiers() ) ) { String interpolated = modelInterpolator.interpolateInternal( value, valueSources, postProcessors, @@ -330,11 +330,6 @@ public class StringSearchModelInterpolator return false; } - if ( Modifier.isFinal( field.getModifiers() ) ) - { - return false; - } - return true; }