title: maven install failed on a javafx application
body: <p>I have created a basic javafx project in eclipse using a maven archetype. When I run a maven install I get the following error. When I run the application in the IDE it works. When I try to run from the target folder it does nothing. Here is the error:</p>
  
  <p>"Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (unpack-dependencies) on project testjavafx: Command execution failed. Cannot run program "C:\Program Files\Java\jdk-10.0.2..\bin\javafxpackager" (in directory "C:\Users\Stephen\Documents\eclipse-workspace\testjavafx"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]"</p>
  
  <p>Here is my pom.xml generated from maven archetype:</p>
  
  <p>
  http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0</p>
  
  <pre><code>&lt;groupId&gt;com.stevie&lt;/groupId&gt;
  &lt;artifactId&gt;testjavafx&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;testjavafx&lt;/name&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;mainClass&gt;com.stevie.testjavafx.MainApp&lt;/mainClass&gt;
  &lt;/properties&gt;
  
  &lt;organization&gt;
      &lt;!-- Used as the 'Vendor' for JNLP generation --&gt;
      &lt;name&gt;Your Organisation&lt;/name&gt;
  &lt;/organization&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;unpack-dependencies&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;unpack-dependencies&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;excludeScope&gt;system&lt;/excludeScope&gt;
                          &lt;excludeGroupIds&gt;junit,org.mockito,org.hamcrest&lt;/excludeGroupIds&gt;
                          &lt;outputDirectory&gt;${project.build.directory}/classes&lt;/outputDirectory&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.2.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;unpack-dependencies&lt;/id&gt;
  
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;exec&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;executable&gt;${java.home}/../bin/javafxpackager&lt;/executable&gt;
                          &lt;arguments&gt;
                              &lt;argument&gt;-createjar&lt;/argument&gt;
                              &lt;argument&gt;-nocss2bin&lt;/argument&gt;
                              &lt;argument&gt;-appclass&lt;/argument&gt;
                              &lt;argument&gt;${mainClass}&lt;/argument&gt;
                              &lt;argument&gt;-srcdir&lt;/argument&gt;
                              &lt;argument&gt;${project.build.directory}/classes&lt;/argument&gt;
                              &lt;argument&gt;-outdir&lt;/argument&gt;
                              &lt;argument&gt;${project.build.directory}&lt;/argument&gt;
                              &lt;argument&gt;-outfile&lt;/argument&gt;
                              &lt;argument&gt;${project.build.finalName}.jar&lt;/argument&gt;
                          &lt;/arguments&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-cli&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;exec&lt;/goal&gt;                            
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;executable&gt;${java.home}/bin/java&lt;/executable&gt;
                          &lt;commandlineArgs&gt;${runfx.args}&lt;/commandlineArgs&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;  
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;10&lt;/source&gt;
                  &lt;target&gt;10&lt;/target&gt;
                  &lt;compilerArguments&gt;
                      &lt;bootclasspath&gt;${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar&lt;/bootclasspath&gt;
                  &lt;/compilerArguments&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.16&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;additionalClasspathElements&gt;
                      &lt;additionalClasspathElement&gt;${java.home}/lib/jfxrt.jar&lt;/additionalClasspathElement&gt;
                  &lt;/additionalClasspathElements&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thank you for your help.</p>