Repository: GoogleContainerTools/jib
File: jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/JibPluginConfiguration.java (Java)

Code before:

  // this parameter is cloned in FilesMojo
  @Parameter private ExtraDirectoriesParameters extraDirectories = new ExtraDirectoriesParameters();

  @Parameter private DockerClientParameters dockerClient = new DockerClientParameters();

  @Parameter private OutputPathsParameters outputPaths = new OutputPathsParameters();

  @Parameter(property = PropertyNames.ALLOW_INSECURE_REGISTRIES)
  private boolean allowInsecureRegistries;

  @Parameter(property = PropertyNames.CONTAINERIZING_MODE)
  private String containerizingMode = "exploded";

  @Parameter(property = PropertyNames.SKIP)
  private boolean skip;

  @Parameter private List<ExtensionParameters> pluginExtensions = Collections.emptyList();

  @Component protected SettingsDecrypter settingsDecrypter;

  @Inject private Set<JibMavenPluginExtension<?>> injectedPluginExtensions = Collections.emptySet();

  protected Set<JibMavenPluginExtension<?>> getInjectedPluginExtensions() {
    return injectedPluginExtensions;
  }

  protected MavenSession getSession() {
    return Preconditions.checkNotNull(session);
  }

  protected MavenProject getProject() {
    return Preconditions.checkNotNull(project);
  }

  protected void checkJibVersion() throws MojoExecutionException {
    Preconditions.checkNotNull(descriptor);
    MojoCommon.checkJibVersion(descriptor);
  }

  /**
   * Gets the specified platforms.
   *
   * @return the specified platforms
   */
  List<PlatformParameters> getPlatforms() {
    return from.platforms;
  }

  /**
   * Gets the base image reference.

Review comment (refactor):
`JibPluginConfiguration` is mainly for describing the Jib configuration for Maven (and some Maven stuff). I don't want to make this tightly coupled with ~~`JibMavenPluginExtension` and~~ `MavenProjectProperties`. Can we just move this to `MavenProjectProperties` or somewhere more suitable? I am fine duplicating these in each `*Mojo` if it doesn't work well.

Code after:
  // this parameter is cloned in FilesMojo
  @Parameter private ExtraDirectoriesParameters extraDirectories = new ExtraDirectoriesParameters();

  @Parameter private DockerClientParameters dockerClient = new DockerClientParameters();

  @Parameter private OutputPathsParameters outputPaths = new OutputPathsParameters();

  @Parameter(property = PropertyNames.ALLOW_INSECURE_REGISTRIES)
  private boolean allowInsecureRegistries;

  @Parameter(property = PropertyNames.CONTAINERIZING_MODE)
  private String containerizingMode = "exploded";

  @Parameter(property = PropertyNames.SKIP)
  private boolean skip;

  @Parameter private List<ExtensionParameters> pluginExtensions = Collections.emptyList();

  @Component protected SettingsDecrypter settingsDecrypter;

  @Inject private Set<JibMavenPluginExtension<?>> injectedPluginExtensions = Collections.emptySet();

  protected Set<JibMavenPluginExtension<?>> getInjectedPluginExtensions() {
    return injectedPluginExtensions;
  }

  protected MavenSession getSession() {
    return Preconditions.checkNotNull(session);
  }

  protected MavenProject getProject() {
    return Preconditions.checkNotNull(project);
  }

  protected void checkJibVersion() throws MojoExecutionException {
    Preconditions.checkNotNull(descriptor);
    MojoCommon.checkJibVersion(descriptor);
  }

  /**
   * Gets the specified platforms.
   *
   * @return the specified platforms
   */
  List<PlatformParameters> getPlatforms() {
    return from.platforms;
  }

  /**
   * Gets the base image reference.
   *