List<MavenCompilerTask> (DataContext context) { final List<String> goals = MavenDataKeys.MAVEN_GOALS.getData(context); if (goals == null || goals.isEmpty()) return Collections.emptyList(); MavenProject project = MavenActionUtil.getMavenProject(context); if (project == null) return Collections.emptyList(); List<MavenCompilerTask> result = new ArrayList<>(); for (String each : goals) { result.add(new MavenCompilerTask(project.getPath(), each)); } return result; }