title: How to set custom icon for javafx native package icon on Windows
body: <p>I am trying to chance the icon of the exe file while creating native bundling of javafx packaging.
  I tried adding icon into pom.xml but till it wont work out for me as it gives default icon<br>
  Using Intellij IDEA IDE which contain an Pom.xml creating an package by <code>command = mvn jfx:build-native</code>
  Here is my <code>pom.xml</code>:</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.zenjava&lt;/groupId&gt;
              &lt;artifactId&gt;javafx-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.5&lt;/version&gt;
              &lt;configuration&gt;
  
                  &lt;mainClass&gt;com.demoApp.testapp.testApplication&lt;/mainClass&gt;
  
                  &lt;!-- only required if signing the jar file --&gt;
                  &lt;keyStoreAlias&gt;example-user&lt;/keyStoreAlias&gt;
                  &lt;keyStorePassword&gt;example-password&lt;/keyStorePassword&gt;
                  &lt;permissions&gt;
                      &lt;permission&gt;all-permissions&lt;/permission&gt;
                  &lt;/permissions&gt;
                  &lt;icon&gt;${basedir}/src/main/resources/images/logoIcon.ico&lt;/icon&gt;
              &lt;/configuration&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;configuration&gt;
                  &lt;source&gt;1.7&lt;/source&gt;
                  &lt;target&gt;1.7&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>I have added an icon path into pom.xml ${basedir}/src/main/resources/images/logoIcon.ico
  that will run while native package execute but it wont work out for me</p>
  
  <p>Is any other way to do it ?
   Please suggest.</p>
  
  <hr>
  
  <p>i tried fx tags in pom.xml using ant,here is my changes in pom.xml</p>
  
  <pre><code>&lt;properties&gt;
  
  &lt;javafx.tools.ant.jar&gt;${env.JAVA_HOME}\lib\ant-javafx.jar&lt;/javafx.tools.ant.jar&gt; &lt;/properties&gt;
  
  
  &lt;plugin&gt;
                  &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.6&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;create-launcher-jar&lt;/id&gt;
                          &lt;phase&gt;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="${javafx.tools.ant.jar}"/&gt;
                                  &lt;fx:application id="fxApp"
                                                  name="${project.name}"
                                                  mainClass="com.precisionhawk.flightplanner.FlightPlannerApp"/&gt;
                                  &lt;fx:jar destfile="${project.build.directory}/${project.build.finalName}-launcher"&gt;
                                      &lt;fx:application refid="fxApp"/&gt;
                                      &lt;fx:fileset dir="${project.build.directory}/classes"/&gt;
                                  &lt;/fx:jar&gt;
                                  &lt;attachartifact file="${project.build.directory}/${project.build.finalName}-launcher.jar"
                                                  classifier="launcher"/&gt;
                                  &lt;fx:deploy&gt;
                                      &lt;fx:info&gt;
                                          &lt;fx:icon href="${basedir}/src/main/deploy/logoIcon.ico"&gt;&lt;/fx:icon&gt;
                                      &lt;/fx:info&gt;
  
                                  &lt;/fx:deploy&gt;
                              &lt;/target&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>but it wont work out..</p>