if (!branches.hasChange()) {
return;
}
logger.debug("changing for " + target.getName() + " branch from " + branches.oldBranch + " to " + branches.newBranch + ", and prefix from " + branches.oldPrefix + " to " + branches.newPrefix);
// change the names of all contained artifacts by replacing the old prefix with the new one
target.visitAllArtifacts(new Grouping.ArtifactVisitListener() {
public void visit(Grouping grouping, ArtifactIdentifier oldId) {
String newName = oldId.getName();
if (oldId.getName().startsWith(branches.oldPrefix)) {
newName = branches.newPrefix + oldId.getName().substring(branches.oldPrefix.length());
}