Properties values = new Properties();
values.setProperty("artifactId", project.getArtifactId());
values.setProperty("groupId", project.getGroupId());
values.setProperty("version", previousVersion);
interpolator.addValueSource(new PrefixedPropertiesValueSource(possiblePrefixes, values, true));
RecursionInterceptor recursionInterceptor = new PrefixAwareRecursionInterceptor(possiblePrefixes);
try {
startTag = interpolator.interpolate(tagNameFormat, recursionInterceptor);
} catch (InterpolationException e) {
throw new MojoExecutionException("Could not interpolate specified tag name format: " + tagNameFormat,
e);
}
}
if (!SNAPSHOT_PATTERN.matcher(project.getVersion()).find()) {
String tagNameFormat = getTagNameFormat(project);
getLog().debug("End Tag name format = " + tagNameFormat);
Interpolator interpolator = new StringSearchInterpolator("@{", "}");
List<String> possiblePrefixes = java.util.Arrays.asList("project", "pom");
Properties values = new Properties();
values.setProperty("artifactId", project.getArtifactId());
values.setProperty("groupId", project.getGroupId());
values.setProperty("version", project.getVersion());
interpolator.addValueSource(new PrefixedPropertiesValueSource(possiblePrefixes, values, true));
RecursionInterceptor recursionInterceptor = new PrefixAwareRecursionInterceptor(possiblePrefixes);
try {
endTag = interpolator.interpolate(tagNameFormat, recursionInterceptor);
} catch (InterpolationException e) {
throw new MojoExecutionException("Could not interpolate specified tag name format: " + tagNameFormat,
e);