如何使用带有 Maven 的 javafx-ant 将文件夹放置在特定位置?
How can I place a folder in a specific location using javafx-ant with Maven?
我已将我的构建从普通 ANT 升级到 Maven 以管理依赖项。我的第三方 Jar 之一需要放置在特定位置的支持文件。
我已经设法创建了一个简单的 pom.xml 来编译应用程序并生成 EXE 安装程序。但是我无法将此文件放在特定的文件夹位置。
当构建和部署应用程序时,它应该放在这个位置:
${project.build.directory}/deploy/bundles/MyApplication/app/{custom-folder}/*.properties
这希望它能正确地捆绑在安装程序中 - 但是我找不到为特定文件指定特定位置的方法。
遵循此模式(仅显示 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>
....
这会将 *.properties 文件放在
位置
${project.build.directory}/deploy/bundles/MyApplication/app
有没有办法将它放在这个位置的子文件夹中?
谢谢
我找到了这个问题的答案。我需要按如下方式更改文件集中的映射:
<fileset dir="${project.build.directory}" includes="properties/*.properties"/>
这把它放在了它需要的地方。
我已将我的构建从普通 ANT 升级到 Maven 以管理依赖项。我的第三方 Jar 之一需要放置在特定位置的支持文件。
我已经设法创建了一个简单的 pom.xml 来编译应用程序并生成 EXE 安装程序。但是我无法将此文件放在特定的文件夹位置。
当构建和部署应用程序时,它应该放在这个位置:
${project.build.directory}/deploy/bundles/MyApplication/app/{custom-folder}/*.properties
这希望它能正确地捆绑在安装程序中 - 但是我找不到为特定文件指定特定位置的方法。
遵循此模式(仅显示 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>
....
这会将 *.properties 文件放在
位置${project.build.directory}/deploy/bundles/MyApplication/app
有没有办法将它放在这个位置的子文件夹中?
谢谢
我找到了这个问题的答案。我需要按如下方式更改文件集中的映射:
<fileset dir="${project.build.directory}" includes="properties/*.properties"/>
这把它放在了它需要的地方。