I have upgraded my build from plain ANT to Maven to manage dependencies. One of my Third Party Jars needs a supporting file placed in a specific location.
I have managed to create a simple pom.xml to compile the application and generate the EXE installer. However I am unable to place this file in the specific folder location.
When the application is build & deployed it should be placed in this location:
${project.build.directory}/deploy/bundles/MyApplication/app/{custom-folder}/*.properties
This want it would be correctly bundled in the installer - however I am unable to find a way to specify a specific location for a specific file.
Following this pattern (only showing the relative pieces of the POM):
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<target>
<taskdef name="jfxdeploy" classname="com.sun.javafx.tools.ant.DeployFXTask" classpathref="maven.plugin.classpath" />
<jfxdeploy outdir="${project.build.directory}/deploy" outfile="${build.finalName}" nativeBundles="all">
<resources>
<fileset dir="${project.build.directory}" includes="*.jar" />
<fileset dir="${project.build.directory}/dependency" includes="*.jar" />
<fileset dir="${project.build.directory}/properties" includes="*.properties" />
</resources>
....
This places the *.properties file in the location
${project.build.directory}/deploy/bundles/MyApplication/app
Is there a way to place this in a sub folder at this location?
Thanks
I found the answer to this issue. I needed to change the mapping in the fileset as follows:
<fileset dir="${project.build.directory}" includes="properties/*.properties"/>
This placed it where it needed to be.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.