javafx-maven-plugin 更新错误的文件夹

javafx-maven-plugin Updates Wrong Folder

有两个不同的 javafx 应用程序使用 javafx-maven-plugin 生成本机 windows 安装程序。在这两个应用程序中都生成了安装程序,可以在 target\jfx\native .

中看到

当第一个应用程序安装程序安装程序开始时,安装程​​序显示文件被复制到 C:\Users\Yunus\AppData\Local\CooperativeERP

问题是当第二个应用程序安装过程开始时,它会进入同一个文件夹并更新一些文件,这使得第一个安装的应用程序无法使用。

插件Maven XML如下:

       <plugin>
            <groupId>com.zenjava</groupId>
            <artifactId>javafx-maven-plugin</artifactId>
            <version>8.6.0</version>
            <configuration>
                <mainClass>re.iprocu.coperativeerp.MainApp</mainClass>

                <bundleArguments>
                    <licenseFile>termsOfService.rtf</licenseFile>
                </bundleArguments>
                <additionalAppResources>src/main/additionalAppResources</additionalAppResources><!-- name does not matter, it's just some folder :D -->
                <!-- DO SHOW DEBUG-OUTPUT -->
                <verbose>true</verbose>
            </configuration>
            <executions>
                <execution>
                    <!-- required before build-native -->
                    <id>create-jfxjar</id>
                    <phase>package</phase>
                    <goals>
                        <goal>build-jar</goal>
                    </goals>
                </execution>

                <execution>
                    <id>create-native</id>
                    <phase>package</phase>
                    <goals>
                        <goal>build-native</goal>
                    </goals>
                </execution>

            </executions>
        </plugin>

我应该怎么做才能让这两个安装程序安装为不同的应用程序,而不是互相接触。

发现 zen java maven 插件使用 Main class 包作为应用程序的唯一标识符,在这种特殊情况下,两个应用程序具有相同的包名称。

为一个应用程序更改包解决了我的问题。