Skip to content

Commit

Permalink
Improvement e-gineering#131': Allow property mapper to set empty prop…
Browse files Browse the repository at this point in the history
…erties
  • Loading branch information
Hierlmeier, Richard committed Apr 18, 2023
1 parent feff4cb commit f0418ae
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ protected void execute(final GitBranchInfo gitBranchInfo) throws MojoExecutionEx
for(PropertyMapper pm : branchNamePropertyMappers)
{
String mappedValue = pm.map(gitBranchInfo);
getLog().info("Mapper [" + pm.getPropertyName() + "] mapped Git branch name [" + gitBranchInfo.getName() + "] to [" + mappedValue + "]");
if(StringUtils.isBlank(mappedValue)) {
getLog().warn("Mapper for property [" + pm.getPropertyName() + "] did not provide a value, ignoring it");
continue;
}
getLog().info("Mapped Git branch name [" + gitBranchInfo.getName() + "] for property [" + pm.getPropertyName() +"] to [" + mappedValue + "]");
project.getProperties().setProperty(pm.getPropertyName(), mappedValue);
}
}
Expand Down

0 comments on commit f0418ae

Please sign in to comment.