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.
using this Customizing MSI installer and this How to set custom icon for javafx native package icon on Windows i have manages to add Icon. but deploy task is not picking custom configuration file i.e WXS
I had also read official guide http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html
my project structure looks like this
You can see i have added on both locations i.e under java-client/package/windows/. and i also added in src/main/deploy/package/windows/. as mentioned on linked questions. but both ways are not working with my maven ant plugin. my mind is exploding.
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)."
i also tried to add ${basedir} to ant class-path look at My build part of pom
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<includes>
<include>**/*Test.class</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>create-temp-jar</id>
<phase>prepare-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="maven.plugin.classpath" />
<fx:jar
destfile="${project.build.directory}/${project.build.finalName}-temp">
<fx:application id="fxApp" name="${project.name}"
mainClass="${exec.mainClass}" />
<fx:fileset dir="${project.build.directory}/classes" />
<manifest>
<attribute name="Implementation-Vendor" value="${app.vendor}" />
<attribute name="Implementation-Title" value="${app.name}" />
<attribute name="Implementation-Version" value="1.0" />
</manifest>
</fx:jar>
<attachartifact
file="${project.build.directory}/${project.build.finalName}-temp.jar"
classifier="temp" />
</target>
</configuration>
</execution>
<execution>
<id>create-deployment-bundle</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target xmlns:fx="javafx:com.sun.javafx.tools.ant">
<property name="windows.basedir" value="${basedir}/src/main/deploy/package/windows" />
<property name="mac.basedir" value="${basedir}/package/macosx" />
<property name="my.basedir" value="${basedir}" />
<taskdef uri="javafx:com.sun.javafx.tools.ant" resource="com/sun/javafx/tools/ant/antlib.xml"
classpath="${my.basedir}:${windows.basedir}:${mac.basedir}" />
<fx:deploy nativeBundles="msi" width="600" height="400"
outdir="${dist.dir}" embedJNLP="true" outfile="${project.build.finalName}"
verbose="true">
<fx:application name="${project.build.finalName}"
mainClass="${exec.mainClass}" />
<fx:preferences shortcut="true" menu="true"
install="true" />
<fx:resources>
<fx:fileset dir="${project.build.directory}"
includes="${project.build.finalName}.jar" />
</fx:resources>
<fx:info title="${application.title}" vendor="${application.vendor}"
copyright="${application.copyright}" description="Test built from Java executable jar">
<fx:icon
href="${basedir}/src/main/deploy/package/windows/${project.build.finalName}.ico" />
</fx:info>
<fx:platform javafx="${javafx.version}">
<fx:jvmarg value="-Xms512m" />
<fx:jvmarg value="-Xmx1024m" />
</fx:platform>
<fx:permissions elevated="true" />
</fx:deploy>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ant-javafx</artifactId>
<version>${javafx.version}</version>
<systemPath>${javafx.tools.ant.jar}</systemPath>
<scope>system</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>${javafx.version}</version>
<systemPath>${fx.home}</systemPath>
<scope>system</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>src/main/assembly/jar-with-dependencies.xml</descriptor>
</descriptors>
<finalName>${project.build.finalName}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifestEntries>
<JavaFX-Version>${javafx.version}</JavaFX-Version>
<JavaFX-Application-Class>${exec.mainClass}</JavaFX-Application-Class>
<Main-Class>com/javafx/main/Main</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
Can you please please help me figuring out the problam.