void (final String homePath) { if (!checkNotEmpty(getAppClass(), "Application class")) return; if (!checkNotEmpty(getWidth(), "Width")) return; if (!checkNotEmpty(getHeight(), "Height")) return; final String zipPath = getArtifactOutputFilePath(); final File tempUnzippedArtifactOutput; try { tempUnzippedArtifactOutput = FileUtil.createTempDirectory("artifact", "unzipped"); final File artifactOutputFile = new File(zipPath); ZipUtil.extract(artifactOutputFile, tempUnzippedArtifactOutput, null); copyLibraries(FileUtilRt.getNameWithoutExtension(artifactOutputFile.getName()), tempUnzippedArtifactOutput); } catch (IOException e) { registerJavaFxPackagerError(e); return; } final File tempDirectory = new File(tempUnzippedArtifactOutput, "deploy"); try { final String taskDefJar = homePath + "/lib/ant-javafx.jar"; if (!new File(taskDefJar).exists()) { registerJavaFxPackagerError(JavaFXCommonBundle.message("cant.build.artifact.fx.deploy.is.not.available.in.this.jdk")); return; } final StringBuilder buf = new StringBuilder(); buf.append("<project default=\"build artifact\">\n"); buf.append("<taskdef resource=\"com/sun/javafx/tools/ant/antlib.xml\" uri=\"javafx:com.sun.javafx.tools.ant\" ") .append("classpath=\"").append(taskDefJar).append("\"/>\n"); buf.append("<target name=\"build artifact\" xmlns:fx=\"javafx:com.sun.javafx.tools.ant\">"); final String artifactFileName = getArtifactRootName(); final List<JavaFxAntGenerator.SimpleTag> tags = JavaFxAntGenerator.createJarAndDeployTasks(this, artifactFileName, getArtifactName(), tempUnzippedArtifactOutput.getPath(), tempDirectory.getPath(), null); for (JavaFxAntGenerator.SimpleTag tag : tags) { tag.generate(buf); } buf.append("</target>"); buf.append("</project>"); final int result = startAntTarget(buf.toString(), homePath); if (result == 0) { if (isEnabledSigning()) { signApp(homePath + File.separator + "bin", tempDirectory); } } else { registerJavaFxPackagerError(JavaFXCommonBundle.message("fx.deploy.task.has.failed")); } } finally { copyResultsToArtifactsOutput(tempDirectory); FileUtil.delete(tempUnzippedArtifactOutput); } }