Skip to content
Open
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 @@ -795,7 +795,7 @@ protected void gitCreateBranch(final String newBranchName, final String fromBran
* is a string to replace with.
* @return Message with replaced properties.
*/
private String replaceProperties(String message, Map<String, String> map) {
protected String replaceProperties(String message, Map<String, String> map) {
if (map != null) {
for (Entry<String, String> entr : map.entrySet()) {
message = StringUtils.replace(message, "@{" + entr.getKey() + "}", entr.getValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,16 @@ public void execute() throws MojoExecutionException, MojoFailureException {
mvnCleanTest();
}

// maven goals before merge
if (StringUtils.isNotBlank(preReleaseGoals)) {
mvnRun(preReleaseGoals);
}

String currentReleaseVersion = getCurrentProjectVersion();

Map<String, String> messageProperties = new HashMap<>();
messageProperties.put("version", currentReleaseVersion);

// maven goals before merge
if (StringUtils.isNotBlank(preReleaseGoals)) {
mvnRun(replaceProperties(preReleaseGoals, messageProperties));
}

if (useSnapshotInRelease && ArtifactUtils.isSnapshot(currentReleaseVersion)) {
String commitVersion = currentReleaseVersion.replace("-" + Artifact.SNAPSHOT_VERSION, "");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@ public void execute() throws MojoExecutionException, MojoFailureException {
version = defaultVersion;
}

Map<String, String> messageProperties = new HashMap<>();
messageProperties.put("version", version);

// maven goals before release
if (StringUtils.isNotBlank(preReleaseGoals)) {
mvnRun(preReleaseGoals);
mvnRun(replaceProperties(preReleaseGoals, messageProperties));
}

Map<String, String> messageProperties = new HashMap<>();
messageProperties.put("version", version);

// execute if version changed
if (!version.equals(currentVersion)) {
mvnSetVersions(version);
Expand Down