I have a bamboo plan with Maven task:
verify -B -Dsonar.branch=${bamboo.repository.branch.name}
the problem is that we have a git branch name that contains a '/': "feature/CATALOG", and this is not a valid sonar.branch name. If I would be running a script task instead of a Maven task, I would replace / by _ as follows:
mvn verify -B -Dsonar.branch=$(echo ${bamboo.repository.branch.name} | tr / _
Is there a way to achieve this with a Maven task? that is, is it possible to change a variable with a regex or something else?
ps: I am aware that bamboo is a bad choice, and we are eventually moving to jenkins. however we still need to use bamboo for a while.