Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public abstract class AbstractRewritePomsPhase extends AbstractReleasePhase impl
* Regular expression pattern matching Maven expressions (i.e. references to Maven properties).
* The first group selects the property name the expression refers to.
*/
private static final Pattern EXPRESSION_PATTERN = Pattern.compile("\\$\\{(.+?)\\}");
private static final Pattern EXPRESSION_PATTERN = Pattern.compile("\\$\\{(.+)\\}");

/**
* All Maven properties allowed to be referenced in parent versions via expressions
Expand Down Expand Up @@ -462,7 +462,7 @@ private void rewriteVersion(
*/
public static String extractPropertyFromExpression(String expression) {
Matcher matcher = EXPRESSION_PATTERN.matcher(expression);
if (!matcher.find()) {
if (!matcher.matches()) {
return null;
}
return matcher.group(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void setVersion(String version) {
AbstractRewritePomsPhase.extractPropertyFromExpression(versionElement.getTextNormalize());
Properties properties = getProperties();
if (properties != null) {
properties.setProperty(ciFriendlyPropertyName, version);
properties.computeIfPresent(ciFriendlyPropertyName, (k, v) -> version);
}
} else {
JDomUtils.rewriteValue(versionElement, version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</scm>

<properties>
<revision>1.0</revision>
<revision>1.0-SNAPSHOT</revision>
</properties>

<modules>
Expand Down