// 4. determine new project variant
String stage = StringHelper.split(pv.getName(), "_")[0];
ProjectVariant newPv = project.getProjectVariantByName(stage + "_viewlabels_and_messages_xml");
// 5. create new setting
PublicationSetting newCombination = publPackage.addSetting(newPv, lv, pv);
// 6. further action with newCombination
} // end for combinations
} // end for packages
}