/** * Get groupId of artifact. If artifact doesn't have groupId this method checks parent artifact * for groupId. */ public static String getGroupId(Model model) { String groupId = model.getGroupId(); if (groupId == null) { final Parent parent = model.getParent(); if (parent != null) { groupId = parent.getGroupId(); } } return groupId; }