Collection<String> (ConvertContext context) { MavenDomPluginModel model = MavenPluginDomUtil.getMavenPluginModel(context.getInvocationElement()); if (model == null) return Collections.emptyList(); List<String> result = new ArrayList<>(); for (MavenDomMojo each : model.getMojos().getMojos()) { String goal = each.getGoal().getStringValue(); if (goal != null) result.add(goal); } return result; }