title: where should i put installer resources (wxs file,dmg-script,icon) and how to configure maven antrun when deploying self contained app
body: <p>Where should i drop my custom configured WIX installer configuration file and how to configured javafx packger tool in maven based java fx project using antrun plugin? I successfully have made basic MSI installer using default package resource and it is working fine. Now i have configured installers WXS files as fxpackager underlying is using wix toolset when creating MSI.</p>
  
  <p>using this <a href="https://stackoverflow.com/questions/18667061/customizing-msi-installer">Customizing MSI installer</a> and this <a href="https://stackoverflow.com/questions/15880102/how-to-set-custom-icon-for-javafx-native-package-icon-on-windows">How to set custom icon for javafx native package icon on Windows</a> i have manages to add Icon. but deploy task is not picking custom configuration file i.e WXS </p>
  
  <p>I had also read official guide <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html" rel="nofollow noreferrer">http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html</a> </p>
  
  <p>my project structure looks like this </p>
  
  <p><img src="https://i.stack.imgur.com/Cjo23.png" alt="project structure"> </p>
  
  <p>You can see i have added on both locations i.e under java-client/package/windows/<em>.</em>
  and i also added in src/main/deploy/package/windows/<em>.</em> as mentioned on linked questions.
  but both ways are not working with my maven ant plugin. my mind is exploding. </p>
  
  <p>From Oracle documentation they states
  "
  Packaging tools look for customized resources on the class path before reverting to built-in resources. The Java Packager has "." (the current working directory) added to the class path by default. Therefore, to replace the application icon, copy your custom icon to ./package/macosx/DemoApp.icns in the directory from which javapackager is run (typically, the root project directory)." </p>
  
  <p>i also tried to add ${basedir} to ant class-path look at My build part of pom </p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&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;${maven.compiler.source}&lt;/source&gt;
                  &lt;target&gt;${maven.compiler.target}&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.9&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*Test.class&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-jar&lt;/id&gt;
                      &lt;phase&gt;none&lt;/phase&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.7&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;create-temp-jar&lt;/id&gt;
                      &lt;phase&gt;prepare-package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;target xmlns:fx="javafx:com.sun.javafx.tools.ant"&gt;
                              &lt;taskdef uri="javafx:com.sun.javafx.tools.ant" resource="com/sun/javafx/tools/ant/antlib.xml"
                                  classpath="maven.plugin.classpath" /&gt;
  
                              &lt;fx:jar
                                  destfile="${project.build.directory}/${project.build.finalName}-temp"&gt;
                                  &lt;fx:application id="fxApp" name="${project.name}"
                                      mainClass="${exec.mainClass}" /&gt;
                                  &lt;fx:fileset dir="${project.build.directory}/classes" /&gt;
                                  &lt;manifest&gt;
                                      &lt;attribute name="Implementation-Vendor" value="${app.vendor}" /&gt;
                                      &lt;attribute name="Implementation-Title" value="${app.name}" /&gt;
                                      &lt;attribute name="Implementation-Version" value="1.0" /&gt;
                                  &lt;/manifest&gt;
                              &lt;/fx:jar&gt;
                              &lt;attachartifact
                                  file="${project.build.directory}/${project.build.finalName}-temp.jar"
                                  classifier="temp" /&gt;
                          &lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;create-deployment-bundle&lt;/id&gt;
                      &lt;phase&gt;install&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;target xmlns:fx="javafx:com.sun.javafx.tools.ant"&gt;
                              &lt;property name="windows.basedir" value="${basedir}/src/main/deploy/package/windows" /&gt;
                              &lt;property name="mac.basedir" value="${basedir}/package/macosx" /&gt;
                              &lt;property name="my.basedir" value="${basedir}" /&gt;
                              &lt;taskdef uri="javafx:com.sun.javafx.tools.ant" resource="com/sun/javafx/tools/ant/antlib.xml"
                                  classpath="${my.basedir}:${windows.basedir}:${mac.basedir}" /&gt;
  
                              &lt;fx:deploy nativeBundles="msi" width="600" height="400"
                                  outdir="${dist.dir}" embedJNLP="true" outfile="${project.build.finalName}"
                                  verbose="true"&gt;
                                  &lt;fx:application name="${project.build.finalName}"
                                      mainClass="${exec.mainClass}" /&gt;
                                  &lt;fx:preferences shortcut="true" menu="true"
                                      install="true" /&gt;
                                  &lt;fx:resources&gt;
                                      &lt;fx:fileset dir="${project.build.directory}"
                                          includes="${project.build.finalName}.jar" /&gt;
                                  &lt;/fx:resources&gt;
                                  &lt;fx:info title="${application.title}" vendor="${application.vendor}"
                                      copyright="${application.copyright}" description="Test built from Java executable jar"&gt;
                                      &lt;fx:icon
                                          href="${basedir}/src/main/deploy/package/windows/${project.build.finalName}.ico" /&gt;
                                  &lt;/fx:info&gt;
                                  &lt;fx:platform javafx="${javafx.version}"&gt;
                                      &lt;fx:jvmarg value="-Xms512m" /&gt;
                                      &lt;fx:jvmarg value="-Xmx1024m" /&gt;
                                  &lt;/fx:platform&gt;
                                  &lt;fx:permissions elevated="true" /&gt;
                              &lt;/fx:deploy&gt;
                          &lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.oracle&lt;/groupId&gt;
                      &lt;artifactId&gt;ant-javafx&lt;/artifactId&gt;
                      &lt;version&gt;${javafx.version}&lt;/version&gt;
                      &lt;systemPath&gt;${javafx.tools.ant.jar}&lt;/systemPath&gt;
                      &lt;scope&gt;system&lt;/scope&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.oracle&lt;/groupId&gt;
                      &lt;artifactId&gt;javafx&lt;/artifactId&gt;
                      &lt;version&gt;${javafx.version}&lt;/version&gt;
                      &lt;systemPath&gt;${fx.home}&lt;/systemPath&gt;
                      &lt;scope&gt;system&lt;/scope&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;make-assembly&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;single&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;descriptors&gt;
                      &lt;descriptor&gt;src/main/assembly/jar-with-dependencies.xml&lt;/descriptor&gt;
                  &lt;/descriptors&gt;
                  &lt;finalName&gt;${project.build.finalName}&lt;/finalName&gt;
                  &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                  &lt;archive&gt;
                      &lt;manifestEntries&gt;
                          &lt;JavaFX-Version&gt;${javafx.version}&lt;/JavaFX-Version&gt;
                          &lt;JavaFX-Application-Class&gt;${exec.mainClass}&lt;/JavaFX-Application-Class&gt;
                          &lt;Main-Class&gt;com/javafx/main/Main&lt;/Main-Class&gt;
                      &lt;/manifestEntries&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Can you please please help me figuring out the problam.</p>