@Override
  public void onBuildFinished(final @NotNull Artifact artifact, final @NotNull CompileContext compileContext) {
    if (!(artifact.getArtifactType() instanceof JavaFxApplicationArtifactType)) {
      return;
    }
    final Project project = compileContext.getProject();
    Sdk fxCompatibleSdk = getFxCompatibleSdk(artifact, project);

    if (fxCompatibleSdk == null) {
      compileContext.addMessage(CompilerMessageCategory.ERROR,
                                JavaFXBundle.message("java.version.7.or.higher.is.required.to.build.javafx.package"), null, -1, -1);
      return;
    }

    final JavaFxArtifactProperties properties =
            (JavaFxArtifactProperties)artifact.getProperties(JavaFxArtifactPropertiesProvider.getInstance());

    final JavaFxPackager javaFxPackager = new JavaFxPackager(artifact, properties, project) {
      @Override
      protected void registerJavaFxPackagerError(String message) {
        compileContext.addMessage(CompilerMessageCategory.ERROR, message, null, -1, -1);
      }

      @Override
      protected void registerJavaFxPackagerInfo(String message) {
        compileContext.addMessage(CompilerMessageCategory.INFORMATION, message, null, -1, -1);
      }
    };
    javaFxPackager.buildJavaFxArtifact(fxCompatibleSdk.getHomePath());
  }
@Override
  public void onBuildFinished(final @NotNull Artifact artifact, final @NotNull CompileContext compileContext)