@Override
  public void execute() throws MojoExecutionException, MojoFailureException {
    Preconditions.checkNotNull(lifecycleExecutor);
    Preconditions.checkNotNull(session);
    checkJibVersion();

    MavenExecutionPlan mavenExecutionPlan;
    try {
      mavenExecutionPlan = lifecycleExecutor.calculateExecutionPlan(session, "package");
    } catch (Exception ex) {
      throw new MojoExecutionException("failed to calculate execution plan", ex);
    }

    mavenExecutionPlan.getMojoExecutions().stream()
        .filter(mojoExecution -> "package".equals(mojoExecution.getLifecyclePhase()))
        .filter(
            mojoExecution ->
                MavenProjectProperties.PLUGIN_NAME.equals(
                    mojoExecution.getPlugin().getArtifactId()))
        .map(MojoExecution::getGoal)
        .forEach(System.out::println);
  }
Print out all jib goals tied to the package phase. Useful in multimodule situations to determine
if the correct jib goals are configured when running skaffold. For use only within skaffold.

<p>It is intended to be used from the root project and only in multimodule situations:

<p>./mvnw jib:_skaffold-package-goals -q -pl module [-Pprofile]
jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/PackageGoalsMojo.java