I have a problem with JavaFX application packaging.
My ultimate goal is to create a standalone application (* .jar, * .exe, * .dmg). Classes and other resources are fine, but the bank itself is not displayed in the target folder. Maybe someone can give me a clue what I'm doing wrong. Or maybe someone can provide a simple step-by-step tutorial on how to achieve my goal (unfortunately, I was not able to do this using the Oracle tutorials).
Thanks in advance! Here is my pom.xml :
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>groupId</groupId> <artifactId>EmployeeReview</artifactId> <version>1.0</version> <name>EmployeeReview</name> <properties> <commons-poi.version>3.8</commons-poi.version> <joda-time.version>2.1</joda-time.version> <simple-odf.version>0.6.6</simple-odf.version> <maven-compiler-plugin.version>2.5.1</maven-compiler-plugin.version> <maven-antrun-plugin.version>1.7</maven-antrun-plugin.version> <maven-assembly-plugin>2.3</maven-assembly-plugin> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <exec.mainClass>by.issoft.employeereview.form.MainForm</exec.mainClass> <javafx.tools.ant.jar>${java.home}/lib/ant-javafx.jar</javafx.tools.ant.jar> <javafx.runtime.lib.jar>${java.home}/jre/lib/jfxrt.jar</javafx.runtime.lib.jar> <javafx.min.version>2.2</javafx.min.version> </properties> <dependencies> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>${commons-poi.version}</version> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>${joda-time.version}</version> </dependency> <dependency> <groupId>org.odftoolkit</groupId> <artifactId>simple-odf</artifactId> <version>${simple-odf.version}</version> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>javafx</artifactId> <version>${javafx.min.version}</version> <scope>compile</scope> </dependency> </dependencies> <build> <directory>target</directory> <finalName>EmployeeReview</finalName> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> <showDeprecation>true</showDeprecation> </configuration> </plugin> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>${maven-antrun-plugin.version}</version> <executions> <execution> <id>create-launcher-jar</id> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <target xmlns:fx="javafx:com.sun.javafx.tools.ant"> <taskdef uri="javafx:com.sun.javafx.tools.ant" resource="com/sun/javafx/tools/ant/antlib.xml" classpath="${javafx.tools.ant.jar}"/> <fx:application id="fxApp" name="${project.name}" mainClass="${exec.mainClass}"/> <fx:jar destfile="${project.build.directory}/${project.build.finalName}-launcher"> <fx:application refid="fxApp"/> <fx:fileset dir="${project.build.directory}/classes"/> </fx:jar> <attachartifact file="${project.build.directory}/${project.build.finalName}-launcher.jar" classifier="launcher" /> </target> </configuration> </execution> </executions> </plugin> </plugins> </build>
source share